From 6926f91024abf75913c46ab01e733392efd13788 Mon Sep 17 00:00:00 2001 From: dornech Date: Wed, 11 Dec 2024 21:33:35 +0100 Subject: [PATCH] Test Versioning Signed-off-by: dornech --- .changelog-config.yaml | 123 +++++++++++++++++ .github/workflows/build.yml | 52 +++++-- .github/workflows/documentation.yml | 2 +- .github/workflows/draft.yml | 2 +- .github/workflows/labeler.yml | 4 +- .github/workflows/tests.yml | 2 +- CHANGELOG.md | 203 +++++++++++++++++++++++++++- pyproject.toml | 2 +- src/pytestdornech/__init__.py | 2 +- 9 files changed, 372 insertions(+), 20 deletions(-) create mode 100644 .changelog-config.yaml diff --git a/.changelog-config.yaml b/.changelog-config.yaml new file mode 100644 index 0000000..63d980b --- /dev/null +++ b/.changelog-config.yaml @@ -0,0 +1,123 @@ +# For more configuration information, please see https://callowayproject.github.io/generate-changelog/ + +# User variables for reference in other parts of the configuration. +variables: + changelog_filename: CHANGELOG.md + +# Pipeline to find the most recent tag for incremental changelog generation. +# Leave empty to always start at first commit. +starting_tag_pipeline: + - action: ReadFile + kwargs: + filename: '{{ changelog_filename }}' + - action: FirstRegExMatch + kwargs: + pattern: (?im)^## (?P\d+\.\d+(?:\.\d+)?)\s+\(\d+-\d{2}-\d{2}\)$ + named_subgroup: rev + +# Used as the version title of the changes since the last valid tag. +unreleased_label: Unreleased + +# Process the commit's first line for use in the changelog. +summary_pipeline: + - action: strip_spaces + - action: Strip + comment: Get rid of any periods so we don't get double periods + kwargs: + chars: . + - action: SetDefault + args: + - no commit message + - action: capitalize + - action: append_dot + +# Process the commit's body for use in the changelog. +body_pipeline: + - action: ParseTrailers + comment: Parse the trailers into metadata. + kwargs: + commit_metadata: save_commit_metadata + +# Process and store the full or partial changelog. +output_pipeline: + - action: IncrementalFileInsert + kwargs: + filename: '{{ changelog_filename }}' + last_heading_pattern: (?im)^## \d+\.\d+(?:\.\d+)?\s+\([0-9]+-[0-9]{2}-[0-9]{2}\)$ + +# Full or relative paths to look for output generation templates. +template_dirs: + - .github/changelog_templates/ + +# Group the commits within a version by these commit attributes. +group_by: + - metadata.category + +# Only tags matching this regular expression are used for the changelog. +# tag_pattern: ^[0-9]+\.[0-9]+(?:\.[0-9]+)?$ +# tag_pattern: ^v[0-9]+\.[0-9]+(?:\.[0-9]+)?$ +# Version tags RegEx from https://regex101.com/r/vkijKf/1/ preceeded by v +tag_pattern: ^(v0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$ + +# Tells ``git-log`` whether to include merge commits in the log. +include_merges: true + +# Ignore commits whose summary line matches any of these regular expression patterns. +ignore_patterns: + - '[@!]minor' + - '[@!]cosmetic' + - '[@!]refactor' + - '[@!]wip' + - ^$ + - ^Merge branch + - ^Merge pull + +# Set the commit's category metadata to the first classifier that returns ``True``. +commit_classifiers: + - action: SummaryRegexMatch + category: New + kwargs: + pattern: (?i)^(?:new|add)[^\n]*$ + - action: SummaryRegexMatch + category: Updates + kwargs: + pattern: (?i)^(?:update|change|rename|remove|delete|improve|refactor|chg|modif)[^\n]*$ + - action: SummaryRegexMatch + category: Fixes + kwargs: + pattern: (?i)^(?:fix)[^\n]*$ + - action: + category: Other + +# Tokens in git commit trailers that indicate authorship. +valid_author_tokens: + - author + - based-on-a-patch-by + - based-on-patch-by + - co-authored-by + - co-committed-by + - contributions-by + - from + - helped-by + - improved-by + - original-patch-by + +# Rules applied to commits to determine the type of release to suggest. +release_hint_rules: + - match_result: dev + branch: ^((?!master|main).)*$ + - match_result: patch + grouping: Other + branch: master|main + - match_result: patch + grouping: Fixes + branch: master|main + - match_result: minor + grouping: Updates + branch: master|main + - match_result: minor + grouping: New + branch: master|main + - match_result: major + grouping: Breaking Changes + branch: master|main diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 71b9a12..8b6b630 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,7 +4,7 @@ on: [ push, pull_request ] jobs: - dump-contexts: + dump-context: runs-on: ubuntu-latest steps: - name: Dump context "GitHub" @@ -14,10 +14,6 @@ jobs: build-test: runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ ubuntu-latest ] - python_version: [ '3.x' ] if: startsWith(github.ref, 'refs/tags/') steps: - name: Check out the repository @@ -25,7 +21,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: ${{ matrix.python_version }} + python-version: [ '3.x' ] - name: Install dependencies run: | python -m pip install --upgrade pip @@ -67,7 +63,7 @@ jobs: name: python-package-distributions path: dist/ - build-publish-testpypi: + publish-testpypi: runs-on: ubuntu-latest needs: build-distribution environment: @@ -93,7 +89,7 @@ jobs: # user: __token__ # password: ${{ secrets.TEST_PYPI_SECRECT }} - build-publish-pypi: + publish-pypi: runs-on: ubuntu-latest needs: [ build-distribution, build-publish-testpypi ] environment: @@ -110,11 +106,47 @@ jobs: name: python-package-distributions path: dist/ - name: Publish šŸ“¦ to PyPI - # if: startsWith(github.ref, 'refs/heads/main') uses: pypa/gh-action-pypi-publish@release/v1 with: packages-dir: dist/ - # url = "https://upload.pypi.org/legacy/" + # repository-url = "https://upload.pypi.org/legacy/" verbose: true # user: __token__ # password: ${{ secrets.PYPI_SECRECT }} + + github-release: + runs-on: ubuntu-latest + needs: publish-pypi + permissions: + contents: write # IMPORTANT: mandatory for making GitHub Releases + id-token: write # IMPORTANT: mandatory for sigstore + steps: + - name: Download all the dists + uses: actions/download-artifact@v4 + with: + name: python-package-distributions + path: dist/ + - name: Sign the Python šŸ distribution šŸ“¦ with Sigstore + uses: sigstore/gh-action-sigstore-python@v3.0.0 + with: + inputs: >- + ./dist/*.tar.gz + ./dist/*.whl + - name: Create GitHub Release + env: + GITHUB_TOKEN: ${{ github.token }} + run: >- + gh release create + '${{ github.ref_name }}' + --repo '${{ github.repository }}' + --notes "" + - name: Upload artifact signatures to GitHub Release + env: + GITHUB_TOKEN: ${{ github.token }} + # Upload to GitHub Release using the `gh` CLI. + # `dist/` contains the built packages, and the + # sigstore-produced signatures and certificates. + run: >- + gh release upload + '${{ github.ref_name }}' dist/** + --repo '${{ github.repository }}' diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 4bb777b..048842b 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -23,7 +23,7 @@ defaults: jobs: - dump-contexts: + dump-context: runs-on: ubuntu-latest steps: - name: Dump context "GitHub" diff --git a/.github/workflows/draft.yml b/.github/workflows/draft.yml index 42e3952..faa2711 100644 --- a/.github/workflows/draft.yml +++ b/.github/workflows/draft.yml @@ -7,7 +7,7 @@ on: jobs: - dump-contexts: + dump-context: runs-on: ubuntu-latest steps: - name: Dump context "GitHub" diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 9a90676..b5f7321 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -4,7 +4,6 @@ on: push: branches: - main - - master permissions: actions: read @@ -14,7 +13,7 @@ permissions: jobs: - dump-contexts: + dump-context: runs-on: ubuntu-latest steps: - name: Dump context "GitHub" @@ -31,3 +30,4 @@ jobs: uses: crazy-max/ghaction-github-labeler@v5.0.0 with: skip-delete: true + github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 285ab1a..8c03082 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -14,7 +14,7 @@ defaults: jobs: - dump-contexts: + dump-context: runs-on: ubuntu-latest steps: - name: Dump context "GitHub" diff --git a/CHANGELOG.md b/CHANGELOG.md index cd28ae5..0ef11f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,203 @@ # Changelog -## Version 0.0.1 (development) +## Unreleased (2024-11-24) -- First pre-alpha -- ... +## v0.0.8 (2024-11-24) + +### Other + +- Test Publishing - build yaml Korrektur /3. + + **signed-off-by:** dornech + +## v0.0.7 (2024-11-24) + +### Other + +- Test Publishing - build yaml Korrektur /2. + + **signed-off-by:** dornech + +## v0.0.6 (2024-11-24) + +### Other + +- Test Publishing - build yaml Korrektur /2. + + **signed-off-by:** dornech + +- Test Publishing - build yaml Korrektur. + + **signed-off-by:** dornech + +## v0.0.4 (2024-11-24) + +### Other + +- Test Publishing - diverses u. a. vcs Änderungen. + + **signed-off-by:** dornech + +## v0.0.3 (2024-11-24) + +### Other + +- Test Publishing - diverses u. a. vcs Änderungen. + + **signed-off-by:** dornech + +## v0.0.2 (2024-11-24) + +### Other + +- Test Publishing - erneute Korrekturen Workflows /2. + + **signed-off-by:** dornech + +- Test Publishing - erneute Korrekturen Workflows. + + **signed-off-by:** dornech + +- Test Publishing - erneute Korrektur Build-Workflow. + + **signed-off-by:** dornech + +- Test Publishing - Korrektur & Überarbeitung Build- und andere Workflows. + + **signed-off-by:** dornech + +- Test Publishing - Korrektur Build-Workflow. + + **signed-off-by:** dornech + +- Test Tagging /2. + + **signed-off-by:** dornech + +- Test Tagging. + + **signed-off-by:** dornech + +- Test Branching. + + **signed-off-by:** dornech + +- Test Branching. + + **signed-off-by:** dornech + +- Test Branching. + + **signed-off-by:** dornech + +- Weitere workflow Korrekturen - Tagtest. + +- Weitere workflow Korrekturen - Trusted Publishing. + +- Weitere workflow Korrekturen - add dumper /2. + +- Weitere workflow Korrekturen - add dumper /2. + +- Weitere workflow Korrekturen - add dumper /2. + +- Weitere workflow Korrekturen - add dumper. + +- Weitere workflow Korrekturen - test. + +- Weitere workflow Korrekturen - test. + +- Weitere workflow Korrekturen /5. + +- Weitere workflow Korrekturen /4. + - build mit coverage +- Weitere workflow Korrekturen /3. + 1. build w/coverage + 2. test +- Weitere workflow Korrekturen /2. + 1. build w/coverage + 2. test +- Weitere workflow Korrekturen. + 1. build w/coverage + 2. test +- Ändern workflow build w/coverage. + +- Ausklammern nicht funktionierender Test. + +- Ausklammern nicht funktionierender Test. + +- Ausklammern nicht funktionierender Test. + +- Back to CodeCov Version 4. + +- Try codecov verison 3. + +- Exclude _version.py form Linting - setting in pyproject.toml. + +- Upload .linkchekerrc da sonst Fehler. + +- Korrekturen zu Python Min-Version - adjust skeleton.py w/verisonsabh. Code. + +- Korrekturen zu Python Min-Version. + - pypproject.toml + - GitHub-Actions +- Korrekturen build.yml wiederholt w codecov-action. + +- Korrekturen labeler.yml. + +- Korrekturen labeler.yml. + +- Korrekturen labeler.yml. + +- Korrekturen w coverage. + +- Korrekturen. + a) skeleton w/verisonabhängigem Code (typing / typing_exetensions) + b) target-version pyproject.toml +- Korrektur wegen Ignorieren nicht-optimierter import. + +- Korrekturen w typing / typing_extensions. + +- Korrekturen w ruff/Gtihub Actions. + +- Korrektur init.py. + +- Bump crazy-max/ghaction-github-labeler from 5.0.0 to 5.1.0. + + Bumps [crazy-max/ghaction-github-labeler](https://github.com/crazy-max/ghaction-github-labeler) from 5.0.0 to 5.1.0. + - [Release notes](https://github.com/crazy-max/ghaction-github-labeler/releases) + - [Commits](https://github.com/crazy-max/ghaction-github-labeler/compare/v5.0.0...v5.1.0) + + --- + **updated-dependencies:** - dependency-name: crazy-max/ghaction-github-labeler +dependency-type: direct:production +update-type: version-update:semver-minor + + **signed-off-by:** dependabot[bot] + +- Bump codecov/codecov-action from 4 to 5. + + Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4 to 5. + - [Release notes](https://github.com/codecov/codecov-action/releases) + - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) + - [Commits](https://github.com/codecov/codecov-action/compare/v4...v5) + + --- + **updated-dependencies:** - dependency-name: codecov/codecov-action +dependency-type: direct:production +update-type: version-update:semver-major + + **signed-off-by:** dependabot[bot] + +- Fehlerkorrektur 3. + - Formatieren _version.py und skeleton.py w/ruff Fehler bei Github-Action + - Anpassung project.toml +- Fehlerkorrektur 2. + +- Fehlerkorrektur. + +- Revert "Initial commit". + + This reverts commit 741ffaa7e1d7a9b42032dfa908cf2e8751941564. +- Initial commit. + +- Initial commit. diff --git a/pyproject.toml b/pyproject.toml index 113ad36..aa0b8f7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,7 +48,7 @@ fibonacci = "pytestdornech.skeleton:app" [project.urls] # important URLs for this project # ToDo: Modify according to your needs! -Documentation = "https://github.com/dornech/pytestdornech" +Documentation = "https://dornech.github.io/pytestdornech" Source = "https://github.com/dornech/pytestdornech" # Tracker = "https://github.com/dornech/pytestdornech/issues" # Sponsor = "https://github.com/sponsors/dornech" diff --git a/src/pytestdornech/__init__.py b/src/pytestdornech/__init__.py index 2728f01..ed5f2cd 100644 --- a/src/pytestdornech/__init__.py +++ b/src/pytestdornech/__init__.py @@ -3,7 +3,7 @@ Notion-API: https://developers.notion.com/reference/intro """ -# from importlib.metadata import PackageNotFoundError, version +# import # # try: # __version__ = version('pytestdornech')