From 19a7daaf1e669bd5c01a324adf94b8859084447b Mon Sep 17 00:00:00 2001 From: Josh Thomas Date: Thu, 1 Aug 2024 00:20:23 -0400 Subject: [PATCH] bump template to 2024.22 (#93) --- .copier/package.yml | 2 +- .github/CODEOWNERS | 1 + .github/dependabot.yml | 2 +- .github/workflows/release.yml | 32 +++---------------- CHANGELOG.md | 4 +++ Justfile | 3 ++ README.md | 4 +-- src/django_twc_toolbox/__init__.py | 1 - .../{_types.py => _typing.py} | 0 src/django_twc_toolbox/admin.py | 6 ++-- src/django_twc_toolbox/conf.py | 2 +- src/django_twc_toolbox/paginator.py | 2 +- 12 files changed, 22 insertions(+), 37 deletions(-) create mode 100644 .github/CODEOWNERS rename src/django_twc_toolbox/{_types.py => _typing.py} (100%) diff --git a/.copier/package.yml b/.copier/package.yml index 132a323..6e9d082 100644 --- a/.copier/package.yml +++ b/.copier/package.yml @@ -1,5 +1,5 @@ # Changes here will be overwritten by Copier; NEVER EDIT MANUALLY -_commit: v2024.17 +_commit: v2024.22 _src_path: gh:westerveltco/django-twc-package author_email: josh@joshthomas.dev author_name: Josh Thomas diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..1641a4c --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @westerveltco/oss diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 27c6fb3..7751d4e 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -6,7 +6,7 @@ updates: interval: weekly timezone: America/Chicago labels: - - dependabot + - 🤖 dependabot groups: gha: patterns: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1b7fec7..77190f0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,34 +4,12 @@ on: release: types: [released] -jobs: - check: - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - steps: - - uses: actions/checkout@v4 - - - name: Check most recent test run on `main` - id: latest-test-result - run: | - echo "result=$(gh run list \ - --branch=main \ - --workflow=test.yml \ - --json headBranch,workflowName,conclusion \ - --jq '.[] | select(.headBranch=="main" and .conclusion=="success") | .conclusion' \ - | head -n 1)" >> $GITHUB_OUTPUT +permissions: + contents: write - - name: OK - if: ${{ (contains(steps.latest-test-result.outputs.result, 'success')) }} - run: exit 0 - - - name: Fail - if: ${{ !contains(steps.latest-test-result.outputs.result, 'success') }} - run: exit 1 +jobs: + test: + uses: ./.github/workflows/test.yml pypi: if: ${{ github.event_name == 'release' }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c51636..6bb040d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,10 @@ and this project attempts to adhere to [Semantic Versioning](https://semver.org/ ## [Unreleased] +### Changed + +- Bumped `django-twc-package` template version to v2024.22. + ## [0.13.0] ### Added diff --git a/Justfile b/Justfile index 76be662..2a6ed90 100644 --- a/Justfile +++ b/Justfile @@ -9,6 +9,9 @@ set dotenv-load := true bootstrap: @just pup + @just install + +install: python -m uv pip install --editable '.[dev]' pup: diff --git a/README.md b/README.md index eddaff8..fb744ce 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ - Python 3.8, 3.9, 3.10, 3.11, 3.12 - Django 4.2, 5.0 -## Getting Started +## Installation 1. Install the package from PyPI: @@ -30,7 +30,7 @@ INSTALLED_APPS = [ ] ``` -## Usage +## Getting Started ## Documentation diff --git a/src/django_twc_toolbox/__init__.py b/src/django_twc_toolbox/__init__.py index 4b0d55d..b3cd020 100644 --- a/src/django_twc_toolbox/__init__.py +++ b/src/django_twc_toolbox/__init__.py @@ -1,4 +1,3 @@ from __future__ import annotations __version__ = "0.13.0" -__template_version__ = "2024.17" diff --git a/src/django_twc_toolbox/_types.py b/src/django_twc_toolbox/_typing.py similarity index 100% rename from src/django_twc_toolbox/_types.py rename to src/django_twc_toolbox/_typing.py diff --git a/src/django_twc_toolbox/admin.py b/src/django_twc_toolbox/admin.py index 8369e48..70a1701 100644 --- a/src/django_twc_toolbox/admin.py +++ b/src/django_twc_toolbox/admin.py @@ -7,9 +7,9 @@ from django.contrib.admin.options import BaseModelAdmin from django.http import HttpRequest -from django_twc_toolbox._types import ChildModelT -from django_twc_toolbox._types import ListOrTuple -from django_twc_toolbox._types import ParentModelT +from ._typing import ChildModelT +from ._typing import ListOrTuple +from ._typing import ParentModelT if sys.version_info >= (3, 12): from typing import override diff --git a/src/django_twc_toolbox/conf.py b/src/django_twc_toolbox/conf.py index 90f7f13..c85a855 100644 --- a/src/django_twc_toolbox/conf.py +++ b/src/django_twc_toolbox/conf.py @@ -4,7 +4,7 @@ from django.conf import settings -from ._types import override +from ._typing import override DJANGO_TWC_TOOLBOX_SETTINGS_NAME = "DJANGO_TWC_TOOLBOX" diff --git a/src/django_twc_toolbox/paginator.py b/src/django_twc_toolbox/paginator.py index 3a26abb..ac74481 100644 --- a/src/django_twc_toolbox/paginator.py +++ b/src/django_twc_toolbox/paginator.py @@ -13,7 +13,7 @@ from django.db.models.query import QuerySet from django.utils.functional import cached_property -from ._types import override +from ._typing import override if TYPE_CHECKING: from typing import Any