Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 38 additions & 22 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,48 @@
name: docs
permissions:
contents: write
name: GitHub Pages
on:
push:
pull_request:
# Build on any branch; deploy job gates on main
branches:
- '**'

env:
BASE_URL: /${{ github.event.repository.name }}

permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "pip"
- name: Dependencies
run: |
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
- name: Build Jupyter Book
run: |
jupyter-book build docs/
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main' && job.status == 'success'
node-version: 18.x
- name: Install Jupyter Book (via myst)
run: npm install -g jupyter-book
- name: Build HTML Assets
working-directory: docs
run: jupyter-book build --html
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_build/html
enable_jekyll: false
path: "./docs/_build/html"

deploy:
if: github.ref == 'refs/heads/main'
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
9 changes: 4 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ jobs:
build:
name: Build distribution 📦
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- uses: actions/checkout@v4
with:
Expand All @@ -27,7 +26,7 @@ jobs:
- name: Build a binary wheel and a source tarball
run: python3 -m build
- name: Store the distribution packages
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/
Expand All @@ -41,13 +40,13 @@ jobs:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/GOSTnets-raster
url: https://pypi.org/p/GOSTNetsRaster
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing

steps:
- name: Download all the dists
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ci:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand All @@ -20,7 +20,7 @@ repos:
args: [--allow-missing-credentials]
- id: detect-private-key
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.41.0
rev: v0.48.0
hooks:
- id: markdownlint
name: Markdownlint
Expand All @@ -30,15 +30,15 @@ repos:
"--disable=MD033", # no-inline-html
]
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
rev: v2.4.2
hooks:
- id: codespell
name: codespell
description: Checks for common misspellings in text files
args: ["-L", "inH,Parana,gost"]
additional_dependencies: [tomli]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.7
rev: v0.15.13
hooks:
- id: ruff
types_or: [python, pyi, jupyter]
Expand Down
12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# GOSTNets Raster Tools

[https://worldbank.github.io/GOSTnetsraster/](https://worldbank.github.io/GOSTnetsraster/)

This repository includes tools and tutorials for generating travel time/market access data from raster-based measures of travel friction. Foundationally, this builds upon the [global friction surface](https://developers.google.com/earth-engine/datasets/catalog/Oxford_MAP_friction_surface_2019) generated as part of the [Malaria Atlas Project](https://malariaatlas.org/), but includes functions for generating custom travel time surfaces based on landcover and road networks (notably OSM).

Instructions on use are best found in the Notebooks folder, where jupyter notebooks explore the basic functions.
Expand All @@ -10,13 +12,7 @@ Instructions on use are best found in the Notebooks folder, where jupyter notebo
The following instructions have been helpful for installing in a conda environment on a windows machine, so your results may very. These are also specific to our organizational security environment.

```powershell
C:\> conda create --name gnr python=3.12

C:\> conda create --name gnr geopandas
C:\> conda activate gnr

[gnr] pip install geopandas ipykernel

[gnr] C:\Path_to_GOSTnetsraster code\> pip install . -e

[gnr] C:\Path_to_GOSTnetsraster code\> jupyter-notebook
[gnr] C:\> pip install GOSTnetsraster[tutorials]
```
Loading
Loading