Skip to content

Commit 9594fbe

Browse files
authored
Merge pull request #10 from scientificcomputing/dependabot
Add dependabot
2 parents dc9d3a3 + 0d9d143 commit 9594fbe

15 files changed

+3334
-570
lines changed

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "github-actions" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "weekly"

.github/workflows/build_docs.yml

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,40 +10,31 @@ on:
1010

1111
jobs:
1212
build_docs:
13-
runs-on: ubuntu-22.04
13+
runs-on: ubuntu-24.04
1414
env:
15-
PYTHON_VERSION: "3.10"
1615
PUBLISH_DIR: ./_build/html
1716

1817
steps:
1918
# checkout the repository
20-
- uses: actions/checkout@v4
19+
- uses: actions/checkout@v5
2120

2221
# setup Python
23-
- name: Install Python ${{ env.PYTHON_VERSION }}
24-
uses: actions/setup-python@v4
22+
- name: Install Python
23+
uses: actions/setup-python@v6
2524
with:
26-
python-version: ${{ env.PYTHON_VERSION }}
25+
python-version-file: ".python-version"
2726

28-
# preserve pip cache to speed up installation
29-
- name: Cache pip
30-
uses: actions/cache@v3
31-
with:
32-
path: ~/.cache/pip
33-
# Look to see if there is a cache hit for the corresponding requirements file
34-
key: ${{ runner.os }}-pip-${{ hashFiles('*requirements-docs.txt') }}
35-
restore-keys: |
36-
${{ runner.os }}-pip-
37-
- name: Install Python dependencies
38-
run: |
39-
python3 -m pip install --upgrade pip
40-
python3 -m pip install -r requirements-docs.txt
27+
- name: Install uv
28+
uses: astral-sh/setup-uv@v6
29+
30+
- name: Install the project
31+
run: uv sync --extra docs
4132

4233
- name: Build docs
43-
run: python3 -m jupyter book build .
34+
run: uv run jupyter book build .
4435

4536
- name: Upload artifact
46-
uses: actions/upload-artifact@v3
37+
uses: actions/upload-artifact@v5
4738
with:
4839
name: documentation
4940
path: ${{ env.PUBLISH_DIR }}

.github/workflows/deploy_docs.yml

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,41 @@
1-
name: Github Pages
1+
name: Publish documentation
22

33
on:
44
push:
5-
branches: [main] # Only run on push to main
5+
branches: [main]
6+
workflow_dispatch:
7+
68

7-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
89
permissions:
910
contents: read
1011
pages: write
1112
id-token: write
1213

13-
# Allow one concurrent deployment
1414
concurrency:
1515
group: "pages"
1616
cancel-in-progress: true
1717

1818
jobs:
19-
build-docs:
19+
20+
build:
2021
uses: ./.github/workflows/build_docs.yml
2122

2223
deploy:
23-
needs: [build-docs]
24-
24+
needs: build
2525
environment:
2626
name: github-pages
2727
url: ${{ steps.deployment.outputs.page_url }}
2828

2929
runs-on: ubuntu-latest
30-
steps:
31-
- name: Download docs artifact
32-
# docs artifact is uploaded by build-docs job
33-
uses: actions/download-artifact@v3
34-
with:
35-
name: documentation
36-
path: "./public"
37-
38-
- name: Upload artifact
39-
uses: actions/upload-pages-artifact@v2
40-
with:
41-
path: "./public"
4230

31+
steps:
4332
- name: Checkout
44-
uses: actions/checkout@v4
33+
uses: actions/checkout@v5
4534

4635
- name: Setup Pages
47-
uses: actions/configure-pages@v3
36+
uses: actions/configure-pages@v5
37+
4838

4939
- name: Deploy to GitHub Pages
5040
id: deployment
51-
uses: actions/deploy-pages@v2
41+
uses: actions/deploy-pages@v4

.github/workflows/pre-commit.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,13 @@ on:
99

1010
jobs:
1111
check-code:
12-
runs-on: ubuntu-22.04
12+
runs-on: ubuntu-24.04
1313
steps:
1414
# This action sets the current path to the root of your github repo
15-
- uses: actions/checkout@v4
15+
- uses: actions/checkout@v5
16+
17+
- name: Install Python
18+
uses: actions/setup-python@v6
1619

1720
- name: Install pre-commit
1821
run: python3 -m pip install pre-commit

.github/workflows/reproduce_results.yml

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -22,38 +22,32 @@ jobs:
2222
RESULTDIR: ./artifacts/results
2323

2424
steps:
25-
- uses: actions/checkout@v4
25+
- uses: actions/checkout@v5
2626

27-
- name: Setup Python
28-
uses: actions/setup-python@v4
27+
# setup Python
28+
- name: Install Python
29+
uses: actions/setup-python@v6
2930
with:
30-
python-version: "3.10"
31+
python-version-file: ".python-version"
3132

32-
- name: Cache
33-
id: cache
34-
uses: actions/cache@v3
35-
with:
36-
path: |
37-
~/.cache/pip
38-
key: cache_v1
39-
restore-keys: |
40-
cache_v1
33+
- name: Install uv
34+
uses: astral-sh/setup-uv@v6
4135

42-
- name: Install dependencies
43-
run: python3 -m pip install -r requirements.txt
36+
- name: Install the project
37+
run: uv sync
4438

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

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

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

5448
- name: Upload artifact
5549
if: always()
56-
uses: actions/upload-artifact@v3
50+
uses: actions/upload-artifact@v5
5751
with:
5852
path: ./artifacts
5953
if-no-files-found: error

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.12

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,19 @@ Provide the abstract of the paper
1111

1212
## Getting started
1313

14-
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/).
14+
First install `uv`
15+
```bash
16+
curl -LsSf https://astral.sh/uv/install.sh | sh
17+
```
18+
Then create a virtual environment and install dependencies
19+
20+
```bash
21+
uv venv
22+
source .venv/bin/activate
23+
uv sync --locked --all-extras --dev
24+
```
25+
26+
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/).
1527

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

_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ sphinx:
5151
- "sphinxcontrib.bibtex"
5252

5353

54-
exclude_patterns: [".pytest_cache/*", ".github/*"]
54+
exclude_patterns: [".pytest_cache/*", ".github/*", "venv/*", ".venv/*"]

cspell.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"nagumo",
1313
"postprocess",
1414
"scientificcomputing",
15-
"zenodo"
15+
"zenodo",
16+
"venv"
1617
],
1718
"ignoreWords": [],
1819
"import": []

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ build-backend = "setuptools.build_meta"
55
[project]
66
name = "my-paper"
77
version = "1.2.0"
8+
requires-python = ">=3.10"
89
dependencies = [
910
"ap_features",
1011
"matplotlib",

0 commit comments

Comments
 (0)