Skip to content

Commit

Permalink
v24.10.1
Browse files Browse the repository at this point in the history
  • Loading branch information
GitRon committed Oct 14, 2024
1 parent 7509ab2 commit 7a50c13
Show file tree
Hide file tree
Showing 14 changed files with 61 additions and 28 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ name: Unit tests

on:
push:
branches: [ '**' ]
branches:
- master
pull_request:

jobs:
linting:
Expand Down
23 changes: 17 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.4
rev: v0.6.9
hooks:
# Run the Ruff linter.
- id: ruff
Expand All @@ -12,23 +12,34 @@ repos:
- id: ruff-format

- repo: https://github.com/adamchainz/blacken-docs
rev: 1.18.0
rev: 1.19.0
hooks:
- id: blacken-docs
additional_dependencies:
- black==24.4.2
files: '(?:README\.md|docs\/.*\.(?:md|rst))'

- repo: https://github.com/asottile/pyupgrade
rev: v3.17.0
rev: v3.18.0
hooks:
- id: pyupgrade
args: [ --py38-plus ]
stages: [ push ]
stages: [ pre-push ]

- repo: https://github.com/adamchainz/django-upgrade
rev: 1.21.0
rev: 1.22.1
hooks:
- id: django-upgrade
args: [--target-version, "4.2"]
stages: [ push ]
stages: [ pre-push ]

- repo: https://github.com/adamchainz/djade-pre-commit
rev: 1.3.0
hooks:
- id: djade
args: [--target-version, "4.2"]
exclude: |
(?x)^(
charts/.*
|.*\.py
)$
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

**24.10.1 (2024-10-08)**
* Added Python 3.13 support
* Added Djade linter to pre-commit
* Improved GitHub action triggers
* Updated dev dependencies and linters

**24.9.4 (2024-09-11)**
* Added `lstrip_blocks` to Jinja renderer
* Set package stability to "production"
Expand Down
2 changes: 1 addition & 1 deletion ambient_package_update/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Ambient package update tool for clean and swift maintenance"""

__version__ = "24.9.4"
__version__ = "24.10.1"
15 changes: 8 additions & 7 deletions ambient_package_update/metadata/constants.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
DEV_DEPENDENCIES = [
# Updater
"typer~=0.9",
"typer~=0.12",
# Test runner
"freezegun~=1.3",
"pytest-django~=4.7",
"pytest-mock~=3.12",
"freezegun~=1.5",
"pytest-django~=4.9",
"pytest-mock~=3.14",
"coverage~=7.6",
# Linting
"pre-commit~=3.7",
"ruff~=0.4",
"pre-commit~=4.0",
"ruff~=0.6",
# Documentation
"sphinx~=7.1",
"sphinx-rtd-theme~=2.0",
"m2r2==0.3.3.post2",
"mistune<2.0.0", # fixes a problem mit m2r2
# Release
"flit~=3.9",
"keyring~=25.2",
"keyring~=25.4",
# Build
"ambient-package-update",
]
Expand All @@ -32,6 +32,7 @@
"3.10",
"3.11",
"3.12",
"3.13",
]

LICENSE_MIT = "MIT"
Expand Down
1 change: 1 addition & 0 deletions ambient_package_update/metadata/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class PackageMetadata:
min_coverage: float = 100.0
license: str = LICENSE_MIT
license_year: int = datetime.datetime.now(tz=datetime.UTC).year
main_branch: str = "master"
github_package_name: str = None
module_name: Optional[str] = None
optional_dependencies: dict[str, list[str]] = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ name: Unit tests

on:
push:
branches: [ '**' ]
branches:
- {{ main_branch }}
pull_request:

jobs:
Expand Down
23 changes: 17 additions & 6 deletions ambient_package_update/templates/.pre-commit-config.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.4
rev: v0.6.9
hooks:
# Run the Ruff linter.
- id: ruff
Expand All @@ -12,23 +12,34 @@ repos:
- id: ruff-format

- repo: https://github.com/adamchainz/blacken-docs
rev: 1.18.0
rev: 1.19.0
hooks:
- id: blacken-docs
additional_dependencies:
- black==24.4.2
files: '(?:README\.md|docs\/.*\.(?:md|rst))'

- repo: https://github.com/asottile/pyupgrade
rev: v3.17.0
rev: v3.18.0
hooks:
- id: pyupgrade
args: [ --py{{ supported_python_versions.0|replace(".", "") }}-plus ]
stages: [ push ]
stages: [ pre-push ]

- repo: https://github.com/adamchainz/django-upgrade
rev: 1.21.0
rev: 1.22.1
hooks:
- id: django-upgrade
args: [--target-version, "{{ supported_django_versions.0 }}"]
stages: [ push ]
stages: [ pre-push ]

- repo: https://github.com/adamchainz/djade-pre-commit
rev: 1.3.0
hooks:
- id: djade
args: [--target-version, "4.2"]
exclude: |
(?x)^(
charts/.*
|.*\.py
)$
2 changes: 1 addition & 1 deletion ambient_package_update/templates/README.md.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% include "snippets/badges.tpl" %}
{% include "snippets/tagline.tpl"%}
{% include "snippets/tagline.tpl" %}
{% include "snippets/links.tpl" %}

{% include "snippets/content.tpl" %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
flit publish --repository testpypi
flit publish
flit publish
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
flit publish --repository testpypi
flit publish
flit publish
2 changes: 1 addition & 1 deletion ambient_package_update/templates/snippets/contribute.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Example: run all hooks of pre-push stage

### Update documentation

- To build the documentation run: `sphinx-build docs/ docs/_build/html/`.
- To build the documentation, run: `sphinx-build docs/ docs/_build/html/`.
- Open `docs/_build/html/index.html` to see the documentation.

{% if readme_content.uses_internationalisation %}
Expand Down
2 changes: 1 addition & 1 deletion ambient_package_update/templates/snippets/licenses/GPL.md
Original file line number Diff line number Diff line change
Expand Up @@ -1344,4 +1344,4 @@ into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.
<https://www.gnu.org/licenses/why-not-lgpl.html>.
2 changes: 1 addition & 1 deletion ambient_package_update/templates/snippets/publish.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

- Increment version in main `__init__.py`

- Create pull request / merge to master
- Create pull request / merge to {{ main_branch }}

- This project uses the flit package to publish to PyPI. Thus publishing should be as easy as running:
```
Expand Down

0 comments on commit 7a50c13

Please sign in to comment.