Skip to content

Commit b204de3

Browse files
authored
[NEW] Py Pkg Gen v2.4.0 Release
Release Version '' into 'master' Branch
2 parents 1ebe0b2 + 65b54ab commit b204de3

File tree

11 files changed

+95
-30
lines changed

11 files changed

+95
-30
lines changed

.github/workflows/generate.yaml

Lines changed: 51 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,14 @@ jobs:
4646
cd cloned/biskotaki
4747
echo "PKG_VERSION=$(python scripts/parse_version.py)" >> $GITHUB_ENV
4848
49+
# INSTALL `generate-python` CLI
50+
- name: Install `generate-python` CLI
51+
run: pip install --user -e .
52+
4953
## GENERATE FROM TEMPLATE into gen/ ##
5054
# ROOT : gen/biskotaki/pyproject.toml
5155
- name: Generate Biskotaki from Template
5256
run: |
53-
pip install --user -e .
5457
echo " version: \"${{ env.PKG_VERSION }}\"" >> .github/biskotaki.yaml
5558
generate-python -o gen --config-file ./.github/biskotaki.yaml --no-input -f --offline
5659
@@ -67,8 +70,8 @@ jobs:
6770
- name: Test distributions 'Source', 'Built' and 'edit' (dev env) mode installation
6871
env:
6972
TOXPYTHON: "python${{ env.PY_VERSION }}"
73+
working-directory: gen/biskotaki
7074
run: |
71-
cd gen/biskotaki
7275
tox -e 'edit,sdist,wheel'
7376
tox -e wheel-test
7477
tox -e coverage
@@ -77,30 +80,38 @@ jobs:
7780

7881
# Running Type Check, on src and Test code: Passes
7982
- name: 'Mypy: Static Type Checker -> PASS'
83+
working-directory: gen/biskotaki
8084
run: |
81-
cd gen/biskotaki
8285
tox -e pin-deps -- -E typing
8386
tox -e type
8487
8588
- name: 'Ruff: Fast Python Linter -> PASS'
86-
run: |
87-
cd gen/biskotaki
88-
tox -e ruff
89+
working-directory: gen/biskotaki
90+
run: tox -e ruff
91+
8992
# Running Lint Check, on src and Test code: Passes
9093
- name: 'Isort, Black: Code Formatter -> PASS'
91-
run: |
92-
cd gen/biskotaki
93-
tox -e lint
94+
working-directory: gen/biskotaki
95+
run: tox -e lint
9496
# Running the Build script (sdist and wheel): produces Distro Artifacts: Source (.tar.gz) and Wheel (.whl) files
9597
- name: 'Build: sdist, wheel -> PASS'
96-
run: |
97-
cd gen/biskotaki
98-
tox -e build
98+
working-directory: gen/biskotaki
99+
run: tox -e build
99100
# Running Quality Checks against Distro Metadata: Passes with 10/10 score
100101
- name: 'Pyroma: Distro Quality -> PASS'
102+
working-directory: gen/biskotaki
103+
run: tox -e check
104+
105+
# Docs Checks: Run Build Docs command, and verify it succeeds
106+
- name: 'Sphinx: Build Docs Web Site (html/css/js) -> PASS'
107+
working-directory: gen/biskotaki
101108
run: |
102-
cd gen/biskotaki
103-
tox -e check
109+
tox -e pin-deps -- -E docs # poetry export
110+
tox -e docs
111+
112+
- name: Remove requirements file generated with 'poetry export' for Docs
113+
# See tox.ini -> testenv.setenv.DEFAULT_REQS_FILE
114+
run: rm -f gen/biskotaki/reqs.txt
104115

105116
# tox -e graphs
106117

@@ -120,15 +131,39 @@ jobs:
120131
target-branch: ${{ env.branch }}
121132
commit-message: 'apply Template from https://github.com/boromir674/cookiecutter-python-package'
122133

123-
## GENERATE Python Gold Standard FROM TEMPLATE into gen/ ##
124-
# ROOT : gen/biskotaki/pyproject.toml
134+
## GENERATE Python GOLD STANDARD from TEMPLATE into gen/ ##
135+
# ROOT : gen-gold/biskotaki-gold-standard/pyproject.toml
125136
- name: Generate Python Gold Standard Biskotaki from Template
126137
env:
127138
USER_CONFIG: tests/data/gold-standard.yml
128139
run: |
129140
echo " version: \"${{ env.PKG_VERSION }}\"" >> ${{ env.USER_CONFIG }}
130141
generate-python -o gen-gold --config-file "${{ env.USER_CONFIG }}" --no-input -f --offline
131142
143+
# Generate poetry.lock to include in the Pushed Files
144+
- name: Generate Poetry.lock
145+
run: |
146+
pip install pipx
147+
pipx install poetry
148+
poetry lock
149+
working-directory: gen-gold/biskotaki-gold-standard
150+
151+
## MKDOCS Checks: Run Build Docs command, and verify it succeeds ##
152+
- name: 'Mkdocs: Build Docs Web Site (html/css/js) -> PASS'
153+
working-directory: gen-gold/biskotaki-gold-standard
154+
run: |
155+
tox -e pin-deps -- -E docs # poetry export
156+
tox -e docs
157+
158+
# exlude 'site' dir from pushing to biskotaki repo
159+
- name: Exclude 'site' folder, built with Mkdocs, from 'git push'
160+
run: rm -rf gen-gold/biskotaki-gold-standard/site
161+
162+
# exlude 'reqs.txt' file, generated with 'poetry export' for Docs
163+
- name: Exclude 'reqs.txt' file, generated with 'poetry export' for Docs
164+
# See tox.ini -> testenv.setenv.DEFAULT_REQS_FILE
165+
run: rm -f gen-gold/biskotaki-gold-standard/reqs.txt
166+
132167
## PUSH the Python Gold Standard to BISKOTAKI REPO ##
133168
- name: Push to dedicated branch in biskotaki repo
134169
# Pin to v1.7.2 -> 07c4d7b3def0a8ebe788a8f2c843a4e1de4f6900

.github/workflows/merge-rt-in-release.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ jobs:
4848
fetch-depth: 0 # 0 indicates all history for all branches and tags.
4949
set-safe-directory: '' # `git config --global --add safe.directory <path>`
5050
token: '${{ secrets.GH_TOKEN }}'
51-
51+
# track remote master, since this Workflow triggers on push tag or pull request activity
52+
- name: Track Remote Master
53+
run: git branch --track "${{ env.MAIN_BR }}" "origin/${{ env.MAIN_BR }}"
54+
5255
- name: Ensure Release Branch exists and is rebased on Main Branch, before PR
5356
run: |
5457
(git branch --track "${{ env.RELEASE_BR }}" "origin/${{ env.RELEASE_BR }}" && git rebase ${{ env.MAIN_BR }} && git push) || echo "Branch '${{ env.RELEASE_BR }}' does NOT exist in remote Origin"

CHANGELOG.rst

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,33 @@
22
Changelog
33
=========
44

5+
2.4.0 (2024-03-14)
6+
==================
7+
8+
Changes
9+
^^^^^^^
10+
11+
feature
12+
"""""""
13+
- make Gold Standard Python Project pass Pylint Job on CI
14+
- comment out the 'verbose' cli flag to make pylint score over 8.2 on fresh project
15+
16+
ci
17+
""
18+
- prevent Mkdocs 'site' folder from being pushed to Biskotaki repo, after 'tox -e docs'
19+
- install 'generate-python' CLI in dedicated step
20+
- install pipx and poetry (using pipx)
21+
- run poetry lock and add poetry.lock file in py-gold branch of biskotaki repo
22+
23+
release
24+
"""""""
25+
- bump version to 2.4.0
26+
27+
gitops
28+
""""""
29+
- handle case where the origin/release branch is not found
30+
31+
532
2.3.0 (2024-03-13)
633
==================
734

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,9 @@ Free/Libre and Open Source Software (FLOSS)
275275

276276
.. Github Releases & Tags
277277
278-
.. |commits_since_specific_tag_on_master| image:: https://img.shields.io/github/commits-since/boromir674/cookiecutter-python-package/v2.3.0/master?color=blue&logo=github
278+
.. |commits_since_specific_tag_on_master| image:: https://img.shields.io/github/commits-since/boromir674/cookiecutter-python-package/v2.4.0/master?color=blue&logo=github
279279
:alt: GitHub commits since tagged version (branch)
280-
:target: https://github.com/boromir674/cookiecutter-python-package/compare/v2.3.0..master
280+
:target: https://github.com/boromir674/cookiecutter-python-package/compare/v2.4.0..master
281281

282282
.. |commits_since_latest_github_release| image:: https://img.shields.io/github/commits-since/boromir674/cookiecutter-python-package/latest?color=blue&logo=semver&sort=semver
283283
:alt: GitHub commits since latest release (by SemVer)

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
author = 'Konstantinos Lampridis'
3131

3232
# The full version, including alpha/beta/rc tags
33-
release = '2.3.0'
33+
release = '2.4.0'
3434

3535
# -- General configuration ---------------------------------------------------
3636

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ build-backend = "poetry.core.masonry.api"
1010
## Also renders on pypi as 'subtitle'
1111
[tool.poetry]
1212
name = "cookiecutter_python"
13-
version = "2.3.0"
13+
version = "2.4.0"
1414
description = "1-click Generator of Python Project, from Template with streamlined \"DevOps\" using a powerful CI/CD Pipeline."
1515
authors = ["Konstantinos Lampridis <k.lampridis@hotmail.com>"]
1616
maintainers = ["Konstantinos Lampridis <k.lampridis@hotmail.com>"]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
__version__ = '2.3.0'
1+
__version__ = '2.4.0'
22

33
from . import _logging # noqa

src/cookiecutter_python/{{ cookiecutter.project_slug }}/src/{{ cookiecutter.pkg_name }}/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
from {{ cookiecutter.pkg_name }}.cli import main
1515

1616
if __name__ == "__main__": # pragma: no cover
17-
main(prog_name="{{ cookiecutter.pkg_name|replace('_', '-') }}")
17+
main(prog_name="{{ cookiecutter.pkg_name|replace('_', '-') }}") # pylint: disable=unexpected-keyword-arg

src/cookiecutter_python/{{ cookiecutter.project_slug }}/src/{{ cookiecutter.pkg_name }}/cli.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ def version_msg():
2424

2525
@click.command(context_settings=dict(help_option_names=[u'-h', u'--help']))
2626
@click.version_option(__version__, u'-V', u'--version', message=version_msg())
27-
@click.option('-v', '--verbose', is_flag=True, help='Print debug information', default=False)
27+
# @click.option('-v', '--verbose', is_flag=True, help='Print debug information', default=False)
2828
def main(
29-
verbose,
29+
# verbose,
3030
):
3131
"""TODO Write this content that gets renders when invoking with --help flag!
3232
@@ -39,7 +39,7 @@ def main(
3939
"""
4040
try:
4141
pass
42-
except Exception as error:
42+
except Exception as error: # pylint: disable=broad-except
4343
click.echo(error)
4444
sys.exit(1)
4545

tests/data/snapshots/biskotaki-gold-standard/src/biskotakigold/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
from biskotakigold.cli import main
1515

1616
if __name__ == "__main__": # pragma: no cover
17-
main(prog_name="biskotakigold")
17+
main(prog_name="biskotakigold") # pylint: disable=unexpected-keyword-arg

0 commit comments

Comments
 (0)