Package: cookiecutter-cruft-poetry-tox-pre-commit-ci-cd-instance
cookiecutter-cruft-poetry-tox-pre-commit-ci-cd-instanceDocumentation:https://github.readthedocs.ioSource Code:https://github.com/TeoZosa/cookiecutter-cruft-poetry-tox-pre-commit-ci-cd-instance:teacher: OverviewTODO:sparkles: FeaturesTODO:information_source: RequirementsTODOTable of Contents:tada: Installation:rocket: Usage:children_crossing: Running The Project:one: Docker Container Project Environment (recommended):two: Locally via Poetry (development workflow):clipboard: Summary:books: Further Reading:wrench: Development:building_construction: Package and Dependencies Installation:package: Python Module to C-Extension Compilation:whale: Docker Container Image Building/Deployment Orchestration:white_check_mark: Testing:rotating_light: Code Quality:arrows_counterclockwise: Automate via Git Pre-Commit Hooks:memo: Documentation:judge: Legal:page_facing_up: License:busts_in_silhouette: Credits:tada: InstallationYou can install Cookiecutter Cruft Poetry Tox Pre Commit Ci Cd Instance viapip:pipinstallcookiecutter-cruft-poetry-tox-pre-commit-ci-cd-instance:rocket: UsageTODOHigh-level usage overviewTODOStep 0 descriptionimportcookiecutter_cruft_poetry_tox_pre_commit_ci_cd_instance# TODO:fire:TipAll following commands are relative to the project root directory and assumemakeis installed.:children_crossing: Running The Project:one: Docker Container Project Environment (recommended)Run:# Uncomment below to run with corresponding options.# Note: *any* value other than `false` will trigger an option#export IS_INTERACTIVE_SESSION=true#export BIND_MOUNT_APPLICATION_DIR_ON_CONTAINER=truemakedeploy-project-docker-containerwhich will fetch and run the project container image.:fire:TipIf you prefer to build and run the container locally, run:makedeploy-project-docker-container-local:two: Locally via Poetry (development workflow)Run:makeprovision-environment# Note: installs ALL dependencies!poetryshell# Activate the project's virtual environment:clipboard: SummaryTODO:books: Further ReadingTODO:wrench: DevelopmentFor convenience, implementation details of the below processes are abstracted away and
encapsulated in singleMaketargets.:fire:TipInvokingmakewithout any arguments will display
auto-generated documentation on available commands.:building_construction: Package and Dependencies InstallationMake sure you have Python 3.8+ andpoetryinstalled and configured.To install the package and all dev dependencies, run:makeprovision-environment:fire:TipInvoking the above withoutpoetryinstalled will emit a
helpful error message letting you know how you can install Poetry.:package: Python Module to C-Extension CompilationThe projects'sbuild.pyfile specifies which modules to package.For manual per-module compilation, see:Mypyc Documentation: Getting started - Compiling and running:whale: Docker Container Image Building/Deployment OrchestrationThe following set ofmaketargets orchestrate the project's container image build and
deploy steps:build-containerBuildcookiecutter-cruft-poetry-tox-pre-commit-ci-cd-instancecontainer
deploy-project-docker-containerDeploydownloadeddockerizedprojectenvironmentwithpreloadeddependencies
deploy-project-docker-container-localDeploylocally-builtdockerizedprojectenvironmentwithpreloadeddependencies
pull-containerPullcookiecutter-cruft-poetry-tox-pre-commit-ci-cd-instancecontainer
push-containerPushcookiecutter-cruft-poetry-tox-pre-commit-ci-cd-instancecontainer
stop-containerStopcontainerforcefully(i.e.,whenkeyboardinterruptsaredisabled)Note that the project's container image is insulated from the implementation details of
the application's top-level setup and execution logic, which falls under the purview of
the project's entrypoint script. As such, Dockerfile modifications will generally only
be necessary when updating non-Python environment dependencies (Python dependency
updates are automatically reflected in new image builds via thepyproject.tomlandpoetry.lockfiles).:white_check_mark: TestingWe usetoxandpytestfor our test automation and testing
frameworks, respectively.To invoke the tests, run:maketestRunmutation teststo validate test
suite robustness (Optional):maketest-mutations:information_source:Technical DetailsTest time scales with the complexity of the codebase. Results are cached
in.mutmut-cache, so once you get past the initialcold start problem,
subsequent mutation test runs will be much faster; new mutations will only
be applied to modified code paths.:rotating_light: Code QualityWe usepre-commitfor our static analysis automation and
management framework.To invoke the analyses and auto-formatting over all version-controlled files, run:makelint:rotating_light:DangerCI will fail if either testing or code quality fail,
so it is recommended to automatically run the above locally
prior to every commit that is pushed.:arrows_counterclockwise: Automate via Git Pre-Commit HooksTo automatically run code quality validation on every commit (over to-be-committed
files), run:makeinstall-pre-commit-hooks:warning:️ WarningThis will prevent commits if any single pre-commit hook fails
(unless it is allowed to fail)
or a file is modified by an auto-formatting job;
in the latter case, you may simply repeat the commit and it should pass.:memo: Documentationmakedocs-cleandocs-html:fire:TipFor faster feedback loops, this will attempt to automatically open the newly
built documentation static HTML in your browser.:judge: Legal:page_facing_up: Licensecookiecutter-cruft-poetry-tox-pre-commit-ci-cd-instance is licensed under the Apache License, Version 2.0.
SeeLICENSEfor the full license text.:busts_in_silhouette: CreditsThis project was generated from@TeoZosa'scookiecutter-cruft-poetry-tox-pre-commit-ci-cdtemplate.