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
8 changes: 8 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2

build:
os: ubuntu-22.04
tools:
python: "3.13"
sphinx:
configuration: docs/conf.py
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ Any advice, support, PR's, etc. are welcome and would be greatly appreciated.

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.

# Example Output
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.

# Why does this project exist?

Unfortunately, the [Hypermodern Python Cookiecutter] is no longer maintained nor modern.
Expand Down
1 change: 0 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@

intersphinx_mapping = {
"python": ("https://docs.python.org/3", None),
"pip": ("https://pip.pypa.io/en/stable/", None),
}

html_theme = "furo"
Expand Down
2 changes: 1 addition & 1 deletion tests/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"format-python",
*TYPE_CHECK_NOX_SESSIONS,
*TESTS_NOX_SESSIONS,
"docs-build",
"build-docs",
"build-python",
"build-container",
"tox",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
# .github/workflows/docs-build.yml
# .github/workflows/build-docs.yml
# See https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions

name: Build Documentation

on:
pull_request:
paths:
- "docs/**" # Documentation source files
- "src/**/*.py" # Code changes might impact API docs
- "docs/**"
- "src/**/*.py"
- "noxfile.py"
- "pyproject.toml"
- ".github/workflows/docs-build.yml"
# Include relevant config files that affect docs build
- ".ruff.toml" # Affects docstrings via linting
- "pyrightconfig.json" # Affects type hints in docs
- ".github/workflows/build-docs.yml"
- ".ruff.toml" # Affects docstrings via linting
- "pyrightconfig.json" # Affects type hints in docs

push:
branches:
Expand All @@ -24,7 +23,7 @@ on:
- "src/**/*.py"
- "noxfile.py"
- "pyproject.toml"
- ".github/workflows/docs-build.yml"
- ".github/workflows/build-docs.yml"

workflow_dispatch:

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

- name: Build documentation
run: uvx nox -s docs-build
run: uvx nox -s build-docs

- name: Upload documentation (HTML) Artifact
uses: actions/upload-artifact@v4
with:
name: html-docs
path: docs/_build/html/
retention-days: 5
8 changes: 8 additions & 0 deletions {{cookiecutter.project_name}}/.readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2

build:
os: ubuntu-22.04
tools:
python: "3.13"
sphinx:
configuration: docs/conf.py
2 changes: 1 addition & 1 deletion {{cookiecutter.project_name}}/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def tests_rust(session: Session) -> None:


{% endif -%}
@nox.session(python=DEFAULT_PYTHON_VERSION, name="docs-build", tags=[DOCS, BUILD])
@nox.session(python=DEFAULT_PYTHON_VERSION, name="build-docs", tags=[DOCS, BUILD])
def docs_build(session: Session) -> None:
"""Build the project documentation (Sphinx)."""
session.log("Installing documentation dependencies...")
Expand Down
4 changes: 4 additions & 0 deletions {{cookiecutter.project_name}}/scripts/setup-remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,7 @@ def get_parser() -> argparse.ArgumentParser:
parser.add_argument("-u", "--user", dest="github_user", help="GitHub user name.")
parser.add_argument("-n", "--name", dest="repo_name", help="Name of the repo.")
return parser


if __name__ == "__main__":
main()