-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into 66-check_unmatched_id_warnings-unit-test
- Loading branch information
Showing
44 changed files
with
2,994 additions
and
209 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# This workflow will install OS dependencies and run a 'base' set of unit tests with Python 3.9 | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | ||
|
||
name: Unit tests on macOS/Linux/Windows | ||
|
||
on: | ||
push: | ||
pull_request: | ||
branches: [ "dev", "main" ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.9"] | ||
os: ["macos-latest", "ubuntu-latest", "windows-latest"] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
- name: Run Integration Tests # run only those tests marked runinteg & with no osmosis deps | ||
run: | | ||
pytest -m runinteg --runinteg --deselect tests/osm/ | ||
- name: Test with pytest # run only tests with no osmosis deps | ||
run: | | ||
pytest --deselect tests/osm/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: "Render docs" | ||
|
||
on: push | ||
|
||
env: | ||
PYTHON_VERSION: "3.9" | ||
PUSH_BRANCH: "refs/heads/dev" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ env.PYTHON_VERSION }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
- name: Sphinx build # use -W to turn warnings into errors | ||
run: | | ||
make -C docs/ html SPHINXOPTS="-W" | ||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
# deploy if it's being pushed only to this branch | ||
if: ${{ github.ref == env.PUSH_BRANCH }} | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: docs/build/html | ||
commit_message: ${{ github.event.head_commit.message }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line, and also | ||
# from the environment for the first two. | ||
SPHINXOPTS ?= | ||
SPHINXBUILD ?= sphinx-build | ||
SOURCEDIR = source | ||
BUILDDIR = build | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,88 @@ | ||
# `docs` folder overview | ||
|
||
All documentation for the project should be included in this folder. | ||
This folder contains all the source files needed to build package documentation | ||
using [`sphinx`](https://www.sphinx-doc.org/en/master/). | ||
|
||
## Building the documentation locally | ||
|
||
This is useful whilst editing the documentation locally and previewing new | ||
additions/edits. Following the steps below will render the documenation locally | ||
allowing you to check for any warnings or errors during the build stage. | ||
|
||
1. Ensure the dependencies in `requirements.txt` have been installed. This will | ||
install `sphinx`, the necessary themes, and all the other Python dependecies | ||
for this package. | ||
|
||
2. Call the following from the project root: | ||
|
||
```bash | ||
make -C docs/ html | ||
``` | ||
|
||
Or, from the within this docs directory: | ||
|
||
```bash | ||
make html | ||
``` | ||
|
||
> Note: On Windows, if you are using PowerShell the make command may not | ||
work. If this is the case, you should be able to run `.\make.bat html` | ||
after navigating to this directory. | ||
|
||
Calling one of the commands above will trigger `sphinx-build` and render | ||
the documentaion in HTML format within the `build` directory. | ||
|
||
3. Inside `docs/build/html/`, opening/refreshing `index.html` in a browser will | ||
display the documentation landing page. | ||
|
||
## Cleaning the docs folder | ||
|
||
From time to time, it maybe necessary to clean the build folder (e.g., to | ||
unpick some edits that have not made their way through to the browser for some | ||
reason). | ||
|
||
> Note: `sphinx-build` will only rebuild pages if the respective source file(s) | ||
has changed. Calling clean maybe helpful to either force an entire rebuild of | ||
all pages, or include an update that isn't picked up via a source (e.g. a CSS | ||
file update). | ||
To clean the build folder, call the following: | ||
```bash | ||
# from the project root | ||
make -C docs/ clean | ||
# or, from within the docs folder | ||
make clean | ||
``` | ||
It's also possible to combine both the clean and HTML build commands together | ||
as follows: | ||
|
||
```bash | ||
# from the project root | ||
make -C docs/ clean html | ||
# or, from within the docs folder | ||
make clean html | ||
``` | ||
|
||
> Note: the contents of the `docs/build` folder are ignored by Git. Cleaning | ||
the build folder locally will therefore only impact your local documentation | ||
build. | ||
|
||
## Building the documentation 'on push' to a remote branch | ||
|
||
There is a GitHub action set-up (`.github/workflows/sphinx-render.yml`) that | ||
runs on all pushes to any branch. This will attempt to build the `docs/source` | ||
folder content and will fail if `sphinx-build` throws any errors or warnings. | ||
This helps ensure the quality of the documentation on each push and allows | ||
developers to correct any issues sooner. | ||
|
||
The deployment stage of this GitHub action is only done when pushing to the | ||
`dev` branch (i.e. after merging in a PR). Therefore, any changes made to | ||
`docs` in a feature branch will not appear in the deployed documentation. | ||
|
||
> Note: the current implementation of the GitHub action deploys on push to | ||
`dev` but this is subject to change at a later date. It will likely be change | ||
to puses to `main` once an inital release of this package is available. |
Oops, something went wrong.