Skip to content

Commit

Permalink
chore: merge with dev and resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
CBROWN-ONS committed Jul 1, 2024
2 parents 7076870 + cef299b commit cdc5b6a
Show file tree
Hide file tree
Showing 105 changed files with 2,410 additions and 1,012 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/quarto-render.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Fixing OS version to avoid breaking OS changes during development stage.
# Will open up OS versions before release.

name: "Render docs"

on:
push:
branches: [ "dev", "main" ]

env:
PYTHON_VERSION: "3.9"

jobs:
build:
name: Quarto Render
runs-on: ubuntu-22.04
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: Install java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11.0.21'
- name: Check Java Install
run: |
java --version
- name: Install linux depencies with apt
run: |
sudo apt update
sudo apt install -y libgeos-dev
sudo apt-get install osmosis
shell: sh
- name: Build API reference pages
run: |
python -m quartodoc build
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
- name: Render and Publish
uses: quarto-dev/quarto-actions/publish@v2
with:
target: gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38 changes: 0 additions & 38 deletions .github/workflows/sphinx-render.yml

This file was deleted.

15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
docs/tutorials/*_files/
docs/tutorials/outputs/

# transport modelling data formats
**/*.pbf
**/*.mapdb
Expand Down Expand Up @@ -192,6 +195,10 @@ docs/build/
!docs/gtfs
!docs/source/_static/dsc.png
!docs/source/_templates/footer.html
docs/_sidebar.yml
docs/reference/
!docs/_static/tp_logo_white_background.png
!docs/explanation/**/*.PNG

# PyBuilder
.pybuilder/
Expand Down Expand Up @@ -370,3 +377,11 @@ $RECYCLE.BIN/
.vscode/

# End of https://www.toptal.com/developers/gitignore/api/macos,windows,r,python

# venv
.venv/

# Quarto
/.quarto/
_site/
objects.json
18 changes: 9 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ repos:
- --extra-keys
- "metadata.colab metadata.kernelspec cell.metadata.colab cell.metadata.executionInfo cell.metadata.id cell.metadata.outputId"

# ----- isort - imports sorting
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
name: isort (python)
types: [python]
args: [ "--profile", "black", "--filter-files" ]

# ----- black - code formatting
- repo: https://github.com/psf/black
rev: 22.3.0 # Replace by any tag/version: https://github.com/psf/black/tags
Expand All @@ -49,15 +58,6 @@ repos:
- id: flake8
name: flake8 - Python linting

# ----- isort - imports sorting
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
name: isort - Sort Python imports (auto-fixes)
types: [ cython, pyi, python ]
args: [ "--profile", "black", "--filter-files" ]

# ----- nbQA - notebook quality assuring
- repo: https://github.com/nbQA-dev/nbQA
rev: 0.12.0
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--- Badges start --->
<img src="https://img.shields.io/badge/repo%20status-in%20development%20(caution)-red" alt="Repository status is still in development (caution required)"/> <img src="https://github.com/datasciencecampus/transport-network-performance/actions/workflows/python-package-mac.yml/badge.svg" alt="Build status badge on mac"/> <img src="https://github.com/datasciencecampus/transport-network-performance/actions/workflows/python-package-linux.yml/badge.svg" alt="Build status badge on linux"/> <img src="https://github.com/datasciencecampus/transport-network-performance/actions/workflows/python-package-windows.yml/badge.svg" alt="Build status badge on windows"/> <img src="https://github.com/datasciencecampus/transport-network-performance/actions/workflows/integration-tests.yml/badge.svg" alt="Integration Tests"/> <img src="https://github.com/datasciencecampus/transport-network-performance/actions/workflows/sphinx-render.yml/badge.svg" alt="Docs status badge"/> <a href="https://codecov.io/gh/datasciencecampus/transport-network-performance" > <img src="https://codecov.io/gh/datasciencecampus/transport-network-performance/branch/dev/graph/badge.svg?token=ZKJFT321CN"/></a>
<img src="https://img.shields.io/badge/repo%20status-in%20development%20(caution)-red" alt="Repository status is still in development (caution required)"/> <img src="https://github.com/datasciencecampus/transport-network-performance/actions/workflows/python-package-mac.yml/badge.svg" alt="Build status badge on mac"/> <img src="https://github.com/datasciencecampus/transport-network-performance/actions/workflows/python-package-linux.yml/badge.svg" alt="Build status badge on linux"/> <img src="https://github.com/datasciencecampus/transport-network-performance/actions/workflows/python-package-windows.yml/badge.svg" alt="Build status badge on windows"/> <img src="https://github.com/datasciencecampus/transport-network-performance/actions/workflows/integration-tests.yml/badge.svg" alt="Integration Tests"/> <img src="https://github.com/datasciencecampus/transport-network-performance/actions/workflows/quarto-render.yml/badge.svg" alt="Docs status badge"/> <a href="https://codecov.io/gh/datasciencecampus/transport-network-performance" > <img src="https://codecov.io/gh/datasciencecampus/transport-network-performance/branch/dev/graph/badge.svg?token=ZKJFT321CN"/></a>

<!--- Badges end --->

Expand Down
163 changes: 163 additions & 0 deletions _quarto.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
project:
type: website
render:
- "index.qmd"
- "docs/"
- "!notebooks/"
- "!docs/source/"
- "!docs/build/"
- "!*.ipynb"
- "!docs/gtfs/*"
preview:
port: 1111
browser: true
watch-inputs: true
navigate: true
resources:
- "docs/_static/**"

website:
title: "Transport Performance"
favicon: docs/_static/favicon.ico
navbar:
logo: docs/_static/tp_logo_white_background.png
left:
- href: docs/getting_started/index.qmd
text: Getting Started
- href: docs/explanation/index.qmd
text: Explanation
- href: docs/how_to/index.qmd
text: How-To
- href: docs/tutorials/index.qmd
text: Tutorials
- href: docs/reference/index.qmd
text: API Reference
right:
- icon: github
menu:
- text: Source code
url: https://github.com/datasciencecampus/transport-network-performance
- text: Open an issue
url: https://github.com/datasciencecampus/transport-network-performance/issues
sidebar:
style: docked
search: true
collapse-level: 1
contents:
- text: Getting Started
href: docs/getting_started/index.qmd
- section: Explanation
href: docs/explanation/index.qmd
contents:
- "docs/explanation/what_is_tp/index.qmd"
- "docs/explanation/calculate_tp/index.qmd"
- "docs/explanation/limitations/index.qmd"
- section: How-To
href: docs/how_to/index.qmd
contents:
- "docs/how_to/uc_pop/index.qmd"
- "docs/how_to/gtfs/index.qmd"
- "docs/how_to/osm/index.qmd"
- section: Tutorials
href: docs/tutorials/index.qmd
contents:
- "docs/tutorials/urban_centre/index.qmd"
- "docs/tutorials/population/index.qmd"
- "docs/tutorials/gtfs/index.qmd"
- "docs/tutorials/osm/index.qmd"
- "docs/tutorials/analyse_network/index.qmd"
- "docs/tutorials/metrics/index.qmd"
- section: API Reference
href: docs/reference/index.qmd
contents:
- auto: "docs/reference/*.qmd"
reader-mode: true
page-footer:
left: >
These docs are built using [Quarto](https://quarto.org/), [quartodoc](https://machow.github.io/quartodoc/get-started/overview.html), and [Diátaxis](https://diataxis.fr/).
center: >
All content is available under the
[Open Government Licence V3.0](https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/),
except where otherwise stated.
right: >
<a href="https://datasciencecampus.ons.gov.uk/">
<img src="https://datasciencecampus.ons.gov.uk/wp-content/uploads/sites/10/2019/05/DSC.png" alt="Data Science Campus logo" style="height:22px;">
</a>
format:
html:
css: docs/_static/styles.css
mainfont: Arial
theme:
- flatly
- docs/_static/custom.scss
lang: en-GB

metadata-files:
- docs/_sidebar.yml

quartodoc:
title: API reference
package: transport_performance
dir: docs/reference
sidebar: docs/_sidebar.yml
sections:
- title: "`urban_centres`"
desc: >
Modules for detecting urban centres.
- subtitle: "`urban_centres.raster_uc.UrbanCentre`"
desc: >
A class for detecting urban centres using rastered population estimates.
package: transport_performance.urban_centres.raster_uc
contents:
- UrbanCentre
- title: "`population`"
desc: >
Modules for preprocessing population data.
- subtitle: "`population.rasterpop.RasterPop`"
desc: >
A class for preprocessing rastered population estimates.
package: transport_performance.population.rasterpop
contents:
- RasterPop
- title: "`gtfs`"
desc: >
Modules for working with GTFS public transit schedule files.
package: transport_performance.gtfs
contents:
- calendar
- cleaners
- gtfs_utils
- multi_validation
- routes
- validation
- validators
- title: "`osm`"
desc: >
Modules for OpenStreetMap utilities, such are cropping .pbf files to a bounding box.
package: transport_performance.osm
contents:
- osm_utils
- validate_osm
- title: "`analyse_network`"
desc: >
A class wrapping r5py network routing to calculate travel times between all origin/destination cells.
package: transport_performance.analyse_network
contents:
- AnalyseNetwork
- title: "`metrics`"
desc: >
Functions for calculating transport metrics, such as transport performance.
package: transport_performance
contents:
- metrics
- title: "`utils`"
desc: >
Modules to handle common package utility functions.
package: transport_performance.utils
contents:
- defence
- io
- raster

jupyter: python3
20 changes: 0 additions & 20 deletions docs/Makefile

This file was deleted.

Loading

0 comments on commit cdc5b6a

Please sign in to comment.