Skip to content
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

Run poetry update and reinstall everything with pip #20

Merged
merged 7 commits into from
Nov 19, 2024
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
2 changes: 2 additions & 0 deletions .github/workflows/download_data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
43 changes: 42 additions & 1 deletion bin/download_scopesim_data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,33 @@ pip install poetry

# Download and install all the packages. Has to be done from git, because the
# releases do not (always) have the test files.
# TODO: Add speXtra and Pickles?
# All poetry files are updated with `poetry update` to ensure we test the latest
# versions of our dependencies.

# Pyckles must go first, because otherwise it uninstalls scipy (????). See
# https://stackoverflow.com/questions/67085976/how-to-stop-poetry-from-uninstalling-packages
git clone https://github.com/AstarVienna/Pyckles.git
pushd Pyckles
poetry install --with=test,docs
poetry update --with=test,docs
popd

git clone https://github.com/AstarVienna/speXtra.git
pushd speXtra
poetry install --with=test,docs
poetry update --with=test,docs
popd

git clone https://github.com/AstarVienna/ScopeSim.git
pushd ScopeSim
poetry install --with=test,dev,docs
poetry update --with=test,dev,docs
popd

git clone https://github.com/AstarVienna/skycalc_ipy.git
pushd skycalc_ipy
poetry install --with=test,docs
poetry update --with=test,docs
popd

git clone https://github.com/AstarVienna/AnisoCADO.git
Expand All @@ -79,6 +96,7 @@ popd
git clone https://github.com/AstarVienna/ScopeSim_Templates.git
pushd ScopeSim_Templates
poetry install --with=test,dev,docs
poetry update --with=test,dev,docs
popd

git clone https://github.com/AstarVienna/irdb.git
Expand All @@ -87,9 +105,32 @@ pushd irdb
pip install -e ".[test]"
popd

# poetry update will upgrade only to the latest versions that are released.
# The packages will therefore downgrade each other.
# But ScopeSim_Data should use the latest version of all our projects
# (to download the data they need, and to test whether they work together).
# So the projects need to be installed again.
# Note that it is not possible to only use pip, poetry is required to install
# the dependency groups (that is, dev/test/docs). See
# https://stackoverflow.com/questions/76118614/is-it-possible-to-install-poetry-groups-with-pip
pip install -e Pyckles
pip install -e speXtra
pip install -e ScopeSim
pip install -e ScopeSim_Templates
pip install -e skycalc_ipy
pip install -e AnisoCADO
pip install -e irdb


# Run the tests.
pushd Pyckles
python -m pytest
popd

pushd speXtra
python -m pytest
popd

pushd skycalc_ipy
python -m pytest
popd
Expand Down