Skip to content

luizdesuo/cookiecutter-dinkin-flicka

Repository files navigation

Dinkin Flicka

a versatile cookiecutter template for python projects

PyPI Status Python Version License

Read the documentation at https://cookiecutter-dinkin-flicka.readthedocs.io/ Release Codecov

pre-commit Black

logo

Installation

  1. Install cookiecutter:

    pip install cookiecutter
  2. Generate a Python package structure using cookiecutter-dinkin-flicka:

    cookiecutter https://github.com/luizdesuo/cookiecutter-dinkin-flicka.git

Usage

Enter the settings:

  • project_name
  • friendly_name
  • package_short_description
  • python_version
  • package_version
  • copyright_year
  • author
  • email
  • github_user
  • license
    1. MIT
    2. Apache License 2.0
    3. GNU General Public License v3.0
    4. BSD 3-Clause
    5. Proprietary
    6. None
  • development_status
    1. Development Status :: 1 - Planning
    2. Development Status :: 2 - Pre-Alpha
    3. Development Status :: 3 - Alpha
    4. Development Status :: 4 - Beta
    5. Development Status :: 5 - Production/Stable
    6. Development Status :: 6 - Mature
    7. Development Status :: 7 - Inactive
    8. None
  • data_version_control: include dvc, pandas, pyjanitor and pandera
    1. false
    2. true
  • defensive_programming: include icontract, hypothesis, icontract-hypothesis
    1. false
    2. trueee
  • publish: include pypi and testpypi publishing into github workflow in addition to readthedocs mentions into documentation
    1. false
    2. true

The project structure will look similar to that shown below:

    project-name
    ├── bandit.yml
    ├── codecov.yml
    ├── CODE_OF_CONDUCT.md
    ├── CONTRIBUTING.md
    ├── .cookiecutter.json
    ├── .darglint
    ├── docs
    │   ├── codeofconduct.md
    │   ├── conf.py
    │   ├── contributing.md
    │   ├── index.md
    │   ├── license.md
    │   ├── requirements.txt
    │   └── usage.md
    ├── .editorconfig
    ├── .flake8
    ├── .gitattributes
    ├── .github
    │   ├── dependabot.yml
    │   └── workflows
    │       └── release.yml
    ├── .gitignore
    ├── LICENSE
    ├── noxfile.py
    ├── .pre-commit-config.yaml
    ├── pyproject.toml
    ├── README.md
    ├── .readthedocs.yml
    ├── src
    │   └── project_name
    │       ├── __init__.py
    │       ├── __main__.py
    │       ├── project_name.py
    │       └── py.typed
    └── tests
        ├── __init__.py
        ├── test_main.py
        └── test_project_name.py

After changing directory to project-name folder, install the project with:

poetry install

Start version control tracking:

git init
git add .
git commit -m "initial package setup"

Install the pre-commit hooks:

poetry run pre-commit install

Update the pre-commit hooks' versions:

poetry run pre-commit autoupdate

Finally, add to version control:

git add .pre-commit-config.yaml

And, commit:

git commit -m "build: update pre-commit hooks versions"

Automatic release

Setting on github:


    graph LR
        A[Settings] --> B[Actions]
        B --> C[General]
        C --> D[Workflow<br>permissions]
        D --> E[Read and write<br>permissions]
        E --> F[Save]

The python-semantic-release tool do the automated bumping based on the angular commit style

  • build/chore: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
  • ci: Changes to our CI configuration files and scripts (examples: CircleCi, SauceLabs)
  • docs: Documentation only changes
  • feat: A new feature
  • fix: A bug fix
  • perf: A code change that improves performance
  • refactor: A code change that neither fixes a bug nor adds a feature
  • test: Adding missing tests or correcting existing tests

Features

  • pre-commit hooks:
    • bandit
    • darglint
    • pycln
    • check-added-large-files
    • check-ast
    • check-byte-order-marker
    • check-builtin-literals
    • check-case-conflict
    • check-docstring-first
    • check-json
    • check-merge-conflict
    • check-symlinks
    • check-toml
    • check-vcs-permalinks
    • check-xml
    • check-yaml
    • debug-statements
    • destroyed-symlinks
    • detect-private-key
    • end-of-file-fixer
    • file-contents-sorter
    • fix-byte-order-marker
    • fix-encoding-pragma
    • forbid-new-submodules
    • mixed-line-ending
    • requirements-txt-fixer
    • sort-simple-yaml
    • trailing-whitespace
    • prettier
    • pyupgrade
    • isort
    • docformatter
    • black
    • blacken-docs
    • flake8
      • flake8-bugbear
      • flake8-docstrings
      • flake8-rst-docstrings
      • pep8-naming
    • mypy
  • click
  • python-semantic-release
  • nox
  • pytest
  • pytest-cov
  • safety
  • typeguard
  • xdoctest
  • pygments
  • jupyter
  • myst-parser
  • sphinx-autobuild
  • sphinx-autoapi
  • sphinx-copybutton
  • furo
  • sphinx-click
  • sphinx
  • sphinxcontrib-mermaid

Contributing

Contributions are very welcome. To learn more, see the Contributor Guide.

License

Distributed under the terms of the MIT license, Dinkin Flicka is free and open source software.

Issues

If you encounter any problems, please file an issue along with a detailed description.

Credits

This project was generated from Dinkin Flicka Cookiecutter template.

Acknowledgements

Dinkin Flicka Cookiecutter was based on Hypermodern Python article series and Python Packages book.

About

a versatile cookiecutter template for python projects

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages