Skip to content

Commit

Permalink
Updated tests and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Ken Lippold authored and Ken Lippold committed Jun 12, 2024
1 parent b5ca1b1 commit 9cc177c
Show file tree
Hide file tree
Showing 211 changed files with 4,654 additions and 18,221 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: HydroServer SensorThings Generate Documentation

on: [push, pull_request, workflow_dispatch]

permissions:
contents: write

jobs:
docs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Install dependencies
run: |
pip install sphinx sphinx_rtd_theme myst_parser
- name: Sphinx build
run: |
sphinx-build docs _build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
publish_branch: docs
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/
force_orphan: true
6 changes: 3 additions & 3 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: HydroServer SensorThings PyPI Publish
run-name: ${{ github.actor }} is running HydroServer SensorThings PyPI Publish on ${{ github.ref }}
run-name: '${{ github.actor }} is running HydroServer SensorThings PyPI Publish on ${{ github.ref }}'

on:
release:
Expand All @@ -13,10 +13,10 @@ jobs:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Set up Python 3.8
- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: '3.8'
python-version: '3.9'

- name: Install dependencies
run: |
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:

strategy:
matrix:
python-version: ['3.8', '3.9', '3.10']
python-version: ['3.9', '3.10', '3.11', '3.12']

steps:
- name: Checkout Repo
Expand All @@ -28,7 +28,6 @@ jobs:
python -m pip install --upgrade pip
pip install -e .
pip install pytest
pip install mock
- name: Run unit tests
run: |
Expand Down
14 changes: 1 addition & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,7 @@ MIDDLEWARE = [
]
```

Then you may use a prebuilt API backend by adding one of the following to your `INSTALLED_APPS` setting:

```
INSTALLED_APPS = [
# ...
'sensorthings.backends.sensorthings',
'sensorthings.backends.odm2',
'sensorthings.backends.frostserver'
# ...
]
```

Alternatively, you may initialize a custom SensorThings API using an existing backend as a template and adding it to your urls.py file:
You may initialize a custom SensorThings API using an existing backend as a template and adding it to your urls.py file:

```
from sensorthings import SensorThingsAPI
Expand Down
4 changes: 0 additions & 4 deletions docs/.buildinfo

This file was deleted.

Empty file removed docs/.nojekyll
Empty file.
10 changes: 3 additions & 7 deletions docsrc/Makefile → docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,16 @@
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

github:
@make html
@cp -a build/html/. ../docs

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
45 changes: 0 additions & 45 deletions docs/_sources/hydrothings.backends.frostserver.rst.txt

This file was deleted.

53 changes: 0 additions & 53 deletions docs/_sources/hydrothings.backends.odm2.rst.txt

This file was deleted.

20 changes: 0 additions & 20 deletions docs/_sources/hydrothings.backends.rst.txt

This file was deleted.

45 changes: 0 additions & 45 deletions docs/_sources/hydrothings.backends.sensorthings.rst.txt

This file was deleted.

29 changes: 0 additions & 29 deletions docs/_sources/hydrothings.components.datastreams.rst.txt

This file was deleted.

29 changes: 0 additions & 29 deletions docs/_sources/hydrothings.components.featuresofinterest.rst.txt

This file was deleted.

29 changes: 0 additions & 29 deletions docs/_sources/hydrothings.components.historicallocations.rst.txt

This file was deleted.

Loading

0 comments on commit 9cc177c

Please sign in to comment.