Skip to content

Commit

Permalink
Merge branch 'main' into nox-task-to-check-linting-files
Browse files Browse the repository at this point in the history
  • Loading branch information
Jannis-Mittenzwei committed Dec 10, 2024
2 parents cafe324 + 1efa3b5 commit 1b19e19
Show file tree
Hide file tree
Showing 17 changed files with 57 additions and 37 deletions.
2 changes: 2 additions & 0 deletions doc/changes/changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

* [unreleased](unreleased.md)
* [0.19.0](changes_0.19.0.md)
* [0.18.0](changes_0.18.0.md)
* [0.17.0](changes_0.17.0.md)
* [0.16.0](changes_0.16.0.md)
Expand All @@ -27,6 +28,7 @@
hidden:
---
unreleased
changes_0.19.0
changes_0.18.0
changes_0.17.0
changes_0.16.0
Expand Down
25 changes: 25 additions & 0 deletions doc/changes/changes_0.19.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# 0.19.0 - 2024-12-05

## 🔧 Changed

* Add `__version__` member to generated `version.py` for compatibility with other versions schemes
* Excluded pyupgrade from project check due to its destructive nature
* Updated cookiecutter template
- removed obsolete template file `version.html`
* Added nox task for format checking
* Updated GitHub workflow and workflow template of `checks.yml` to include format check

## 🐞 Fixed

* Fixed whitespace and final newline behavior in `release:prepare` to work well with `trailing whitespace` commit hook
* Fixed syntax error in the `check.yml` template which resulted in an invalid workflow file
* Fixed context forwarding to plugins hooking into `pre` and `post` integration test hooks
- `pre_integration_tests_hook(self, session, config, context)`
- `post_integration_tests_hook(self, session, config, context)`

## 📚 Documentation

* Fixed various documentation typos
* Added a toolbox migration guide
* Fixed version information in GitHub Actions reference
* Updated the `pre-commit` related documentation
17 changes: 1 addition & 16 deletions doc/changes/unreleased.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,5 @@
# Unreleased

## 🔧 Changed

* Excluded pyupgrade from project check due to its destructive nature
* Updated cookiecutter template
- removed obsolete template file `version.html`
* Added nox task for format checking
* Updated GitHub workflow and workflow template of `checks.yml` to include format check

## 🐞 Fixed

* Fixed syntax error in the `check.yml` template which resulted in an invalid workflow file

## 📚 Documentation

* Fixed various documentation typos
* Added a toolbox migration guide
* Fixed version information in GitHub Actions reference
* Updated the `pre-commit` related documentation
* Added multi-version extension to Sphinx configuration of the project template
4 changes: 2 additions & 2 deletions exasol/toolbox/nox/_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ def _integration_tests(
pm = NoxTasks.plugin_manager(config)

# run pre integration test plugins
pm.hook.pre_integration_tests_hook(session=session, config=config, context={})
pm.hook.pre_integration_tests_hook(session=session, config=config, context=context)

# run
command = _test_command(config.root / "test" / "integration", config, context)
session.run(*command)

# run post integration test plugins
pm.hook.post_integration_tests_hook(session=session, config=config, context={})
pm.hook.post_integration_tests_hook(session=session, config=config, context=context)


def _pass(
Expand Down
1 change: 1 addition & 0 deletions exasol/toolbox/pre_commit_hooks/package_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
MINOR = {minor}
PATCH = {patch}
VERSION = f"{{MAJOR}}.{{MINOR}}.{{PATCH}}"
__version__ = VERSION
''') + "\n"
# fmt: on

Expand Down
1 change: 1 addition & 0 deletions exasol/toolbox/release/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ def extract_release_notes(file: str | Path) -> str:
lines = f.readlines()[1:]
content = "".join(lines)
content = cleandoc(content)
content += "\n"
return content


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@0.18.0
uses: exasol/python-toolbox/.github/actions/python-environment@0.19.0

- name: Build Artifacts
run: poetry build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@0.18.0
uses: exasol/python-toolbox/.github/actions/python-environment@0.19.0

- name: Check Tag Version
# make sure the pushed/created tag matched the project version
Expand Down
14 changes: 7 additions & 7 deletions exasol/toolbox/templates/github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
fetch-depth: 0

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@0.18.0
uses: exasol/python-toolbox/.github/actions/python-environment@0.19.0

- name: Check Version(s)
run: |
Expand All @@ -40,7 +40,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@0.18.0
uses: exasol/python-toolbox/.github/actions/python-environment@0.19.0

- name: Build Documentation
run: |
Expand All @@ -60,7 +60,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@0.18.0
uses: exasol/python-toolbox/.github/actions/python-environment@0.19.0
with:
python-version: ${{ matrix.python-version }}

Expand Down Expand Up @@ -88,7 +88,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@0.18.0
uses: exasol/python-toolbox/.github/actions/python-environment@0.19.0
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -109,7 +109,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@0.18.0
uses: exasol/python-toolbox/.github/actions/python-environment@0.19.0
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -132,7 +132,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@0.18.0
uses: exasol/python-toolbox/.github/actions/python-environment@0.19.0
with:
python-version: "3.9"
- name: Run format check
Expand All @@ -155,7 +155,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@0.18.0
uses: exasol/python-toolbox/.github/actions/python-environment@0.19.0
with:
python-version: ${{ matrix.python-version }}

Expand Down
4 changes: 2 additions & 2 deletions exasol/toolbox/templates/github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Publish Documentation

on:
on:
workflow_call:
workflow_dispatch:

Expand All @@ -16,7 +16,7 @@ jobs:
fetch-depth: 0

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@0.18.0
uses: exasol/python-toolbox/.github/actions/python-environment@0.19.0

- name: Build Documentation
run: |
Expand Down
2 changes: 1 addition & 1 deletion exasol/toolbox/templates/github/workflows/report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
fetch-depth: 0

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@0.18.0
uses: exasol/python-toolbox/.github/actions/python-environment@0.19.0

- name: Download Artifacts
uses: actions/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion exasol/toolbox/templates/github/workflows/slow-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@0.18.0
uses: exasol/python-toolbox/.github/actions/python-environment@0.19.0
with:
python-version: ${{ matrix.python-version }}

Expand Down
3 changes: 2 additions & 1 deletion exasol/toolbox/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# Do not edit this file manually!
# If you need to change the version, do so in the project.toml, e.g. by using `poetry version X.Y.Z`.
MAJOR = 0
MINOR = 18
MINOR = 19
PATCH = 0
VERSION = f"{MAJOR}.{MINOR}.{PATCH}"
__version__ = VERSION
1 change: 1 addition & 0 deletions project-template/{{cookiecutter.repo_name}}/doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"sphinx_copybutton",
"myst_parser",
"sphinx_design",
"exasol.toolbox.sphinx.multiversion",
]

intersphinx_mapping = {"python": ("https://docs.python.org/3", None)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
MINOR = 1
PATCH = 0
VERSION = f"{MAJOR}.{MINOR}.{PATCH}"
__version__ = VERSION
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "exasol-toolbox"
packages = [
{ include = "exasol" },
]
version = "0.18.0"
version = "0.19.0"
description = "Your one-stop solution for managing all standard tasks and core workflows of your Python project."
authors = [
"Nicola Coretti <[email protected]>"
Expand Down
11 changes: 7 additions & 4 deletions test/unit/release_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def test_version_from_poetry(poetry_version, version, expected):
Version(0, 1, 0),
cleandoc(
"""
## Added
## Added
* Some great feature
## Refactored
Expand All @@ -88,7 +88,7 @@ def test_version_from_poetry(poetry_version, version, expected):
"""
# 0.1.0 - 2024-02-07
## Added
## Added
* Some great feature
## Refactored
Expand Down Expand Up @@ -126,8 +126,9 @@ def unreleased_md(tmp_path):


def test_extract_release_notes(unreleased_md):
expected = cleandoc(
"""
expected = (
cleandoc(
"""
## ✨ Added
* Added Awesome feature
Expand All @@ -137,6 +138,8 @@ def test_extract_release_notes(unreleased_md):
## 🐞 Fixed
* Fixed nasty bug
"""
)
+ "\n"
)
actual = extract_release_notes(unreleased_md)
assert expected == actual

0 comments on commit 1b19e19

Please sign in to comment.