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
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "github-actions" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
33 changes: 12 additions & 21 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,40 +10,31 @@ on:

jobs:
build_docs:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
env:
PYTHON_VERSION: "3.10"
PUBLISH_DIR: ./_build/html

steps:
# checkout the repository
- uses: actions/checkout@v4
- uses: actions/checkout@v5

# setup Python
- name: Install Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v4
- name: Install Python
uses: actions/setup-python@v6
with:
python-version: ${{ env.PYTHON_VERSION }}
python-version-file: ".python-version"

# preserve pip cache to speed up installation
- name: Cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-pip-${{ hashFiles('*requirements-docs.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install Python dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements-docs.txt
- name: Install uv
uses: astral-sh/setup-uv@v6

- name: Install the project
run: uv sync --extra docs

- name: Build docs
run: python3 -m jupyter book build .
run: uv run jupyter book build .

- name: Upload artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v5
with:
name: documentation
path: ${{ env.PUBLISH_DIR }}
34 changes: 12 additions & 22 deletions .github/workflows/deploy_docs.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,41 @@
name: Github Pages
name: Publish documentation

on:
push:
branches: [main] # Only run on push to main
branches: [main]
workflow_dispatch:


# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true

jobs:
build-docs:

build:
uses: ./.github/workflows/build_docs.yml

deploy:
needs: [build-docs]

needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest
steps:
- name: Download docs artifact
# docs artifact is uploaded by build-docs job
uses: actions/download-artifact@v3
with:
name: documentation
path: "./public"

- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: "./public"

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Setup Pages
uses: actions/configure-pages@v3
uses: actions/configure-pages@v5


- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v4
7 changes: 5 additions & 2 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@ on:

jobs:
check-code:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
# This action sets the current path to the root of your github repo
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- name: Install Python
uses: actions/setup-python@v6

- name: Install pre-commit
run: python3 -m pip install pre-commit
Expand Down
32 changes: 13 additions & 19 deletions .github/workflows/reproduce_results.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,38 +22,32 @@ jobs:
RESULTDIR: ./artifacts/results

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- name: Setup Python
uses: actions/setup-python@v4
# setup Python
- name: Install Python
uses: actions/setup-python@v6
with:
python-version: "3.10"
python-version-file: ".python-version"

- name: Cache
id: cache
uses: actions/cache@v3
with:
path: |
~/.cache/pip
key: cache_v1
restore-keys: |
cache_v1
- name: Install uv
uses: astral-sh/setup-uv@v6

- name: Install dependencies
run: python3 -m pip install -r requirements.txt
- name: Install the project
run: uv sync

- name: Run pre-processing
run: python3 code/pre_processing.py --datapath=${{ env.DATAPATH }}
run: uv run python3 code/pre_processing.py --datapath=${{ env.DATAPATH }}

- name: Run simulation
run: python3 code/run_all.py --resultdir=${{ env.RESULTDIR }}
run: uv run python3 code/run_all.py --resultdir=${{ env.RESULTDIR }}

- name: Postprocess
run: python3 code/postprocess.py --resultdir=${{ env.RESULTDIR }} --datapath=${{ env.DATAPATH }} --figdir=${{ env.FIGDIR }}
run: uv run python3 code/postprocess.py --resultdir=${{ env.RESULTDIR }} --datapath=${{ env.DATAPATH }} --figdir=${{ env.FIGDIR }}

- name: Upload artifact
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v5
with:
path: ./artifacts
if-no-files-found: error
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.12
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,19 @@ Provide the abstract of the paper

## Getting started

We provide a pre-build Docker image which can be used to run the the code in this repository. First thing you need to do is to ensure that you have [docker installed](https://docs.docker.com/get-docker/).
First install `uv`
```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
```
Then create a virtual environment and install dependencies

```bash
uv venv
source .venv/bin/activate
uv sync --locked --all-extras --dev
```

We also provide a pre-build Docker image which can be used to run the the code in this repository. First thing you need to do is to ensure that you have [docker installed](https://docs.docker.com/get-docker/).

To start an interactive docker container you can execute the following command

Expand Down
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ sphinx:
- "sphinxcontrib.bibtex"


exclude_patterns: [".pytest_cache/*", ".github/*"]
exclude_patterns: [".pytest_cache/*", ".github/*", "venv/*", ".venv/*"]
3 changes: 2 additions & 1 deletion cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"nagumo",
"postprocess",
"scientificcomputing",
"zenodo"
"zenodo",
"venv"
],
"ignoreWords": [],
"import": []
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "my-paper"
version = "1.2.0"
requires-python = ">=3.10"
dependencies = [
"ap_features",
"matplotlib",
Expand Down
94 changes: 0 additions & 94 deletions requirements-dev.txt

This file was deleted.

Loading