Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ changelog:
labels:
- ignore-for-release
authors:
- pre-commit-ci
- pre-commit-ci[bot]
categories:
# Provide steps for upgrading the package and adjusting for
# breaking changes. No PRs included here.
Expand Down
16 changes: 5 additions & 11 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,18 @@ jobs:
with:
fetch-depth: 0

- name: Extract package version from pyproject.toml
- name: Extract version from tag
run: |
echo "PACKAGE_VERSION=$(grep -Po '^version\s*=\s*\"\K.*?(?=\")' pyproject.toml)" >> $GITHUB_ENV
echo "Found version in pyproject.toml: ${{ env.PACKAGE_VERSION }}"
# Removes 'v' prefix from tag (e.g., v1.0.0 -> 1.0.0)
VERSION=${GITHUB_REF_NAME#v}
echo "PACKAGE_VERSION=$VERSION" >> $GITHUB_ENV
echo "Extracted version from tag: $VERSION"

- name: Check package version is PEP440 compliant
# This is only a partial PEP440 match, it just checks the major, minor
# patch, but not any optional suffixes.
run: echo "${{ env.PACKAGE_VERSION }}" | grep -P "^\d+\.\d+\.\d+.*$"

- name: Check version matches release tag
run: |
if [ "${{ format('v{0}', env.PACKAGE_VERSION) }}" != "${{ github.event.release.tag_name }}" ]
then
echo "v\$\{PACKAGE_VERSION\} = v${{ env.PACKAGE_VERSION }} does not match tag name: ${{ github.event.release.tag_name }}"
exit 1
fi

- name: Setup Python 3.11
uses: actions/setup-python@v6
with:
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ jobs:
strategy:
matrix:
include:
- os: ubuntu-latest
python: '3.9'
toxenv: py39
- os: ubuntu-latest
python: '3.10'
toxenv: py310
Expand Down
10 changes: 0 additions & 10 deletions CITATION.cff

This file was deleted.

8 changes: 4 additions & 4 deletions docs/contributing/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ $ . venv/bin/activate

Running Tox in a Conda environment is possible but it may conflict with
Tox's ability to find the correct Python versions. E.g., if your
Conda environment is Python 3.9, running `#!bash $ tox -e p38` may still use
Python 3.9.
Conda environment is Python 3.13, running `#!bash $ tox -e p312` may still use
Python 3.13.

To install manually:
```bash
Expand Down Expand Up @@ -61,9 +61,9 @@ Code that is useful for building tests but is not a test itself belongs in the

```bash
# Run all tests in tests/
$ tox -e py39
$ tox -e py313
# Run a specific test
$ tox -e py39 -- tests/x/y_test.py::test_z
$ tox -e py313 -- tests/x/y_test.py::test_z
```

## Docs
Expand Down
7 changes: 2 additions & 5 deletions docs/contributing/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,12 @@ Milestones are the [Issue Tracker](https://github.com/foobar-author/foobar/issue
(`major.minor.patch`) with optional [PEP-440](https://peps.python.org/pep-0440){target=_blank}
pre-release/post-release/dev-release segments. Major/minor/patch numbers
start at 0 and pre-release/post-release/dev-release segments start at 1.
2. Update the version in `pyproject.toml` to `{VERSION}`.
3. Commit and merge the version updates/changelogs into main.
4. Tag the release commit and push (typically this is the commit updating the
version numbers).
1. Tag the release commit and push.
```bash
$ git tag -s v{VERSION} -m "FooBar v{VERSION}"
$ git push origin v{VERSION}
```
Note the version number is prepended by "v" for the tags so we can
Note the version number is prepended by "v" for the tags so tooling can
distinguish release tags from non-release tags.
5. Create a new release on GitHub using the tag. The title should be
`FooBar v{VERSION}`.
Expand Down
27 changes: 14 additions & 13 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
[build-system]
requires = ["setuptools>=64.0", "setuptools_scm"]
requires = ["setuptools>=77.0", "setuptools_scm"]
build-backend = "setuptools.build_meta"

[project]
name = "foobar"
version = "0.1.0"
authors = [
{name = "foobar author"},
{email = "foobar@foobar.com"},
{name = "foobar author", email = "foobar@foobar.com"},
]
description = "Foobar example package."
description = "Foobar example package"
dynamic = ["version"]
readme = "README.md"
requires-python = ">=3.9"
license = {text = "MIT"}
requires-python = ">=3.10"
license = "MIT"
license-files = ["LICENSE"]
classifiers = [
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: Implementation :: CPython",
Expand All @@ -24,9 +23,9 @@ dependencies = [
]

[project.urls]
homepage = "https://github.com/foobar-author/foobar"
documentation = "https://foobar.readthedocs.io"
repository = "https://github.com/foobar-author/foobar"
Homepage = "https://github.com/foobar-author/foobar"
Documentation = "https://foobar.readthedocs.io"
Source = "https://github.com/foobar-author/foobar"

[project.optional-dependencies]
dev = [
Expand Down Expand Up @@ -68,7 +67,7 @@ plugins = ["covdefaults"]
omit = ["examples"]

[tool.mypy]
python_version = "3.12"
python_version = "3.10"
check_untyped_defs = true
disallow_any_generics = true
disallow_incomplete_defs = true
Expand All @@ -90,7 +89,7 @@ allow_untyped_defs = true

[tool.ruff]
line-length = 79
target-version = "py39"
target-version = "py310"

[tool.ruff.format]
indent-style = "space"
Expand Down Expand Up @@ -162,3 +161,5 @@ convention = "google"
[tool.setuptools.packages.find]
exclude = ["tests*", "testing*"]
namespaces = false

[tool.setuptools_scm]
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py39, py310, py311, py312, py313, pre-commit, docs
envlist = py310, py311, py312, py313, pre-commit, docs

[testenv]
extras = dev
Expand Down