Create an Open-Source Project in Python
1h 26mIntermediate2023-03-30
Authors

Cheuk Ting Ho
Developer Advocate at Anaconda | Python Community Leader
Course details
For open-source projects, it can be a challenge to ensure development coherence and avoid errors and bugs. In this course, Python community leader Cheuk Ting Ho guides you through the complete process of starting, building, testing, and maintaining an open-source project in Python. Cheuk introduces you to Poetry, a popular dependency management tool, and shows you how to use it in starting a Python project. She defines pytests and goes over how to write simple tests, test with multiple parameters, and test if an exception is raised. Cheuk covers fixtures and how to use them, as well as when it is okay to skip a test. She discusses using PEP 8, Black, linters like Flake8, and pre-commits to tidy up your code. Cheuk demonstrates how to use a tool called tox to standardize your testing, as well as how to set up a workflow on GitHub Action. Plus, she highlights some best practices for open-source projects.
Skills covered
Cross-Platform DevelopmentMobile DevelopmentPythonProjectProgramming LanguagesOpen SourceSoftware Development
Concepts
0. Introduction
- 01 - Create an open-source project in Python
- 02 - What you should know
1. Starting a Project with Poetry
- 03 - What is Poetry
- 04 - Install Poetry
- 05 - Starting a project
- 06 - What is pyproject.toml
- 07 - Adding dependencies
- 08 - Poetry lock and install
- 09 - Checkpoint - What you have so far
2. Power Up Your Tests
- 10 - What is pytest
- 11 - Introduction to your project
- 12 - Writing simple tests
- 13 - Testing with multiple parameters
- 14 - Test if an exception is raised
- 15 - What is a fixture
- 16 - Using fixture
- 17 - Skipping a test, with good reasons
- 18 - Checkpoint - What you have so far
3. Tidy Up Your Code
- 19 - What is PEP 8
- 20 - What is Black
- 21 - Formatting your code with Black
- 22 - What is a linter
- 23 - Linting your code with Flake8
- 24 - Using pre-commit to clean up automatically
- 25 - Checkpoint - What you have so far
4. Standardize Testing Using tox
- 26 - What is tox
- 27 - tox basic usage
- 28 - tox advance usage
- 29 - Checkpoint - What you have so far
5. Setting up a Workflow on GitHub Action
- 30 - What is GitHub Action
- 31 - Setting up a workflow for testing
- 32 - Why do you need code coverage
- 33 - Adding code coverage to workflow
Conclusion
- 34 - Open-source project with good practice
Related courses
- Building a Personal Portfolio with Django
- Python 2d Lists: A Project-based Approach
- Python Projects: Create an Interactive Quiz Application
- Creating AI Applications with Python and GitHub Models
- Python Projects
- Flask Essential Training (2019)
- Django Essential Training
- Complete Guide to Analytics Engineering
Related learn paths
- Advance Your Skills in Python
- Python Hands-On Practice
- Advance Your Skills in Deep Learning and Neural Networks
- MLOps Essentials for Developers and AI Engineers: Tools, Pipelines, Security
- Data Engineering Foundations Professional Certificate by Astronomer
- Data Engineering Hands-On Practice
- Become a Raspberry Pi Developer
- Become a Django Developer