Skip to content

Commit

Permalink
Use geoana 0.2.1 for building the website (#579)
Browse files Browse the repository at this point in the history
Use an older version of geoana to build the website to avoid errors
coming from incompatibilities with the latest version. Install
`geoana==0.2.1` in GitHub Actions to run tests and to build the website.
Just pinning it in the `requirements.txt` file doesn't work because of
missing build dependencies for that old version. So the build
requirements (listed in a new `requirements-build-geoana.txt` file) are
installed along with other needed packages (e.g. Sphinx), and
`geoana=0.2.1` gets installed with `pip` but disabling the build
isolation (passing `--no-build-isolation`).

This fix is just a patch, we should make the repo compatible with latest
geoana at some point. By then, we should revert these changes.
  • Loading branch information
santisoler authored Dec 4, 2024
1 parent b2cecdb commit ef1646a
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 3 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,16 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
# Gather requirements and install older version of geoana
cat requirements.txt | grep -v "^geoana" > requirements-ci.txt
cat requirements-build-geoana.txt | grep -v "^#" >> requirements-ci.txt
pip install -r requirements-ci.txt
rm requirements-ci.txt
pip install --no-build-isolation geoana==0.2.1
# Install extra packages
pip install flake8 pytest
pip install -r requirements.txt
- name: Test with pytest
run: |
pytest -s -v tests
Expand All @@ -43,7 +51,13 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
# Gather requirements and install older version of geoana
cat requirements.txt | grep -v "^geoana" > requirements-ci.txt
cat requirements-build-geoana.txt | grep -v "^#" >> requirements-ci.txt
pip install -r requirements-ci.txt
rm requirements-ci.txt
pip install --no-build-isolation geoana==0.2.1
- name: Build pages
run: |
Expand Down
13 changes: 13 additions & 0 deletions requirements-build-geoana.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Requirements to build geoana 0.2.1 without isolation
#
# This file was added as a way to install geoana 0.2.1 (old version) in GitHub
# Actions and build the website using an this old version of geoana.
#
# We should remove this file after updating the repo to work with the latest
# version of geoana. The easiest way to do so would be to revert the commit
# that added this file.
#
numpy<1.23
cython
setuptools<60
wheel
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ sphinxcontrib-bibtex
sphinx_rtd_theme
pytest
matplotlib
geoana
geoana==0.2.1

0 comments on commit ef1646a

Please sign in to comment.