Skip to content

Commit

Permalink
Added action to build docs, minor clean-ups to docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
LTLA committed Apr 24, 2024
1 parent 50be4bb commit 729a9dc
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 21 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/build-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Build docs

on:
push:
branches:
- master

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: 3.9
cache: 'pip'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest tox
- name: Build docs
run: |
tox -e docs
touch ./docs/_build/html/.nojekyll
- name: GH Pages Deployment
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages # The branch the action should deploy to.
folder: ./docs/_build/html
clean: true # Automatically remove deleted files from the deploy branch
6 changes: 2 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Changelog

## Version 0.1 (development)
## Version 0.1.0

- Feature A added
- FIX: nasty bug #1729 fixed
- add your changes here!
- New release of this package.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@
[![Twitter](https://img.shields.io/twitter/url/http/shields.io.svg?style=social&label=Twitter)](https://twitter.com/SewerRat)
-->

[![Project generated with PyScaffold](https://img.shields.io/badge/-PyScaffold-005CA0?logo=pyscaffold)](https://pyscaffold.org/)

# Python interface to the SewerRat API

![Unit tests](https://github.com/ArtifactDB/SewerRat-py/actions/workflows/run-tests.yaml/badge.svg)
![Documentation](https://github.com/ArtifactDB/SewerRat-py/actions/workflows/build-docs.yaml/badge.svg)

Pretty much as it says on the tin: provides a Python client for the [API of the same name](https://github.com/ArtifactDB/SewerRat).
It is assumed that the users of the **sewerrat** client and the SewerRat API itself are accessing the same shared filesystem;
this is typically the case for high-performance computing clusters in scientific institutions.
Expand Down Expand Up @@ -66,3 +67,6 @@ sr.query(url, path="diet/") # path has 'diet/' in it
import time
sr.query(url, after=time.time() - 3600) # created less than 1 hour ago
```

Check out the [API documentation](https://artifactdb.github.io/SewerRat-py/) for more details on each function.
For the concepts underlying the SewerRat itself, check out the [repository](https://github.com/ArtifactDB/SewerRat) for a detailed explanation.
5 changes: 3 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
"sphinx.ext.ifconfig",
"sphinx.ext.mathjax",
"sphinx.ext.napoleon",
"sphinx_autodoc_typehints",
]

# Add any paths that contain templates here, relative to this directory.
Expand Down Expand Up @@ -171,7 +172,7 @@

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = "alabaster"
html_theme = "furo"

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
Expand Down Expand Up @@ -301,4 +302,4 @@
"pyscaffold": ("https://pyscaffold.org/en/stable", None),
}

print(f"loading configurations for {project} {version} ...", file=sys.stderr)
print(f"loading configurations for {project} {version} ...", file=sys.stderr)
14 changes: 1 addition & 13 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
# SewerRat

Add a short description here!


## Note

> This is the main page of your project's [Sphinx] documentation. It is
> formatted in [Markdown]. Add additional pages by creating md-files in
> `docs` or rst-files (formatted in [reStructuredText]) and adding links to
> them in the `Contents` section below.
>
> Please check [Sphinx] and [MyST] for more information
> about how to document your project and how to configure your preferences.
Python client for the [SewerRat](https://github.com/ArtifactDB/SewerRat) API.

## Contents

Expand Down
2 changes: 2 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@
# sphinx_rtd_theme
myst-parser[linkify]
sphinx>=3.2.1
furo
sphinx-autodoc-typehints

0 comments on commit 729a9dc

Please sign in to comment.