Skip to main content
grasp.study
About
Explore
Pricing
Log in
Try it for free
Back to course
👋
Welcome to a Grasp lesson
Create a free account
to keep studying and create your own study path.
Create Pythonic Course Content
·
Module 11
Ship with Confidence: Testing, Packaging, and Tooling
Python Project Structure with `pyproject.toml`
Structure a Python project using a `pyproject.toml` file and a standard layout (e.g., `src/`).
2
Managing Dependencies with `venv` and Pip Lockfiles
Manage project dependencies and create reproducible environments using `venv` and `pip` lockfiles.
3
Advanced Pytest: Fixtures and Parameterization
Write tests using `pytest`, employing fixtures for setup/teardown and `pytest.mark.parametrize` for data-driven tests.
4
Handling Exceptions and Filesystems in Pytest
Test for expected exceptions with `pytest.raises` and handle filesystem operations with the `tmp_path` fixture.
5
Automating Code Formatting with Pre-commit Hooks
Automate code formatting and linting using `black`, `ruff`, and `isort`, managed via `pre-commit` hooks.
6
Automating Code Quality Checks with GitHub Actions
Configure a GitHub Actions workflow to automatically run tests, linting, and type checking on pull requests.
7
Building and Testing Python Wheels
Build a distributable wheel package with `python -m build` and test its installation in a clean environment.
Documenting APIs with Sphinx and Google Style Docstrings
Write API documentation using standard docstring formats (e.g., Google style) and generate HTML docs with Sphinx.
Previous module
Embrace Clarity: Pythonic Type Hinting
Next module
Optimize Smart: Performance and Concurrency