Skip to content

Commit

Permalink
Matched documentation to toolkit standards
Browse files Browse the repository at this point in the history
  • Loading branch information
isaac-tfn committed Oct 30, 2023
1 parent e99149e commit c4deb60
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 39 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/documentation-links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Based on GitHub action here: https://github.com/readthedocs/actions/tree/main/preview

name: readthedocs/actions
on:
pull_request_target:
types:
- opened
# Execute this action only on PRs that touch
# documentation files.
paths:
- "docs/**"

permissions:
pull-requests: write

jobs:
documentation-links:
runs-on: ubuntu-latest
steps:
- uses: readthedocs/actions/preview@v1
with:
project-slug: "cafdistribute"
24 changes: 0 additions & 24 deletions .github/workflows/sphinx.yml

This file was deleted.

3 changes: 2 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ sphinx:
# Optionally declare the Python requirements required to build your docs
python:
install:
- requirements: docs/requirements.txt
- requirements: docs/requirements.txt
- requirements: requirements.txt
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
<p align="center">
<a href="https://pypi.org/project/caf.distribute/"><img alt="Supported Python versions" src="https://img.shields.io/pypi/pyversions/caf.distribute.svg?style=flat-square"></a>
<a href="https://pypi.org/project/caf.distribute/"><img alt="Latest release" src="https://img.shields.io/github/release/transport-for-the-north/caf.distribute.svg?style=flat-square&maxAge=86400"></a>
<a href="https://anaconda.org/conda-forge/caf.distribute"><img alt="Conda" src="https://img.shields.io/conda/v/conda-forge/caf.distribute?style=flat-square&logo=condaforge"></a>
<a href="https://app.codecov.io/gh/Transport-for-the-North/caf.distribute"><img alt="Coverage" src="https://img.shields.io/codecov/c/github/transport-for-the-north/caf.distribute.svg?branch=master&style=flat-square&logo=CodeCov"></a>
<a href="https://github.com/Transport-for-the-North/caf.distribute/actions?query=event%3Apush"><img alt="Testing Badge" src="https://img.shields.io/github/actions/workflow/status/transport-for-the-north/caf.toolkit/tests.yml?style=flat-square&logo=GitHub&label=Tests"></a>
<a href="https://www.gnu.org/licenses/gpl-3.0.en.html"><img alt="License: GNU GPL v3.0" src="https://img.shields.io/badge/license-GPLv3-blueviolet.svg?style=flat-square"></a>
<a href='https://cafdistribute.readthedocs.io/en/stable/?badge=stable'><img alt='Documentation Status' src="https://img.shields.io/readthedocs/cafdistribute?style=flat-square&logo=readthedocs"></a>
<a href="https://github.com/psf/black"><img alt="code style: black" src="https://img.shields.io/badge/code%20format-black-000000.svg?style=flat-square"></a>
</p>

Expand Down
10 changes: 7 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import sys
import os
from pathlib import Path
import caf.distribute

dir_path = Path(__file__).parents[1]
source = dir_path / "src" / "caf" / "distribute"
Expand All @@ -33,8 +32,13 @@
napoleon_google_docstring = False
napoleon_numpy_docstring = True

# The full version, including alpha/beta/rc tags
release = str(caf.distribute.__version__)
# The short X.Y version.
import caf.distribute

version = str(caf.distribute.__version__)

# The full version, including alpha/beta/rc tags.
release = version


# -- General configuration ---------------------------------------------------
Expand Down
5 changes: 0 additions & 5 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
# Required libraries for a doc build
scipy>=1.9.3
numpy>=1.19.0
pandas>=1.4.0
tqdm>=4.50.2
caf.toolkit>=0.2.1
sphinx-automodapi>=0.16.0
pydata-sphinx-theme>=0.14.1
caf.distribute>=0.1.0
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ test = [
"Bug Tracker" = "https://github.com/Transport-for-the-North/caf.distribute/issues"
Homepage = "https://github.com/Transport-for-the-North/caf.distribute"
Source = "https://github.com/Transport-for-the-North/caf.distribute"
Documentation = "http://cafdistribute.rtfd.io/"

# Packaging options
[tool.setuptools.packages.find]
Expand Down
6 changes: 1 addition & 5 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,5 @@ tox>=3.24.3, <5.0.0
# edit_install
versioningit>=2.2.0, < 3.0.0

# documentation
sphinx >=7.2.6, <8.0.0
sphinx-automodapi>=0.16.0
pydata-sphinx-theme>=0.14.1
graphviz>=0.20.1
# For documentation requirements se docs/requirements.txt

0 comments on commit c4deb60

Please sign in to comment.