File tree Expand file tree Collapse file tree 8 files changed +73
-6
lines changed
Expand file tree Collapse file tree 8 files changed +73
-6
lines changed Original file line number Diff line number Diff line change 3232
3333 # Generate Swagger UI docs
3434 - name : Fetch Swagger UI
35- run : wget https://github.com/swagger-api/swagger-ui/archive/refs/tags/v${SWAGGER_UI_RELEASE}.tar.gz
36- - name : Extract Swagger UI
37- run : tar xf v${SWAGGER_UI_RELEASE}.tar.gz -C docs/_static/ --strip=1 swagger-ui-${SWAGGER_UI_RELEASE}/dist/ --transform s/dist/swagger-ui/
35+ run : ./fetch_swagger.sh
3836 - name : Generate schema
3937 run : uv run generate-schema.py
4038
Original file line number Diff line number Diff line change 1+
2+
3+ # Read the Docs configuration file
4+ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
5+
6+ # Required
7+ version : 2
8+
9+ # Set the OS, Python version, and other tools you might need
10+ build :
11+ os : ubuntu-24.04
12+ tools :
13+ python : " 3.13"
14+ jobs :
15+ post_checkout :
16+ - git fetch --unshallow || true
17+ - git config remote.origin.fetch '+refs/heads/*:refs/remotes/origin/*' || true
18+ - git fetch --all --tags || true
19+ create_environment :
20+ - asdf plugin add uv
21+ - asdf install uv 0.9.2
22+ - asdf global uv 0.9.2
23+ install :
24+ - uv sync
25+ pre_build :
26+ - ./fetch_swagger.sh
27+ - uv run generate-schema.py
28+ build :
29+ html :
30+ - uv run sphinx-build -T -b html docs/ $READTHEDOCS_OUTPUT/html
31+
32+ # Build documentation in the "docs/" directory with Sphinx
33+ sphinx :
34+ configuration : docs/conf.py
35+
36+ # Optionally, but recommended,
37+ # declare the Python requirements required to build your documentation
38+ # See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
39+ # python:
40+ # install:
41+ # - requirements: docs/requirements.txt
42+
43+
44+
Original file line number Diff line number Diff line change 1+ #########
2+ ChangeLog
3+ #########
4+
5+ ***********
6+ 0.1.0 (TBR)
7+ ***********
8+
9+ Initial version.
Original file line number Diff line number Diff line change @@ -18,5 +18,6 @@ documentation for details.
1818 /quickstart
1919 /how-tos
2020 /reference
21+ /changelog
2122 /dev
2223
Original file line number Diff line number Diff line change 1+ #! /bin/bash -ex
2+
3+ SWAGGER_UI_RELEASE=5.30.3
4+
5+ wget https://github.com/swagger-api/swagger-ui/archive/refs/tags/v${SWAGGER_UI_RELEASE} .tar.gz
6+ tar xf v${SWAGGER_UI_RELEASE} .tar.gz -C docs/_static/ --strip=1 swagger-ui-${SWAGGER_UI_RELEASE} /dist/ --transform s/dist/swagger-ui/
Original file line number Diff line number Diff line change @@ -37,6 +37,13 @@ dynamic = ["version"]
3737[project .scripts ]
3838structured-tutorial = " structured_tutorials.cli:main"
3939
40+ [project .urls ]
41+ Homepage = " https://github.com/mathiasertl/django-ca/"
42+ Documentation = " https://django-ca.readthedocs.io/"
43+ Source = " https://github.com/mathiasertl/structured-tutorials"
44+ Issues = " https://github.com/mathiasertl/structured-tutorials/issues"
45+ Changelog = " https://django-ca.readthedocs.io/en/latest/changelog.html"
46+
4047[tool .coverage .run ]
4148source = [
4249 " structured_tutorials" ,
Original file line number Diff line number Diff line change 55
66import logging
77import logging .config
8+ import os
89import sys
910from typing import Any , ClassVar , Literal
1011
Original file line number Diff line number Diff line change 33
44"""Test the cli entry point function."""
55
6+ from collections .abc import Iterator
67from pathlib import Path
78from unittest .mock import patch
89
1314
1415
1516@pytest .fixture (autouse = True )
16- def mock_setup_logging () -> None :
17+ def mock_setup_logging () -> Iterator [ None ] :
1718 """Fixture to mock logging setup - so that it is not called multiple times."""
18- with patch ("structured_tutorials.cli.setup_logging" ):
19- return
19+ with patch ("structured_tutorials.cli.setup_logging" , autospec = True ):
20+ yield
2021
2122
2223def test_simple_tutorial (simple_tutorial : TutorialModel ) -> None :
You can’t perform that action at this time.
0 commit comments