Skip to content

Commit 5479845

Browse files
authored
Prepare1.2 (#490)
* Bump Version and update README * Update changelog * Rename trapz to trapezoid * Update github actions * revent gauss norm * Add par0 to dockstring * Updated github actions * Closes #507 * Start of doc page for DeerLab 1.2 * Pathways example bug fixed: * Updated Github actions * Dipolar Spectrum example * `fitresult.modelUncert` exports properly for bootstrapped fits * Updated changelog * Example bug fix * Updated README.md and setup.py * Updated reference.rst
1 parent 2ef7168 commit 5479845

18 files changed

Lines changed: 379 additions & 264 deletions

.github/workflows/ci_PR.yml

Lines changed: 41 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,41 @@
1-
name: DeerLab PR tests
2-
on:
3-
pull_request:
4-
branches:
5-
- "**"
6-
7-
jobs:
8-
tests:
9-
name: python test
10-
runs-on: ${{ matrix.os }}
11-
strategy:
12-
fail-fast: false
13-
matrix:
14-
os: [ubuntu-latest, macos-latest, windows-latest]
15-
python-version: ['3.11','3.12']
16-
17-
steps:
18-
- uses: actions/checkout@v3
19-
20-
- name: Set up Python ${{ matrix.python-version }}
21-
uses: actions/setup-python@v4
22-
with:
23-
python-version: ${{ matrix.python-version }}
24-
cache: 'pip'
25-
cache-dependency-path: setup.py
26-
- run: |
27-
python -m pip install --upgrade pip
28-
pip install wheel
29-
pip install .
30-
31-
- name: Test with pytest
32-
run: |
33-
pytest
1+
name: DeerLab PR tests
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- "**"
7+
8+
permissions:
9+
contents: read
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
tests:
17+
name: python test
18+
runs-on: ${{ matrix.os }}
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
os: [ubuntu-latest, macos-latest, windows-latest]
23+
python-version: ['3.12', '3.13', '3.14']
24+
25+
steps:
26+
- uses: actions/checkout@v4
27+
28+
- name: Set up Python ${{ matrix.python-version }}
29+
uses: actions/setup-python@v5
30+
with:
31+
python-version: ${{ matrix.python-version }}
32+
cache: 'pip'
33+
cache-dependency-path: setup.py
34+
35+
- name: Install dependencies
36+
run: |
37+
python -m pip install --upgrade pip
38+
pip install .
39+
40+
- name: Test with pytest
41+
run: pytest

.github/workflows/ci_scheduled.yml

Lines changed: 37 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,37 @@
1-
name: Scheduled DeerLab tests
2-
on:
3-
workflow_dispatch:
4-
schedule:
5-
# Run once a week on Monday at 6:30 AM
6-
- cron: '30 6 * * 1'
7-
8-
jobs:
9-
matrix_test:
10-
runs-on: ${{ matrix.os }}
11-
strategy:
12-
fail-fast: false
13-
matrix:
14-
os: [ubuntu-latest, macos-latest, windows-latest]
15-
python-version: [3.9, "3.10", "3.11", "3.12"]
16-
steps:
17-
- uses: actions/checkout@v3
18-
19-
- name: Set up Python ${{ matrix.python-version }}
20-
uses: actions/setup-python@v4
21-
with:
22-
python-version: ${{ matrix.python-version }}
23-
cache: 'pip'
24-
cache-dependency-path: setup.py
25-
- run: |
26-
python -m pip install --upgrade pip
27-
pip install wheel
28-
pip install .
29-
30-
# - uses: actions/cache@v2
31-
# if: startsWith(runner.os, 'Windows')
32-
# with:
33-
# path: |
34-
# ~\AppData\Local\pip\Cache
35-
# key: ${{ runner.os }}-${{ hashFiles('**/setup.py') }}
36-
# restore-keys: |
37-
# {{ runner.os }}-pip-
38-
39-
# - uses: actions/cache@v2
40-
# if: startsWith(runner.os, 'macOS')
41-
# with:
42-
# path: |
43-
# ~/Library/Caches/pip
44-
# key: ${{ runner.os }}-${{ hashFiles('**/setup.py') }}
45-
# restore-keys: |
46-
# {{ runner.os }}-pip-
47-
48-
# - uses: actions/cache@v2
49-
# if: startsWith(runner.os, 'Linux')
50-
# with:
51-
# path: |
52-
# ~/.cache/pip
53-
# key: ${{ runner.os }}-${{ hashFiles('**/setup.py') }}
54-
# restore-keys: |
55-
# {{ runner.os }}-pip-
56-
57-
# - name: Install dependencies
58-
# if: steps.cache.outputs.cache-hit != 'false'
59-
# run: |
60-
# python -m pip install --upgrade pip
61-
# pip install wheel
62-
# pip install .
63-
64-
# - name: Windows MKL linking
65-
# if: matrix.os == 'windows-latest'
66-
# run: |
67-
# python upgrade_mkl.py
68-
69-
- name: Test with pytest
70-
run: pytest
1+
name: Scheduled DeerLab tests
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
# Run once a week on Monday at 6:30 AM UTC
7+
- cron: '30 6 * * 1'
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
matrix_test:
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
os: [ubuntu-latest, macos-latest, windows-latest]
19+
python-version: ["3.10", "3.11", "3.12", "3.13"]
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
24+
- name: Set up Python ${{ matrix.python-version }}
25+
uses: actions/setup-python@v5
26+
with:
27+
python-version: ${{ matrix.python-version }}
28+
cache: 'pip'
29+
cache-dependency-path: setup.py
30+
31+
- name: Install dependencies
32+
run: |
33+
python -m pip install --upgrade pip
34+
pip install .
35+
36+
- name: Test with pytest
37+
run: pytest
Lines changed: 42 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,53 @@
11
name: Docs Build & Deployment
22

3-
on:
3+
on:
44
workflow_dispatch:
55
release:
66
types: [published]
77

8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
813
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Set up Python 3.13
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: '3.13'
23+
cache: 'pip'
24+
cache-dependency-path: setup.py
25+
26+
- name: Install dependencies
27+
run: |
28+
python -m pip install --upgrade pip
29+
python -m pip install furo numpydoc sphinx-gallery sphinxcontrib-httpdomain sphinxcontrib-ghcontributors sphinx-issues sphinx-copybutton sphinx sphinx-design .
30+
sudo apt-get update -y
31+
sudo apt-get install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
32+
33+
- name: Configure Pages
34+
uses: actions/configure-pages@v5
35+
36+
- name: Build with Sphinx
37+
run: sphinx-build -E -b html ./docsrc/source ./docs
38+
39+
- name: Upload Pages artifact
40+
uses: actions/upload-pages-artifact@v3
41+
with:
42+
path: ./docs
943

1044
deploy:
45+
needs: build
1146
runs-on: ubuntu-latest
47+
environment:
48+
name: github-pages
49+
url: ${{ steps.deployment.outputs.page_url }}
1250
steps:
13-
- uses: actions/checkout@v3
14-
15-
- name: Set up Python 3.10
16-
uses: actions/setup-python@v4
17-
with:
18-
python-version: '3.10'
19-
cache: 'pip'
20-
cache-dependency-path: setup.py
21-
- name: Install dependencies
22-
run: |
23-
python -m pip install --upgrade pip
24-
python -m pip install furo
25-
python -m pip install numpydoc
26-
python -m pip install sphinx-gallery
27-
python -m pip install sphinxcontrib-httpdomain
28-
python -m pip install sphinxcontrib-ghcontributors
29-
python -m pip install sphinx-issues
30-
python -m pip install sphinx-copybutton
31-
python -m pip install sphinx
32-
python -m pip install sphinx-design
33-
python -m pip install .
34-
sudo apt-get update -y
35-
sudo apt-get install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
36-
- name: Build with Sphinx
37-
run: |
38-
sphinx-build -E -b html ./docsrc/source ./docs
39-
- name: Deploy to GH-Pages
40-
if: always()
41-
uses: peaceiris/actions-gh-pages@v3
42-
with:
43-
github_token: ${{ secrets.GITHUB_TOKEN }}
44-
publish_dir: ./docs
51+
- name: Deploy to GitHub Pages
52+
id: deployment
53+
uses: actions/deploy-pages@v4

.github/workflows/docs_PR.yml

Lines changed: 41 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,41 @@
1-
name: Test documentation build PR
2-
3-
on:
4-
pull_request:
5-
branches:
6-
- "**"
7-
paths:
8-
- 'docsrc/**'
9-
- '.github/workflows/deploy_ghpages.yml'
10-
- '.github/workflows/docs_PR.yml'
11-
- '.github/workflows/examples_PR.yml'
12-
jobs:
13-
14-
docsbuild:
15-
runs-on: ubuntu-latest
16-
steps:
17-
- uses: actions/checkout@v3
18-
19-
- name: Set up Python 3.10
20-
uses: actions/setup-python@v4
21-
with:
22-
python-version: '3.10'
23-
cache: 'pip'
24-
cache-dependency-path: setup.py
25-
- name: Install dependencies
26-
run: |
27-
python -m pip install --upgrade pip
28-
pip install furo
29-
pip install numpydoc
30-
pip install sphinx-gallery
31-
pip install sphinxcontrib-httpdomain
32-
pip install sphinxcontrib-ghcontributors
33-
pip install sphinx-issues
34-
pip install sphinx-copybutton
35-
pip install sphinx
36-
pip install sphinx-design
37-
python -m pip install .
38-
sudo apt-get update -y
39-
sudo apt-get install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
40-
41-
42-
- name: Build with Sphinx
43-
run: |
44-
sphinx-build -E -b html ./docsrc/source ./docs -D plot_gallery=0
1+
name: Test documentation build PR
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- "**"
7+
paths:
8+
- 'docsrc/**'
9+
- '.github/workflows/deploy_ghpages.yml'
10+
- '.github/workflows/docs_PR.yml'
11+
- '.github/workflows/examples_PR.yml'
12+
13+
permissions:
14+
contents: read
15+
16+
concurrency:
17+
group: ${{ github.workflow }}-${{ github.ref }}
18+
cancel-in-progress: true
19+
20+
jobs:
21+
docsbuild:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- name: Set up Python 3.13
27+
uses: actions/setup-python@v5
28+
with:
29+
python-version: '3.13'
30+
cache: 'pip'
31+
cache-dependency-path: setup.py
32+
33+
- name: Install dependencies
34+
run: |
35+
python -m pip install --upgrade pip
36+
python -m pip install furo numpydoc sphinx-gallery sphinxcontrib-httpdomain sphinxcontrib-ghcontributors sphinx-issues sphinx-copybutton sphinx sphinx-design .
37+
sudo apt-get update -y
38+
sudo apt-get install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
39+
40+
- name: Build with Sphinx
41+
run: sphinx-build -E -b html ./docsrc/source ./docs -D plot_gallery=0

0 commit comments

Comments
 (0)