Skip to content

Commit fbb2a97

Browse files
committed
Merge remote-tracking branch 'origin/main' into dependabot/pip/vws-python-mock-2025.2.18
2 parents 34db2b5 + acdf78e commit fbb2a97

File tree

10 files changed

+64
-57
lines changed

10 files changed

+64
-57
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717

1818
strategy:
1919
matrix:
20-
python-version: ['3.12']
20+
python-version: ['3.13']
2121
platform: [ubuntu-latest, windows-latest]
2222

2323
runs-on: ${{ matrix.platform }}
@@ -27,6 +27,9 @@ jobs:
2727

2828
- name: Install uv
2929
uses: astral-sh/setup-uv@v5
30+
with:
31+
enable-cache: true
32+
cache-dependency-glob: '**/pyproject.toml'
3033

3134
- name: Run tests
3235
run: |

.github/workflows/lint.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717

1818
strategy:
1919
matrix:
20-
python-version: ['3.12']
20+
python-version: ['3.13']
2121
platform: [ubuntu-latest, windows-latest]
2222

2323
runs-on: ${{ matrix.platform }}
@@ -27,6 +27,9 @@ jobs:
2727

2828
- name: Install uv
2929
uses: astral-sh/setup-uv@v5
30+
with:
31+
enable-cache: true
32+
cache-dependency-glob: '**/pyproject.toml'
3033

3134
- name: Lint
3235
run: |

.github/workflows/publish-site.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: Deploy documentation
3+
4+
on:
5+
push:
6+
branches: [main]
7+
pull_request:
8+
branches: [main]
9+
10+
jobs:
11+
pages:
12+
runs-on: ubuntu-latest
13+
environment:
14+
name: ${{ github.ref_name == 'main' && 'github-pages' || 'development' }}
15+
url: ${{ steps.deployment.outputs.page_url }}
16+
permissions:
17+
pages: write
18+
id-token: write
19+
steps:
20+
- id: deployment
21+
uses: sphinx-notes/pages@v3
22+
with:
23+
documentation_path: docs/source
24+
pyproject_extras: dev
25+
python_version: '3.13'
26+
sphinx_build_options: -W
27+
publish: ${{ github.ref_name == 'main' }}

.github/workflows/release.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ jobs:
2020
# This is needed for https://github.com/stefanzweifel/git-auto-commit-action.
2121
contents: write
2222

23-
strategy:
24-
matrix:
25-
python-version: ['3.12']
26-
2723
steps:
2824
- uses: actions/checkout@v4
2925
with:
@@ -39,6 +35,9 @@ jobs:
3935

4036
- name: Install uv
4137
uses: astral-sh/setup-uv@v5
38+
with:
39+
enable-cache: true
40+
cache-dependency-glob: '**/pyproject.toml'
4241

4342
- name: Calver calculate version
4443
uses: StephaneBour/actions-calver@master
@@ -69,6 +68,8 @@ jobs:
6968
with:
7069
commit_message: Bump CHANGELOG
7170
file_pattern: CHANGELOG.rst
71+
# Error if there are no changes.
72+
skip_dirty_check: true
7273

7374
- name: Bump version and push tag
7475
id: tag_version
@@ -83,6 +84,7 @@ jobs:
8384
uses: ncipollo/release-action@v1
8485
with:
8586
tag: ${{ steps.tag_version.outputs.new_tag }}
87+
makeLatest: true
8688
name: Release ${{ steps.tag_version.outputs.new_tag }}
8789
body: ${{ steps.tag_version.outputs.changelog }}
8890

README.rst

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
|Build Status| |codecov| |PyPI| |Documentation Status|
1+
|Build Status| |codecov| |PyPI|
22

33
vws-python
44
==========
@@ -67,15 +67,12 @@ Getting Started
6767
Full Documentation
6868
------------------
6969

70-
See the `full
71-
documentation <https://vws-python.readthedocs.io/en/latest>`__.
70+
See the `full documentation <https://vws-python.github.io/vws-python/>`__.
7271

7372
.. |Build Status| image:: https://github.com/VWS-Python/vws-python/actions/workflows/ci.yml/badge.svg?branch=main
7473
:target: https://github.com/VWS-Python/vws-python/actions
7574
.. |codecov| image:: https://codecov.io/gh/VWS-Python/vws-python/branch/main/graph/badge.svg
7675
:target: https://codecov.io/gh/VWS-Python/vws-python
7776
.. |PyPI| image:: https://badge.fury.io/py/VWS-Python.svg
7877
:target: https://badge.fury.io/py/VWS-Python
79-
.. |Documentation Status| image:: https://readthedocs.org/projects/vws-python/badge/?version=latest
80-
:target: https://vws-python.readthedocs.io/en/latest/?badge=latest
81-
.. |minimum-python-version| replace:: 3.12
78+
.. |minimum-python-version| replace:: 3.13

docs/source/conf.py

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,19 @@
44
"""
55

66
import importlib.metadata
7+
from pathlib import Path
78

89
from packaging.specifiers import SpecifierSet
10+
from sphinx_pyproject import SphinxConfig
911

10-
project = "VWS-Python"
11-
author = "Adam Dangoor"
12+
_pyproject_file = Path(__file__).parent.parent.parent / "pyproject.toml"
13+
_pyproject_config = SphinxConfig(
14+
pyproject_file=_pyproject_file,
15+
config_overrides={"version": None},
16+
)
17+
18+
project = _pyproject_config.name
19+
author = _pyproject_config.author
1220

1321
extensions = [
1422
"sphinx_copybutton",
@@ -29,19 +37,6 @@
2937
# https://sphinx-copybutton.readthedocs.io/en/latest/use.html#automatic-exclusion-of-prompts-from-the-copies.
3038
copybutton_exclude = ".linenos, .gp"
3139

32-
# The version info for the project you're documenting, acts as replacement for
33-
# |version| and |release|, also used in various other places throughout the
34-
# built documents.
35-
#
36-
# Use ``importlib.metadata.version`` as per
37-
# https://setuptools-scm.readthedocs.io/en/latest/usage/#usage-from-sphinx
38-
version = importlib.metadata.version(distribution_name=project)
39-
# This method of getting the release from the version goes hand in hand with
40-
# the ``post-release`` versioning scheme chosen in the ``setuptools-scm``
41-
# configuration.
42-
release = version.split(sep=".post")[0]
43-
44-
4540
project_metadata = importlib.metadata.metadata(distribution_name=project)
4641
requires_python = project_metadata["Requires-Python"]
4742
specifiers = SpecifierSet(specifiers=requires_python)
@@ -69,7 +64,6 @@
6964

7065
# Output file base name for HTML help builder.
7166
htmlhelp_basename = "VWSPYTHONdoc"
72-
autoclass_content = "init"
7367
intersphinx_mapping = {
7468
"python": (f"https://docs.python.org/{minimum_python_version}", None),
7569
}
@@ -88,7 +82,6 @@
8882

8983
rst_prolog = f"""
9084
.. |project| replace:: {project}
91-
.. |release| replace:: {release}
9285
.. |minimum-python-version| replace:: {minimum_python_version}
9386
.. |github-owner| replace:: VWS-Python
9487
.. |github-repository| replace:: vws-python

docs/source/index.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,10 @@ To write unit tests for code which uses this library, without using your Vuforia
110110
assert matching_targets[0].target_id == target_id
111111
112112
There are some differences between the mock and the real Vuforia.
113-
See https://vws-python-mock.readthedocs.io/en/latest/differences-to-vws.html for details.
113+
See https://vws-python.github.io/vws-python-mock/differences-to-vws for details.
114114

115115
.. _VWS Python Mock: https://github.com/VWS-Python/vws-python-mock
116116

117-
118117
Reference
119118
---------
120119

pyproject.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ license = { file = "LICENSE" }
1919
authors = [
2020
{ name = "Adam Dangoor", email = "adamdangoor@gmail.com" },
2121
]
22-
requires-python = ">=3.12"
22+
requires-python = ">=3.13"
2323
classifiers = [
2424
"Development Status :: 5 - Production/Stable",
2525
"Environment :: Web Environment",
2626
"License :: OSI Approved :: MIT License",
2727
"Operating System :: Microsoft :: Windows",
2828
"Operating System :: POSIX",
2929
"Programming Language :: Python :: 3 :: Only",
30-
"Programming Language :: Python :: 3.12",
30+
"Programming Language :: Python :: 3.13",
3131
]
3232
dynamic = [
3333
"version",
@@ -43,7 +43,7 @@ optional-dependencies.dev = [
4343
"check-manifest==0.50",
4444
"deptry==0.23.0",
4545
"doc8==1.1.2",
46-
"doccmd==2025.2.17",
46+
"doccmd==2025.2.20.7",
4747
"docformatter==1.7.5",
4848
"freezegun==1.5.1",
4949
"furo==2024.8.6",
@@ -62,15 +62,16 @@ optional-dependencies.dev = [
6262
"pytest==8.3.4",
6363
"pytest-cov==6.0.0",
6464
"pyyaml==6.0.2",
65-
"ruff==0.9.6",
65+
"ruff==0.9.7",
6666
# We add shellcheck-py not only for shell scripts and shell code blocks,
6767
# but also because having it installed means that ``actionlint-py`` will
6868
# use it to lint shell commands in GitHub workflow files.
6969
"shellcheck-py==0.10.0.1",
7070
"shfmt-py==3.7.0.1",
71-
"sphinx==8.1.3",
71+
"sphinx==8.2.0",
7272
"sphinx-copybutton==0.5.2",
7373
"sphinx-lint==1.0.0",
74+
"sphinx-pyproject==0.3.0",
7475
"sphinx-substitution-extensions==2025.2.19",
7576
"sphinxcontrib-spelling==8.0.1",
7677
"sybil==9.1.0",
@@ -81,7 +82,7 @@ optional-dependencies.dev = [
8182
"yamlfix==1.17.0",
8283
]
8384
optional-dependencies.release = [ "check-wheel-contents==0.6.1" ]
84-
urls.Documentation = "https://vws-python.readthedocs.io/en/latest/"
85+
urls.Documentation = "https://vws-python.github.io/vws-python/"
8586
urls.Source = "https://github.com/VWS-Python/vws-python"
8687

8788
[tool.setuptools]
@@ -282,7 +283,6 @@ ignore = [
282283
".yamlfmt",
283284
"*.enc",
284285
".pre-commit-config.yaml",
285-
"readthedocs.yaml",
286286
"CHANGELOG.rst",
287287
"CODE_OF_CONDUCT.rst",
288288
"CONTRIBUTING.rst",
@@ -312,7 +312,7 @@ pep621_dev_dependency_groups = [
312312
[tool.pyproject-fmt]
313313
indent = 4
314314
keep_full_version = true
315-
max_supported_python = "3.12"
315+
max_supported_python = "3.13"
316316

317317
[tool.pytest.ini_options]
318318

readthedocs.yaml

Lines changed: 0 additions & 18 deletions
This file was deleted.

spelling_private_dict.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ rgb
9090
str
9191
timestamp
9292
todo
93+
traceback
9394
travis
9495
txt
9596
unmocked

0 commit comments

Comments
 (0)