Skip to content
Merged
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
75 changes: 75 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Docs

on:
push:
branches:
- main
paths:
- ".github/workflows/docs.yml"
- "docs/**"
- "tracketch/**"
- "pyproject.toml"
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install documentation dependencies
run: |
python -m pip install --upgrade pip
python -m pip install \
"numpy<=2.2" \
matplotlib \
seaborn \
pyyaml \
pandas \
scipy \
joblib \
scikit-image \
"sphinx>=8,<9" \
"sphinx-rtd-theme>=3.0"

- name: Build HTML documentation
run: python -m sphinx -b html docs docs/_build/html

- name: Disable Jekyll processing
run: touch docs/_build/html/.nojekyll

- name: Configure GitHub Pages
uses: actions/configure-pages@v5

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/_build/html

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
41 changes: 41 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Tests

on:
push:
branches:
- main
paths:
- ".github/workflows/tests.yml"
- "tracketch/**"
- "tests/**"
- "pyproject.toml"
pull_request:
branches:
- main
paths:
- ".github/workflows/tests.yml"
- "tracketch/**"
- "tests/**"
- "pyproject.toml"
workflow_dispatch:

jobs:
pytest:
runs-on: ubuntu-latest

steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Install test dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[dev,numba]"

- name: Run pytest
run: python -m pytest -q
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ docs/_build/
.env
.venv

.github/

# Ruff
.ruff_cache/

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
[![Python](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/)
[![Tests](https://img.shields.io/badge/tests-pytest-brightgreen.svg)](tests/)
[![HitCount](https://hits.dwyl.com/{username}/{project-name}.svg)](https://hits.dwyl.com/{username}/{project-name})
[![HitCount](https://hits.dwyl.com/jbrage/tracketch.svg?style=flat-square&show=unique)](http://hits.dwyl.com/jbrage/tracketch)



# tracketch
Expand Down
4 changes: 4 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
"sphinx.ext.intersphinx",
]

# GitHub Pages builds import the package directly from the repository root.
# Mock native or platform-specific dependencies so autodoc can run in CI.
autodoc_mock_imports = ["numba", "pyamtrack", "skfmm"]

templates_path = ["_templates"]
exclude_patterns = ["_build", "publication"]

Expand Down
Loading