References & Further Reading

References

  1. G. van Rossum, J. Lehtosalo, L. Langa, PEP 484 β€” Type Hints, 2014

    The foundational proposal that introduced type hints to Python, defining the syntax and semantics for function annotations, `TypeVar`, `Union`, `Optional`, and the `typing` module.

  2. Jukka Lehtosalo et al., mypy Documentation, mypy-lang.org, 2024

    Official documentation for mypy, the reference implementation of Python's type checking system. The "Type System Reference" section covers generics, protocols, and variance in detail.

  3. B. Okken, Python Testing with pytest, Pragmatic Bookshelf, 2022

    The definitive guide to pytest, covering fixtures, parametrize, plugins, and advanced patterns. Chapter 6 on fixtures and Chapter 8 on configuration are especially relevant.

  4. D. MacIver et al., Hypothesis Documentation, hypothesis.readthedocs.io, 2024

    Official documentation for the Hypothesis property-based testing library. The "Numpy extension" section covers strategies for generating arrays with specific shapes and dtypes.

  5. Cecil Curry, beartype Documentation, beartype.readthedocs.io, 2024

    Documentation for beartype, the O(1) runtime type checker. Explains the constant-time checking algorithm and supported type hint features.

  6. B. Cannon, D. Stufft, P. G. Moore, PEP 621 β€” Storing Project Metadata in pyproject.toml, 2020

    The PEP that standardized project metadata in pyproject.toml, covering name, version, dependencies, and optional features.

  7. Python Packaging Authority, Python Packaging User Guide, packaging.python.org, 2024

    The authoritative guide for Python packaging, covering pyproject.toml, src layout, building distributions, and publishing to PyPI.

Further Reading

  • Advanced type system features (ParamSpec, TypeVarTuple)

    PEP 612 (ParamSpec) and PEP 646 (Variadic Generics)

    These PEPs extend Python's type system for decorator typing (ParamSpec) and tensor shape typing (TypeVarTuple). Essential reading if you plan to type-check decorator factories or shape-polymorphic array code.

  • Mutation testing for Python

    mutmut (https://github.com/boxed/mutmut)

    Mutation testing measures test suite quality by introducing small code changes and checking that tests catch them. The exercises in this chapter introduce the concept; mutmut is a production-ready tool for applying it to real projects.

  • Continuous integration for scientific Python

    Scientific Python Library Development Guide (https://learn.scientific-python.org/development/)

    Covers CI/CD setup with GitHub Actions, nox for test automation, and best practices for publishing scientific Python packages. A natural next step after the packaging section of this chapter.

  • Runtime data validation with Pydantic

    S. Colvin, *Pydantic v2 Documentation* (https://docs.pydantic.dev/)

    Pydantic extends runtime validation beyond type hints to full data models with coercion, serialization, and JSON schema generation. Widely used for configuration management in scientific computing pipelines.