Skip to content

Commit a5e3421

Browse files
committed
build: Removed pinned version of vcrpy. Updated and pinned versions of actions/checkout for all GH actions. Cleaned unnecessary matrix for sphinx. Uploaded installing of floatcsep in actions. Updated secrets access for coverage. Added check with twine for release pypi
docs: Updated readthedocs.yaml to indicate sphinx config and properly build floatcsep.
1 parent 889b04f commit a5e3421

7 files changed

+29
-23
lines changed

.github/workflows/build-sphinx.yml

+2-6
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,14 @@ jobs:
1515
shell: bash -l {0}
1616

1717
steps:
18-
- uses: actions/checkout@v2
18+
- uses: actions/checkout@v4.2.2
1919
- uses: mamba-org/setup-micromamba@v1
2020
with:
2121
generate-run-shell: true
2222
environment-file: environment.yml
23-
create-args: >-
24-
python=${{ matrix.python-version }}
25-
2623
- name: Install floatCSEP
2724
run: |
28-
pip install -r requirements_dev.txt
29-
pip install --no-deps -e .
25+
pip install -e .[dev]
3026
python -c "import floatcsep; print('Version: ', floatcsep.__version__)"
3127
3228
- name: Build documentation

.github/workflows/build-test.yml

+7-6
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
shell: bash -l {0}
2222

2323
steps:
24-
- uses: actions/checkout@v2
24+
- uses: actions/checkout@v4.2.2
2525
- uses: mamba-org/setup-micromamba@v1
2626
with:
2727
generate-run-shell: true
@@ -32,15 +32,16 @@ jobs:
3232
3333
- name: Install floatCSEP
3434
run: |
35-
pip install pytest pytest-cov vcrpy==4.3.1
36-
pip install --no-deps -e .
35+
pip install -e .[dev]
3736
python -c "import floatcsep; print('Version: ', floatcsep.__version__)"
3837
3938
- name: Test with pytest
4039
run: |
41-
pytest --durations=0 --cov=./ --cov-config=.coveragerc
40+
pytest --durations=0
4241
4342
- name: Upload coverage
4443
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10'
45-
run: |
46-
bash <(curl -s https://codecov.io/bash) -t ${{ secrets.CODECOV_TOKEN }}
44+
uses: codecov/codecov-action@v3
45+
with:
46+
token: ${{ secrets.CODECOV_TOKEN }}
47+
fail_ci_if_error: false

.github/workflows/publish-pypi.yml

+8-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
shell: bash -l {0}
1616

1717
steps:
18-
- uses: actions/checkout@v2
18+
- uses: actions/checkout@v4.2.2
1919
- uses: mamba-org/setup-micromamba@v1
2020
with:
2121
generate-run-shell: true
@@ -25,14 +25,19 @@ jobs:
2525
2626
- name: Install py-build and setuptools-scm
2727
run: |
28-
micromamba run -n floatcsep python3 -m pip install --upgrade build setuptools-scm
28+
micromamba run -n floatcsep pip install --upgrade build setuptools-scm
2929
3030
- name: Build
3131
run: |
3232
micromamba run -n floatcsep python3 -m build --sdist --wheel --outdir dist/
3333
34+
- name: Check distribution files
35+
run: |
36+
micromamba run -n floatcsep pip install twine
37+
micromamba run -n floatcsep twine check dist/*
38+
3439
- name: Publish Package
35-
uses: pypa/gh-action-pypi-publish@v1.9.0
40+
uses: pypa/gh-action-pypi-publish@v1.12.4
3641
with:
3742
user: __token__
3843
password: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/release-tutorials.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ jobs:
1010

1111
steps:
1212
- name: Check out the code
13-
uses: actions/checkout@v3
13+
uses: actions/checkout@v4.2.2
1414

1515
- name: Zip the tutorials folder
1616
run: |
1717
zip -r tutorials.zip tutorials/
1818
1919
- name: Upload the tutorials.zip to the release
20-
uses: softprops/action-gh-release@v1
20+
uses: softprops/action-gh-release@v2.2.2
2121
with:
2222
files: tutorials.zip
2323
env:

.readthedocs.yaml

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
version: 2
22

33
build:
4-
os: "ubuntu-20.04"
4+
os: "ubuntu-22.04"
55
tools:
6-
python: "mambaforge-4.10"
6+
python: "mambaforge-22.9"
77

88
conda:
99
environment: environment.yml
@@ -12,5 +12,9 @@ python:
1212
install:
1313
- method: pip
1414
path: .
15-
- method: pip
16-
path: .[dev] # Install development dependencies via pip
15+
extra_requirements:
16+
- dev
17+
editable: true
18+
19+
sphinx:
20+
configuration: docs/conf.py

requirements_dev.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@ sphinx-toolbox
3232
sphinx_copybutton
3333
tables
3434
tox
35-
vcrpy==4.3.1
35+
vcrpy
3636
xmltodict

setup.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ dev =
8080
sphinx_copybutton
8181
tables
8282
tox
83-
vcrpy==4.3.1
83+
vcrpy
8484
xmltodict
8585

8686
[options.entry_points]

0 commit comments

Comments
 (0)