Skip to main content

Dinkin Flicka: a versatile cookiecutter template for python projects

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cookiecutter_dinkin_flicka-0.1.0.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file cookiecutter_dinkin_flicka-0.1.0.tar.gz.

File metadata

File hashes

Hashes for cookiecutter_dinkin_flicka-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f642ba4158769f25c4da398699c21218a3db798ae6ee0dff289cb4ef0fafc78d
MD5 b97774212cda068cd49f2c051f7ee884
BLAKE2b-256 8c4cec91696c022dccf52c1298a5393d1696d1328cc4a643c63fc55eeb786ce7

See more details on using hashes here.

File details

Details for the file cookiecutter_dinkin_flicka-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for cookiecutter_dinkin_flicka-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 09b49d86926c498bdd30aac20faf1602d189b77de75c5e12b7899f63999886d7
MD5 259b57925eff73a18daba263491a17e3
BLAKE2b-256 991c6628804a460236afbfcfdaa89e59472a95cceaeb9f5b61e777dbad3d549d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page