Skip to content

Commit

Permalink
[NEW] Cookiecutter Python Package v1.0.0 !
Browse files Browse the repository at this point in the history
  • Loading branch information
boromir674 committed May 11, 2022
2 parents 3e47993 + d17ceb6 commit 1a6e96b
Show file tree
Hide file tree
Showing 9 changed files with 136 additions and 74 deletions.
27 changes: 27 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,33 @@
Changelog
=========

1.0.0 (2022-05-11)
==================

Releasing v1.0.0, the first ever v1.* version!
We are confident that the user-facing "interface" of this package is stable
and commit to (continue to) follow `Semantic Versioning`.

As far as changes are concerned, invoking the `project generator`
now adds several new `status badges` in your README, which automatically update based on
their corresponding CI services!

Changes
^^^^^^^

feature
"""""""
- add new status badges and slightly improve content

fix
"""
- clean files and configs

documentation
"""""""""""""
- explain which generated file governs which component (ie ci code, tests code, etc)


0.11.0 (2022-05-11)
===================

Expand Down
25 changes: 14 additions & 11 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,17 @@ It it entirely generated using this **Python Package Template:**
Generated Python Package Features
---------------------------------

1. **Test Suite** using `pytest`_
1. **Test Suite**, using `pytest`_, located in `tests`_ dir
2. **Parallel Execution** of Unit Tests, on multiple cpu's
3. **Automation**, using `tox`_
3. **Documentation Pages**, hosted on `readthedocs` server, located in `docs`_ dir
4. **Automation**, using `tox`_, driven by single `tox.ini`_ file

a. **Code Coverage** measuring
b. **Build Command**, using the `build`_ python package
c. **Pypi Deploy Command**, supporting upload to both `pypi.org`_ and `test.pypi.org`_ servers
d. **Type Check Command**, using `mypy`_
e. **Lint** *Check* and `Apply` commands, using `isort`_ and `black`_
4. **CI Pipeline**, running on `Github Actions`_
5. **CI Pipeline**, running on `Github Actions`_, defined in `.github/`_

a. **Job Matrix**, spanning different `platform`'s and `python version`'s

Expand Down Expand Up @@ -158,23 +159,25 @@ For more complex use cases, you can modify the Template and also leverage all of

.. BADGE ALIASES
.. Test Workflow Status on Github Actions for specific branch <branch>
.. Build Status
.. Github Actions: Test Workflow Status for specific branch <branch>
.. |build| image:: https://img.shields.io/github/workflow/status/boromir674/cookiecutter-python-package/Test%20Python%20Package/master?label=build&logo=github-actions&logoColor=%233392FF
:alt: GitHub Workflow Status (branch)
:target: https://github.com/boromir674/cookiecutter-python-package/actions/workflows/test.yaml?query=branch%3Amaster

.. Code Coverage
.. Codecov CI

.. |coverage| image:: https://img.shields.io/codecov/c/github/boromir674/cookiecutter-python-package/master?logo=codecov
:alt: Codecov
:target: https://app.codecov.io/gh/boromir674/cookiecutter-python-package
.. Documentation
.. |docs| image:: https://img.shields.io/readthedocs/python-package-generator/master?logo=readthedocs&logoColor=lightblue
:alt: Read the Docs (version)
:target: https://python-package-generator.readthedocs.io/en/master/

.. Code Coverage
.. |coverage| image:: https://img.shields.io/codecov/c/github/boromir674/cookiecutter-python-package/master?logo=codecov
:alt: Codecov
:target: https://app.codecov.io/gh/boromir674/cookiecutter-python-package

.. PyPI
Expand All @@ -193,9 +196,9 @@ For more complex use cases, you can modify the Template and also leverage all of

.. Github Releases & Tags
.. |commits_since_specific_tag_on_master| image:: https://img.shields.io/github/commits-since/boromir674/cookiecutter-python-package/v0.11.0/master?color=blue&logo=github
.. |commits_since_specific_tag_on_master| image:: https://img.shields.io/github/commits-since/boromir674/cookiecutter-python-package/v1.0.0/master?color=blue&logo=github
:alt: GitHub commits since tagged version (branch)
:target: https://github.com/boromir674/cookiecutter-python-package/compare/v0.11.0..master
:target: https://github.com/boromir674/cookiecutter-python-package/compare/v1.0.0..master

.. |commits_since_latest_github_release| image:: https://img.shields.io/github/commits-since/boromir674/cookiecutter-python-package/latest?color=blue&logo=semver&sort=semver
:alt: GitHub commits since latest release (by SemVer)
Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[metadata]
## Setuptools specific information
name = cookiecutter_python
version = 0.11.0
version = 1.0.0
# renders on pypi as subtitle
description = Yet another modern Python Package (pypi) with emphasis in CI/CD and automation
long_description = file: README.rst
Expand All @@ -15,7 +15,7 @@ author_email = [email protected]
# represents the web home page of the project
url = https://github.com/boromir674/cookiecutter-python-package

download_url = https://github.com/boromir674/cookiecutter-python-package/archive/v0.11.0.tar.gz
download_url = https://github.com/boromir674/cookiecutter-python-package/archive/v1.0.0.tar.gz

## PyPi specific information
project_urls =
Expand Down
2 changes: 1 addition & 1 deletion src/cookiecutter_python/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.11.0'
__version__ = '1.0.0'
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,15 @@ ignore-paths:
- docs
ignore-patterns:
- (^|/)skip(this)?(/|$)
- tests/test_commands.py
- tests/test_mediator.py
- tests/test_notification.py
- tests/test_phi.py
autodetect: false
max-line-length: 120
max-line-length: 95


# TOOLS

pyflakes:
run: true
disable:
- F403
- F810


pyroma:
run: true
Expand All @@ -38,41 +34,26 @@ mccabe:
options:
max-complexity: 12


# INACTIVE

pylint:
run: false

bandit:
run: false
options:
config: bandit.yml

frosted:
run: false
disable:
- E103
- E306

pep8:
run: false
disable:
- W602
- W603
enable:
- W601
options:
max-line-length: 79

pep257:
run: false
disable:
- D100
- D101

mypy:
run: false
options:
ignore-missing-imports: true
follow-imports: skip

vulture:
run: false
110 changes: 85 additions & 25 deletions src/cookiecutter_python/{{ cookiecutter.project_slug }}/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,41 @@

.. start-badges
| |build| |release_version| |wheel| |supported_versions| |gh-lic| |commits_since_specific_tag_on_master| |commits_since_latest_github_release|
| |build| |docs| |coverage| |maintainability| |better_code_hub| |tech-debt|
| |release_version| |wheel| |supported_versions| |gh-lic| |commits_since_specific_tag_on_master| |commits_since_latest_github_release|

|
| **Source Code:** https://github.com/{{ cookiecutter.github_username }}/{{ cookiecutter.repo_name }}
| **Pypi Package:** https://pypi.org/project/{{ cookiecutter.pkg_name }}/
|
| **Code:** https://github.com/{{ cookiecutter.github_username }}/{{ cookiecutter.repo_name }}
| **Docs:** https://{{ cookiecutter.repo_name }}.readthedocs.io/en/master/
| **PyPI:** https://pypi.org/project/{{ cookiecutter.pkg_name|replace('_', '-') }}/
| **CI:** https://github.com/{{ cookiecutter.github_username }}/{{ cookiecutter.repo_name }}/actions/

Features
========


1. **{{ cookiecutter.pkg_name }}** `python package`

a. TODO **Great Feature**
b. TODO **Nice Feature**
a. TODO Document a **Great Feature**
b. TODO Document another **Nice Feature**
2. Tested against multiple `platforms` and `python` versions


Development
-----------
Here are some useful notes related to doing development on this project.

2. **Test Suite** using `Pytest`
3. **Parallel Execution** of Unit Tests, on multiple cpu's
4. **Automation**, using `tox`
1. **Test Suite**, using `pytest`_, located in `tests`_ dir
2. **Parallel Execution** of Unit Tests, on multiple cpu's
3. **Documentation Pages**, hosted on `readthedocs` server, located in `docs`_ dir
4. **Automation**, using `tox`_, driven by single `tox.ini`_ file

a. **Code Coverage** measuring
b. **Build Command**, using the `build` python package
c. **Pypi Deploy Command**, supporting upload to both `pypi.org` and `test.pypi.org` servers
d. **Type Check Command**, using `mypy`
b. **Build Command**, using the `build`_ python package
c. **Pypi Deploy Command**, supporting upload to both `pypi.org`_ and `test.pypi.org`_ servers
d. **Type Check Command**, using `mypy`_
e. **Lint** *Check* and `Apply` commands, using `isort`_ and `black`_
5. **CI Pipeline**, running on `Github Actions`
5. **CI Pipeline**, running on `Github Actions`_, defined in `.github/`_

a. **Job Matrix**, spanning different `platform`'s and `python version`'s

Expand All @@ -55,7 +62,7 @@ Using `pip` is the approved way for installing `{{ cookiecutter.pkg_name }}`.
python3 -m pip install {{ cookiecutter.pkg_name }}
TODO demonstrate a use case
TODO Document a use case


License
Expand All @@ -72,17 +79,53 @@ License
* Free software: GNU Affero General Public License v3.0


.. MACROS/ALIASES

.. start-badges
.. LINKS
.. _tox: https://tox.wiki/en/latest/

.. _pytest: https://docs.pytest.org/en/7.1.x/

.. _build: https://github.com/pypa/build

.. _pypi.org: https://pypi.org/

.. _test.pypi.org: https://test.pypi.org/

.. _mypy: https://mypy.readthedocs.io/en/stable/

.. _isort: https://pycqa.github.io/isort/

.. _black: https://black.readthedocs.io/en/stable/

.. _Github Actions: https://github.com/{{ cookiecutter.github_username }}/{{ cookiecutter.repo_name }}/actions

.. Test Workflow Status on Github Actions for specific branch <branch>
.. _GNU Affero General Public License v3.0: https://github.com/{{ cookiecutter.github_username }}/{{ cookiecutter.repo_name }}/blob/master/LICENSE


.. BADGE ALIASES
.. Build Status
.. Github Actions: Test Workflow Status for specific branch <branch>
.. |build| image:: https://img.shields.io/github/workflow/status/{{ cookiecutter.github_username }}/{{ cookiecutter.repo_name }}/Test%20Python%20Package/master?label=build&logo=github-actions&logoColor=%233392FF
:alt: GitHub Workflow Status (branch)
:target: https://github.com/{{ cookiecutter.github_username }}/{{ cookiecutter.repo_name }}/actions/workflows/test.yaml?query=branch%3Amaster

.. above url to workflow runs, filtered by the specified branch

.. Documentation
.. |docs| image:: https://img.shields.io/readthedocs/python-package-generator/master?logo=readthedocs&logoColor=lightblue
:alt: Read the Docs (version)
:target: https://python-package-generator.readthedocs.io/en/master/

.. Code Coverage
.. |coverage| image:: https://img.shields.io/codecov/c/github/boromir674/cookiecutter-python-package/master?logo=codecov
:alt: Codecov
:target: https://app.codecov.io/gh/boromir674/cookiecutter-python-package

..PyPI

.. |release_version| image:: https://img.shields.io/pypi/v/{{ cookiecutter.pkg_name }}
:alt: Production Version
Expand All @@ -96,23 +139,40 @@ License
:alt: Supported Python versions
:target: https://pypi.org/project/{{ cookiecutter.pkg_name }}

.. Github Releases & Tags
.. |commits_since_specific_tag_on_master| image:: https://img.shields.io/github/commits-since/{{ cookiecutter.github_username }}/{{ cookiecutter.repo_name }}/v{{ cookiecutter.version }}/master?color=blue&logo=github
:alt: GitHub commits since tagged version (branch)
:target: https://github.com/{{ cookiecutter.github_username }}/{{ cookiecutter.repo_name }}/compare/v{{ cookiecutter.version }}..master

.. |commits_since_latest_github_release| image:: https://img.shields.io/github/commits-since/{{ cookiecutter.github_username }}/{{ cookiecutter.repo_name }}/latest?color=blue&logo=semver&sort=semver
:alt: GitHub commits since latest release (by SemVer)

.. Github License (eg AGPL, MIT)
.. LICENSE (eg AGPL, MIT)
.. Github License
.. |gh-lic| image:: https://img.shields.io/github/license/{{ cookiecutter.github_username }}/{{ cookiecutter.repo_name }}
:alt: GitHub
:target: https://github.com/{{ cookiecutter.github_username }}/{{ cookiecutter.repo_name }}/blob/master/LICENSE


.. LINKS
.. CODE QUALITY
.. _GNU Affero General Public License v3.0: https://github.com/{{ cookiecutter.github_username }}/{{ cookiecutter.repo_name }}/blob/master/LICENSE
.. Better Code Hub
.. Software Design Patterns
.. _isort: https://pycqa.github.io/isort/
.. |better_code_hub| image:: https://bettercodehub.com/edge/badge/boromir674/cookiecutter-python-package?branch=master
:alt: Better Code Hub
:target: https://bettercodehub.com/

.. _black: https://black.readthedocs.io/en/stable/

.. Code Climate CI
.. Code maintainability & Technical Debt
.. |maintainability| image:: https://img.shields.io/codeclimate/maintainability/boromir674/biskotaki
:alt: Code Climate Maintainability
:target: https://codeclimate.com/github/boromir674/cookiecutter-python-package/maintainability

.. |tech-debt| image:: https://img.shields.io/codeclimate/tech-debt/boromir674/cookiecutter-python-package
:alt: Technical Debt
:target: https://codeclimate.com/github/boromir674/cookiecutter-python-package/maintainability
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
requires = ["setuptools >= 40.6.0", "wheel"]
build-backend = "setuptools.build_meta"

# TODO switch setuptools build backend to something like 'poetry' or 'build'



# TOOLS

Expand Down

This file was deleted.

This file was deleted.

0 comments on commit 1a6e96b

Please sign in to comment.