Skip to content

Commit 17ac7d7

Browse files
committed
Add automatic versioning for docs.
1 parent 9891a96 commit 17ac7d7

File tree

5 files changed

+55
-4
lines changed

5 files changed

+55
-4
lines changed

docs/rtd_environment.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ channels:
44

55
dependencies:
66
- python >= 3.7
7-
- pip
7+
- pip >=21.1
88
- setuptools_scm
99
- toml
1010

@@ -16,3 +16,6 @@ dependencies:
1616
- sphinx-autoapi
1717
- sphinx-copybutton
1818
- sphinx-panels
19+
20+
- pip:
21+
- -e ../

docs/source/conf.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
documentation: https://www.sphinx-doc.org/en/master/usage/configuration.html
55
66
"""
7+
from importlib.metadata import version
8+
9+
710
# -- Project information -----------------------------------------------------
811

912

@@ -12,9 +15,9 @@
1215
copyright = f"2021, {author}" # noqa: A001
1316

1417
# The version, including alpha/beta/rc tags, but not commit hash and datestamps
15-
release = "1.1.0"
18+
release = version("cookiecutter-pytask-project")
1619
# The short X.Y version.
17-
version = "1.1"
20+
version = ".".join(release.split(".")[:2])
1821

1922

2023
# -- General configuration ---------------------------------------------------

pyproject.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
[build-system]
2+
requires = ["setuptools>=45", "wheel", "setuptools_scm[toml]>=6.0"]
3+
4+
5+
[tool.setuptools_scm]
6+
write_to = "version.py"
7+
8+
19
[tool.tryceratops]
210
ignore = ["TC003"]
311

setup.cfg

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
[metadata]
2+
name = cookiecutter-pytask-project
3+
description = A minimal cookiecutter template for a project with pytask.
4+
long_description = file: README.rst
5+
long_description_content_type = text/x-rst
6+
url = https://cookiecutter-pytask-project.readthedocs.io/en/latest
7+
author = Tobias Raabe
8+
author_email = [email protected]
9+
license = MIT
10+
license_file = LICENSE
11+
platforms = unix, linux, osx, cygwin, win32
12+
classifiers =
13+
Development Status :: 3 - Alpha
14+
Environment :: Console
15+
Intended Audience :: Science/Research
16+
License :: OSI Approved :: MIT License
17+
Operating System :: MacOS :: MacOS X
18+
Operating System :: Microsoft :: Windows
19+
Operating System :: POSIX
20+
Programming Language :: Python :: 3
21+
Programming Language :: Python :: 3 :: Only
22+
Programming Language :: Python :: 3.7
23+
Programming Language :: Python :: 3.8
24+
Programming Language :: Python :: 3.9
25+
Programming Language :: Python :: 3.10
26+
Topic :: Scientific/Engineering
27+
Topic :: Software Development :: Build Tools
28+
project_urls =
29+
Changelog = https://cookiecutter-pytask-project.readthedocs.io/en/latest/changes.html
30+
Documentation = https://cookiecutter-pytask-project.readthedocs.io/en/latest
31+
Github = https://github.com/pytask-dev/cookiecutter-pytask-project
32+
Tracker = https://github.com/pytask-dev/cookiecutter-pytask-project/issues
33+
34+
35+
[check-manifest]
36+
ignore =
37+
version.py

{{cookiecutter.project_slug}}/.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Continuous Integration Workflow
1+
name: main
22

33
# Automatically cancel a previous run.
44
concurrency:

0 commit comments

Comments
 (0)