Skip to content

Updated GH and readthedocs actions workflow #49

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 28, 2025
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
7 changes: 2 additions & 5 deletions .github/workflows/build-sphinx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,15 @@ jobs:
shell: bash -l {0}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4.2.2
- uses: mamba-org/setup-micromamba@v1
with:
generate-run-shell: true
environment-file: environment.yml
create-args: >-
python=${{ matrix.python-version }}

- name: Install floatCSEP
run: |
pip install -r requirements_dev.txt
pip install --no-deps -e .
pip install -e .[dev]
python -c "import floatcsep; print('Version: ', floatcsep.__version__)"
- name: Build documentation
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,26 @@ jobs:
shell: bash -l {0}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4.2.2
- uses: mamba-org/setup-micromamba@v1
with:
generate-run-shell: true
environment-file: environment.yml
create-args: >-
python=${{ matrix.python-version }}
- name: Install floatCSEP
run: |
pip install pytest pytest-cov vcrpy==4.3.1
pip install --no-deps -e .
pip install -e .[dev]
python -c "import floatcsep; print('Version: ', floatcsep.__version__)"
- name: Test with pytest
run: |
pytest --durations=0 --cov=./ --cov-config=.coveragerc
pytest --durations=0
- name: Upload coverage
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10'
run: |
bash <(curl -s https://codecov.io/bash) -t ${{ secrets.CODECOV_TOKEN }}
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
11 changes: 8 additions & 3 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
shell: bash -l {0}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4.2.2
- uses: mamba-org/setup-micromamba@v1
with:
generate-run-shell: true
Expand All @@ -25,14 +25,19 @@ jobs:
- name: Install py-build and setuptools-scm
run: |
micromamba run -n floatcsep python3 -m pip install --upgrade build setuptools-scm
micromamba run -n floatcsep pip install --upgrade build setuptools-scm
- name: Build
run: |
micromamba run -n floatcsep python3 -m build --sdist --wheel --outdir dist/
- name: Check distribution files
run: |
micromamba run -n floatcsep pip install twine
micromamba run -n floatcsep twine check dist/*
- name: Publish Package
uses: pypa/gh-action-pypi-publish@v1.9.0
uses: pypa/gh-action-pypi-publish@v1.12.4
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/release-tutorials.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ jobs:

steps:
- name: Check out the code
uses: actions/checkout@v3
uses: actions/checkout@v4.2.2

- name: Zip the tutorials folder
run: |
zip -r tutorials.zip tutorials/
- name: Upload the tutorials.zip to the release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2.2.2
with:
files: tutorials.zip
env:
Expand Down
12 changes: 8 additions & 4 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
version: 2

build:
os: "ubuntu-20.04"
os: "ubuntu-22.04"
tools:
python: "mambaforge-4.10"
python: "mambaforge-22.9"

conda:
environment: environment.yml
Expand All @@ -12,5 +12,9 @@ python:
install:
- method: pip
path: .
- method: pip
path: .[dev] # Install development dependencies via pip
extra_requirements:
- dev
editable: true

sphinx:
configuration: docs/conf.py
2 changes: 1 addition & 1 deletion requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ sphinx-toolbox
sphinx_copybutton
tables
tox
vcrpy==4.3.1
vcrpy
xmltodict
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ dev =
sphinx_copybutton
tables
tox
vcrpy==4.3.1
vcrpy
xmltodict

[options.entry_points]
Expand Down