diff --git a/.github/workflows/download_data.yml b/.github/workflows/download_data.yml index f218a18..a1e192c 100644 --- a/.github/workflows/download_data.yml +++ b/.github/workflows/download_data.yml @@ -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 diff --git a/bin/download_scopesim_data.sh b/bin/download_scopesim_data.sh index d212c9a..9926b50 100755 --- a/bin/download_scopesim_data.sh +++ b/bin/download_scopesim_data.sh @@ -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 @@ -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 @@ -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