Commit 9759f39d authored by Zebedee Nicholls's avatar Zebedee Nicholls
Browse files

Merge branch 'switch-to-properdocs' into 'main'

Update docs build and add RtD config

See merge request !15
parents a600f2fe bc6dc545
Loading
Loading
Loading
Loading
Loading
+3 −1
Changes for .gitignore: 3 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -81,8 +81,10 @@ instance/
# Scrapy stuff:
.scrapy

# Sphinx documentation
# Documentation builds
docs/_build/
docs/build/
site/

# PyBuilder
target/
+1 −1
Changes for .gitlab-ci.yml: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@ test:docs:
  stage: test
  script:
    - uv sync --group docs
    - uv run sphinx-build -W --keep-going -T -b html docs/source docs/build
    - uv run --group docs properdocs build --strict

test:tests:
  stage: test

.readthedocs.yaml

0 → 100644
+21 −0
Changes for .readthedocs.yaml: 21 added lines, 0 removed lines.
Original line number Diff line number Diff line
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the version of Python and other tools you might need
build:
  os: ubuntu-22.04
  tools:
    python: "3.11"
  jobs:
    install:
      # For simplicity, use requirements files and pip directly.
      - python -m pip install -r requirements-docs-locked.txt
      - python -m pip install --no-deps .
      - python -m pip list
    build:
      html:
        - python -m properdocs build --strict --site-dir "$READTHEDOCS_OUTPUT/html"
+9 −1
Changes for Makefile: 9 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -34,7 +34,15 @@ test: ## run the tests

.PHONY: docs
docs:  ## build the docs
	uv run --group docs sphinx-build -T -b html docs/source docs/build/html
	uv run --group docs properdocs build

.PHONY: docs-strict
docs-strict:  ## build the docs strictly (e.g. raise an error on warnings, this most closely mirrors what we do in the CI)
	uv run --group docs properdocs build --strict

.PHONY: docs-serve
docs-serve:  ## serve the docs locally
	uv run --group docs properdocs serve

.PHONY: changelog-draft
changelog-draft:  ## compile a draft of the next changelog
+13 −12
Changes for README.md: 13 added lines, 12 removed lines.
Original line number Diff line number Diff line
# Copier - Basic Python Repository

<!--- Can use start-after and end-before directives in docs, see
https://myst-parser.readthedocs.io/en/latest/syntax/organising_content.html#inserting-other-documents-directly-into-the-current-document
-->
<!--- --8<-- [start:description] -->

<!--- sec-begin-description -->
This is our copier template for basic Python repositories.
It is built to work with [copier](https://copier.readthedocs.io/en/stable/#quick-start).

This is our copier template for basic Python repositories. It is built to work
with [copier](https://copier.readthedocs.io/en/stable/#quick-start).
The template itself lives in `template`.

<!--- sec-end-description -->
<!--- --8<-- [end:description] -->

The template itself lives in `template`.
Full documentataion can be found at:
https://copier-basic-python-repository.readthedocs.io/en/latest/
We recommend reading the docs there because the internal documentation links
don't render correctly on GitLab's viewer.

## Audience

<!--- sec-begin-audience -->
<!--- --8<-- [start:audience] -->

This template is for people who just want a quick setup to do work with Python
with a reproducible/shareable environment.
@@ -54,11 +55,11 @@ workflow involving handling data in a traceable, portable way (for that, see
structure, then migrate to a different repository structure once you have a
clearer idea of what you are doing.

<!--- sec-end-audience -->
<!--- --8<-- [end:audience] -->

## Usage

<!--- sec-begin-usage -->
<!--- --8<-- [start:usage] -->

### Installing copier

@@ -152,7 +153,7 @@ Any conflicts related to package-manager lock files can be safely ignored.
Run the lock command for your selected package manager after updating
to regenerate the lockfile.

<!--- sec-end-usage -->
<!--- --8<-- [end:usage] -->

## Development

Loading