Skip to content

Commit 2b58427

Browse files
authored
Merge pull request #21
Fix issues with Docs and add to README.md
2 parents 92b8d22 + d55dade commit 2b58427

File tree

8 files changed

+33
-13
lines changed

8 files changed

+33
-13
lines changed

.readthedocs.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version: 2
2+
3+
build:
4+
os: ubuntu-22.04
5+
tools:
6+
python: "3.13"
7+
sphinx:
8+
configuration: docs/conf.py

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ Any advice, support, PR's, etc. are welcome and would be greatly appreciated.
1111

1212
As it stands this project is getting rather close to being ready, but not quite yet. Mainly I want to ensure the github actions pipeline is steady, but once that is done it should be alright for use.
1313

14+
# Example Output
15+
For an example of this template's output, please visit the [demo](https://github.com/56kyle/robust-python-demo) which is kept up to date with the current state of this template.
16+
1417
# Why does this project exist?
1518

1619
Unfortunately, the [Hypermodern Python Cookiecutter] is no longer maintained nor modern.

docs/conf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@
123123

124124
intersphinx_mapping = {
125125
"python": ("https://docs.python.org/3", None),
126-
"pip": ("https://pip.pypa.io/en/stable/", None),
127126
}
128127

129128
html_theme = "furo"

tests/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"format-python",
2929
*TYPE_CHECK_NOX_SESSIONS,
3030
*TESTS_NOX_SESSIONS,
31-
"docs-build",
31+
"build-docs",
3232
"build-python",
3333
"build-container",
3434
"tox",

{{cookiecutter.project_name}}/.github/workflows/docs-build.yml renamed to {{cookiecutter.project_name}}/.github/workflows/build-docs.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
1-
# .github/workflows/docs-build.yml
1+
# .github/workflows/build-docs.yml
22
# See https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
33

44
name: Build Documentation
55

66
on:
77
pull_request:
88
paths:
9-
- "docs/**" # Documentation source files
10-
- "src/**/*.py" # Code changes might impact API docs
9+
- "docs/**"
10+
- "src/**/*.py"
1111
- "noxfile.py"
1212
- "pyproject.toml"
13-
- ".github/workflows/docs-build.yml"
14-
# Include relevant config files that affect docs build
15-
- ".ruff.toml" # Affects docstrings via linting
16-
- "pyrightconfig.json" # Affects type hints in docs
13+
- ".github/workflows/build-docs.yml"
14+
- ".ruff.toml" # Affects docstrings via linting
15+
- "pyrightconfig.json" # Affects type hints in docs
1716

1817
push:
1918
branches:
@@ -24,7 +23,7 @@ on:
2423
- "src/**/*.py"
2524
- "noxfile.py"
2625
- "pyproject.toml"
27-
- ".github/workflows/docs-build.yml"
26+
- ".github/workflows/build-docs.yml"
2827

2928
workflow_dispatch:
3029

@@ -46,11 +45,10 @@ jobs:
4645
python-version-file: ".github/workflows/.python-version"
4746

4847
- name: Build documentation
49-
run: uvx nox -s docs-build
48+
run: uvx nox -s build-docs
5049

5150
- name: Upload documentation (HTML) Artifact
5251
uses: actions/upload-artifact@v4
5352
with:
5453
name: html-docs
5554
path: docs/_build/html/
56-
retention-days: 5
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version: 2
2+
3+
build:
4+
os: ubuntu-22.04
5+
tools:
6+
python: "3.13"
7+
sphinx:
8+
configuration: docs/conf.py

{{cookiecutter.project_name}}/noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def tests_rust(session: Session) -> None:
171171

172172

173173
{% endif -%}
174-
@nox.session(python=DEFAULT_PYTHON_VERSION, name="docs-build", tags=[DOCS, BUILD])
174+
@nox.session(python=DEFAULT_PYTHON_VERSION, name="build-docs", tags=[DOCS, BUILD])
175175
def docs_build(session: Session) -> None:
176176
"""Build the project documentation (Sphinx)."""
177177
session.log("Installing documentation dependencies...")

{{cookiecutter.project_name}}/scripts/setup-remote.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,7 @@ def get_parser() -> argparse.ArgumentParser:
5252
parser.add_argument("-u", "--user", dest="github_user", help="GitHub user name.")
5353
parser.add_argument("-n", "--name", dest="repo_name", help="Name of the repo.")
5454
return parser
55+
56+
57+
if __name__ == "__main__":
58+
main()

0 commit comments

Comments
 (0)