cookiecutter-apex-python

Welcome to the Docs Site👋

_images/cover.webp

About#

A cookiecutter-based template for creating and managing new Python projects. Offers solutions to initialize the configure the development environment, manage dependencies, run tests, enable linting and formatters, and generate documentation. The template is designed to be flexible and extensible, and can be easily customized to meet the needs of any Python project.


Site Contents#

card-img-top
Installation

Information on how to get the cookiecutter-python template up and running on your local machine.

card-img-top
Usage

Learn how to use the cookiecutter-python template to create and manage a new Python project.

card-img-top
Features Reference

Extensive reference information and resources for included features.

card-img-top
Resources

Other helpful resources including design, development, and deployment resources.


Included Features Index#

Dev Environment#

See here for further reference

Tests#

  • Hypothesis [Homepage, PyPi Homepage, Docs Site, GitHub Repo]

    • family of testing libraries which let you write tests parametrized by a source of examples. A Hypothesis implementation then generates simple and comprehensible examples that make your tests fail. This simplifies writing your tests and makes them more powerful at the same time, by letting software automate the boring bits and do them to a higher standard than a human would, freeing you to focus on the higher level test logic.

  • pandera [PyPi Homepage, Docs Site, GitHub Repo]

    • provides a flexible and expressive API for performing data validation on dataframe-like objects to make data processing pipelines more readable and robust.

  • Pydantic [PyPi Homepage, Docs Site, GitHub Repo]

    • Data validation using Python type hints.

  • pytest [PyPi Homepage, Docs Site, GitHub Repo]

    • pytest-sugar [PyPi Homepage, GitHub Repo]

      • This plugin extends pytest by showing failures and errors instantly, adding a progress bar, improving the test results, and making the output look better.

    • pytest-emoji [PyPi Homepage, GitHub Repo]

      • A pytest plugin that adds emojis to your test result report 😍

    • pytest-html [PyPi Homepage, GitHub Repo]

    • pytest-icdiff [PyPi Homepage, GitHub Repo]

      • Better diffs in pytest assertion error messages using ICDiff.

    • pytest-instafail [PyPi Homepage, GitHub Repo]

      • plugin for pytest that shows failures and errors instantly instead of waiting until the end of test session.

    • pytest-timeout [PyPi Homepage, GitHub Repo]

      • Warning – Please read this README carefully and only use this plugin if you understand the consequences. This plugin is designed to catch excessively long test durations like deadlocked or hanging tests, it is not designed for precise timings or performance regressions. Remember your test suite should aim to be fast, with timeouts being a last resort, not an expected failure mode.

    • pytest-benchmark [PyPi Homepage, Docs Site, GitHub Repo]

      • A pytest fixture for benchmarking code. It will group the tests into rounds that are calibrated to the chosen timer.

    • pytest-cov [PyPi Homepage, Docs Site, GitHub Repo]

      • This plugin produces coverage reports. Compared to just using coverage run this plugin does some extras: Subprocess support: you can fork or run stuff in a subprocess and will get covered without any fuss. Xdist support: you can use all of pytest-xdist’s features and still get coverage. Consistent pytest behavior. If you run coverage run -m pytest you will have slightly different sys.path (CWD will be in it, unlike when running pytest). All features offered by the coverage package should work, either through pytest-cov’s command line options or through coverage’s config file.

    • pytest-xdist [PyPi Homepage, Docs Site, GitHub Repo]

      • The pytest-xdist plugin extends pytest with new test execution modes, the most used being distributing tests across multiple CPUs to speed up test execution:

See here for further reference

Docs#

  • Sphinx [Homepage]

    • PyData Theme [Docs Site]

    • Open Sans Font [Google Fonts]

    • sphinx.ext.autodoc [Docs Site]

      • Include documentation from docstrings

    • sphinx.ext.autosectionlabel [Docs Site]

      • Allow reference sections using its title

    • sphinx.ext.autosummary [Docs Site]

      • Generate autodoc summaries

    • sphinx.ext.graphviz [Docs Site]

      • Add Graphviz graphs

    • sphinx.ext.napoleon [Docs Site]

      • Support for NumPy and Google style docstrings

    • sphinx.ext.todo [Docs Site]

      • Support for todo items

    • sphinx.ext.viewcode [Docs Site]

      • Add links to highlighted source code

    • sphinx_git [Docs Site]

      • sphinx-git is an extension to the Sphinx documentation tool that allows you to include excerpts from your git history within your documentation. This could be used for release changelogs, to pick out specific examples of history in documentation, or just to surface what is happening in the project.

    • sphinx_markdown_builder [GitHub Repo]

      • sphinx builder that outputs markdown files.

    • sphinx_copybutton [Docs Site]

      • add a little “copy” button to the right of your code blocks.

    • sphinx_design [Docs Site]

      • A sphinx extension for designing beautiful, screen-size responsive web-components.

    • myst_parser [Docs Site]

    • sphinxcontrib.mermaid [Docs Site]

      • embed Mermaid graphs in your documents, including general flowcharts, sequence and gantt diagrams.

    • sphinx-hoverxref [Docs Site]

      • show a floating window (tooltips or modal dialogues) on the cross references of the documentation embedding the content of the linked section on them. With sphinx-hoverxref, you don’t need to click a link to see what’s in there.

    • sphinx-sitemap [Docs Site]

      • A Sphinx extension to generate multi-version and multi-language sitemaps.org compliant sitemaps for the HTML version of your Sphinx documentation.

    • sphinx_togglebutton [Docs Site]

      • A small sphinx extension to add “toggle button” elements to sections of your page. For example: {toggle}

    • sphinx_favicon [Docs Site]

      • A Sphinx extension to add custom favicons. With Sphinx Favicon, you can add custom favicons to your Sphinx HTML documentation.

See here for further reference

Formatters#

  • isort [Docs Site, GitHub Repo]

    • A Python utility / library to sort imports.

  • black [PyPi Homepage, Docs Site, GitHub Repo]

    • Black is the uncompromising Python code formatter. By using it, you agree to cede control over minutiae of hand-formatting. In return, Black gives you speed, determinism, and freedom from pycodestyle nagging about formatting. You will save time and mental energy for more important matters.

  • Pylint [PyPi Homepage, Docs Site, GitHub Repo]

    • Pylint is a static code analyser for Python 2 or 3. The latest version supports Python 3.7.2 and above. Pylint analyses your code without actually running it. It checks for errors, enforces a coding standard, looks for code smells, and can make suggestions about how the code could be refactored.

  • autoflake [PyPi Homepage, GitHub Repo]

    • Removes unused imports and unused variables as reported by pyflakes

  • Pylama [PyPi Homepage, Docs Site, GitHub Repo]

    • Code audit tool for Python. Pylama wraps these tools: pycodestyle, pydocstyle, PyFlakes, Mccabe, Pylint, Radon, eradicate, Mypy, Vulture

See here for further reference