Skip to content
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
30 changes: 12 additions & 18 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,38 +25,32 @@ jobs:
with:
fetch-depth: 0

- name: Install uv
uses: astral-sh/setup-uv@v4

Comment thread
ColmTalbot marked this conversation as resolved.
- name: Install Pandoc
uses: pandoc/actions/setup@v1

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Setup conda
uses: conda-incubator/setup-miniconda@v3
with:
python-version: "3.11"
channels: conda-forge
auto-update-conda: true
mamba-version: "*"
conda-remove-defaults: "true"

- name: Install dependencies
run: |
eval "$(mamba shell hook --shell bash)"
mamba activate test
mamba install pip setuptools
mamba install --file requirements.txt
mamba install --file pages_requirements.txt
mamba install --file test_requirements.txt
python -m pip install .
uv pip install --system -r requirements.txt
uv pip install --system -r pages_requirements.txt
uv pip install --system -r test_requirements.txt
uv pip install --system .
pre-commit install

- name: Build documentation
run: |
export BILBY_ALLOW_PARAMETERS_AS_STATE=FALSE
cp examples/*.ipynb docs/examples
cd docs
make SPHINXBUILD="mamba run -n test python -m sphinx" clean
make SPHINXBUILD="mamba run -n test python -m sphinx" html
make SPHINXBUILD="python -m sphinx" clean
make SPHINXBUILD="python -m sphinx" html
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: build release distributions
run: |
python -m pip install build setuptools_scm
uv pip install --system build setuptools_scm
python -m build --sdist --wheel --outdir dist/ .
- name: upload wheel and tarball
uses: actions/upload-artifact@v4
Expand Down
29 changes: 12 additions & 17 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install gwpopulation
run: python -m pip install .
run: uv pip install --system .
- name: Run pre-commits
run: |
python -m pip install pre-commit jupyter nbconvert
uv pip install --system pre-commit jupyter nbconvert
pre-commit install
pre-commit run --all-files
jupyter nbconvert --clear-output --inplace examples/*.ipynb
Expand All @@ -46,41 +48,34 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Setup conda
uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
channels: conda-forge,defaults
auto-update-conda: true
mamba-version: "*"
- name: Install dependencies
run: |
mamba install -n test pip setuptools
mamba install -n test --file requirements.txt
mamba install -n test --file test_requirements.txt
# conda run -n test pre-commit install
uv pip install --system -r requirements.txt
uv pip install --system -r test_requirements.txt
- name: Install gwpopulation
run: |
conda run -n test python -m pip install .
uv pip install --system .
- name: List installed
run: |
conda list -n test
uv pip list
- name: Test with pytest
run: |
export BILBY_ALLOW_PARAMETERS_AS_STATE=FALSE
conda run -n test pytest --cov gwpopulation -ra --color yes --cov-report=xml --junitxml=pytest.xml
pytest --cov gwpopulation -ra --color yes --cov-report=xml --junitxml=pytest.xml
- name: Publish coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.xml
flags: python${{ matrix.python-version }}
- name: Coverage report
run: conda run -n test python -m coverage report --show-missing
run: python -m coverage report --show-missing
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
Expand Down