Skip to content

Commit b558ea7

Browse files
Merge pull request #3 from GiorgioMedico/dev
Refactoring, Documentation and quaternion splines
2 parents e82784d + f877cc3 commit b558ea7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+25256
-443
lines changed

.github/workflows/docs.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Documentation
2+
3+
on:
4+
push:
5+
branches: [ main, dev ]
6+
paths:
7+
- 'docs/**'
8+
- 'mkdocs.yml'
9+
- 'interpolatepy/**/*.py' # Only Python files for API docs
10+
- '.github/workflows/docs.yml'
11+
pull_request:
12+
branches: [ main ]
13+
paths:
14+
- 'docs/**'
15+
- 'mkdocs.yml'
16+
- 'interpolatepy/**/*.py'
17+
workflow_dispatch: # Allow manual triggering
18+
19+
permissions:
20+
contents: read
21+
pages: write
22+
id-token: write
23+
24+
concurrency:
25+
group: "pages"
26+
cancel-in-progress: false
27+
28+
jobs:
29+
build:
30+
runs-on: ubuntu-latest
31+
32+
steps:
33+
- name: Checkout repository
34+
uses: actions/checkout@v4
35+
36+
- name: Set up Python
37+
uses: actions/setup-python@v5
38+
with:
39+
python-version: '3.11'
40+
cache: 'pip'
41+
42+
- name: Install dependencies
43+
run: |
44+
python -m pip install --upgrade pip
45+
pip install -r requirements-dev.txt
46+
pip install -e .
47+
48+
- name: Build documentation
49+
run: |
50+
mkdocs build --clean --strict
51+
52+
- name: Setup Pages
53+
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
54+
uses: actions/configure-pages@v4
55+
56+
- name: Upload artifact
57+
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
58+
uses: actions/upload-pages-artifact@v3
59+
with:
60+
path: ./site
61+
62+
deploy:
63+
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
64+
environment:
65+
name: github-pages
66+
url: ${{ steps.deployment.outputs.page_url }}
67+
runs-on: ubuntu-latest
68+
needs: build
69+
70+
steps:
71+
- name: Deploy to GitHub Pages
72+
id: deployment
73+
uses: actions/deploy-pages@v4
74+

.github/workflows/test.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,16 @@ jobs:
2424
python -m pip install --upgrade pip
2525
pip install -r requirements-dev.txt
2626
pip install -e .
27-
- name: Testing
27+
- name: Testing with coverage
2828
run: |
29-
python -m pytest tests
29+
python -m pytest tests --cov=interpolatepy --cov-report=xml --cov-report=term-missing
30+
- name: Upload coverage to Codecov
31+
uses: codecov/codecov-action@v5
32+
with:
33+
file: ./coverage.xml
34+
flags: unittests
35+
name: codecov-umbrella
36+
fail_ci_if_error: false
3037

3138
build-macos:
3239
runs-on: macos-latest
@@ -44,6 +51,13 @@ jobs:
4451
python -m pip install --upgrade pip
4552
pip install -r requirements-dev.txt
4653
pip install -e .
47-
- name: Testing
54+
- name: Testing with coverage
4855
run: |
49-
python -m pytest tests
56+
python -m pytest tests --cov=interpolatepy --cov-report=xml --cov-report=term-missing
57+
- name: Upload coverage to Codecov
58+
uses: codecov/codecov-action@v5
59+
with:
60+
file: ./coverage.xml
61+
flags: unittests
62+
name: codecov-umbrella
63+
fail_ci_if_error: false

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ data/*.h5
1919
venv/
2020
.venv/
2121
.conda/
22+
.claude/
2223

2324
################################
2425
########### PYTHON #############
@@ -138,3 +139,5 @@ venv.bak/
138139
.vscode
139140
*.code-workspace
140141
.history
142+
143+
CLAUDE.md

.pre-commit-config.yaml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,18 @@ repos:
88
- id: check-builtin-literals
99
- id: check-merge-conflict
1010
- id: check-yaml
11+
exclude: ^mkdocs\.yml$
1112
- id: check-toml
1213

13-
- repo: https://github.com/PyCQA/isort
14-
rev: 6.0.1
15-
hooks:
16-
- id: isort
17-
18-
- repo: https://github.com/psf/black
19-
rev: 25.1.0
20-
hooks:
21-
- id: black
22-
2314
- repo: https://github.com/astral-sh/ruff-pre-commit
24-
rev: 'v0.11.10'
15+
rev: 'v0.12.7'
2516
hooks:
2617
- id: ruff
2718
types_or: [python, pyi, jupyter]
2819
args: [ --fix, --exit-non-zero-on-fix, --preview ]
2920

3021
- repo: https://github.com/pre-commit/mirrors-mypy
31-
rev: v1.15.0
22+
rev: v1.17.1
3223
hooks:
3324
- id: mypy
3425
args: [--ignore-missing-imports]

0 commit comments

Comments
 (0)