diff --git a/.github/workflows/bridge.yml b/.github/workflows/bridge.yml index 4cc8c8380..f6718b107 100644 --- a/.github/workflows/bridge.yml +++ b/.github/workflows/bridge.yml @@ -13,7 +13,6 @@ env: CHIANTI_DL_URL: https://download.chiantidatabase.org CHIANTI_DB_VER: CHIANTI_v9.0.1_database.tar.gz NBCONVERT_FLAGS: --execute --ExecutePreprocessor.timeout=600 --to html - CMFGEN_DL_URL: http://kookaburra.phyast.pitt.edu/hillier/cmfgen_files CMFGEN_DB_VER: atomic_data_15nov16.tar.gz # original reference data REF1_PATH: ${{ github.workspace }}/tardis-refdata/unit_test_data_org.h5 @@ -54,12 +53,16 @@ jobs: key: ${{ env.CMFGEN_DB_VER }} id: cmfgen-cache - - name: Download CMFGEN database - run: | - wget -q -U "Mozilla/4.0" ${{ env.CMFGEN_DL_URL }}/${{ env.CMFGEN_DB_VER }} -O /tmp/atomic.tar.gz - tar -zxf /tmp/atomic.tar.gz -C /tmp + - name: Checkout CMFGEN data repository + uses: actions/checkout@v5 + with: + repository: tardis-sn/carsus-data-cmfgen + path: cmfgen-data if: steps.cmfgen-cache.outputs.cache-hit != 'true' + - name: Extract CMFGEN database + run: tar -zxf cmfgen-data/${{ env.CMFGEN_DB_VER }} -C /tmp + - uses: mamba-org/setup-micromamba@v2 with: environment-file: conda-lock.yml diff --git a/.github/workflows/docs-build.yml b/.github/workflows/docs-build.yml index 5c358d0ff..860bc6aae 100644 --- a/.github/workflows/docs-build.yml +++ b/.github/workflows/docs-build.yml @@ -30,7 +30,6 @@ env: XUVTOP: /tmp/chianti CHIANTI_DL_URL: https://download.chiantidatabase.org CHIANTI_DB_VER: CHIANTI_10.0_database.tar.gz - CMFGEN_DL_URL: http://kookaburra.phyast.pitt.edu/hillier/cmfgen_files CMFGEN_DB_VER: atomic_data_15nov16.tar.gz DEPLOY_BRANCH: gh-pages # deployed docs branch @@ -113,10 +112,15 @@ jobs: key: ${{ env.CMFGEN_DB_VER }} id: cmfgen-cache - - name: Download CMFGEN database - run: | - wget -q -U "Mozilla/4.0" ${{ env.CMFGEN_DL_URL }}/${{ env.CMFGEN_DB_VER }} -O /tmp/atomic.tar.gz - tar -zxf /tmp/atomic.tar.gz -C /tmp + - name: Checkout CMFGEN data repository + uses: actions/checkout@v5 + with: + repository: tardis-sn/carsus-data-cmfgen + path: cmfgen-data + if: steps.cmfgen-cache.outputs.cache-hit != 'true' + + - name: Extract CMFGEN database + run: tar -zxf cmfgen-data/${{ env.CMFGEN_DB_VER }} -C /tmp if: steps.cmfgen-cache.outputs.cache-hit != 'true' - uses: mamba-org/setup-micromamba@v2 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 894d4a92a..16f1a2604 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -30,20 +30,19 @@ env: PYTEST_FLAGS: --cov=carsus --cov-report=xml --cov-report=html --carsus-regression-data=${{ github.workspace }}/carsus-regression-data NBCONVERT_CMD: jupyter nbconvert --execute --ExecutePreprocessor.timeout=600 --to html CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - CMFGEN_DL_URL: http://kookaburra.phyast.pitt.edu/hillier/cmfgen_files CMFGEN_DB_VER: atomic_data_15nov16.tar.gz jobs: - test-cache: - uses: ./.github/workflows/lfs-cache.yml - with: - atom-data-sparse: false - regression-data-repo: tardis-sn/carsus-regression-data - allow_lfs_pull: ${{ github.ref == 'refs/heads/master' || contains(github.event.pull_request.labels.*.name, 'git-lfs-pull') }} + # test-cache: + # uses: ./.github/workflows/lfs-cache.yml + # with: + # atom-data-sparse: false + # regression-data-repo: tardis-sn/carsus-regression-data + # allow_lfs_pull: ${{ github.ref == 'refs/heads/master' || contains(github.event.pull_request.labels.*.name, 'git-lfs-pull') }} build: if: github.repository_owner == 'tardis-sn' - needs: [test-cache] + # needs: [test-cache] runs-on: ${{ matrix.os }} name: ${{ matrix.label }} strategy: @@ -58,6 +57,65 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Free Disk Space (Ubuntu) + if: matrix.os == 'ubuntu-latest' + uses: jlumbroso/free-disk-space@main + with: + # this might remove tools that are actually needed, + # if set to "true" but frees about 6 GB + tool-cache: false + + # other packages + android: true + dotnet: true + haskell: true + large-packages: true + swap-storage: true + + - name: Free up disk space on macOS + if: matrix.os == 'macos-latest' + continue-on-error: True + run: | + echo "Initial disk usage:" + df -h + + # Remove unnecessary Xcode versions (if any) + if ls /Applications/Xcode_*.app 1> /dev/null 2>&1; then + echo "Removing old Xcode versions..." + sudo rm -rf /Applications/Xcode_*.app + else + echo "No additional Xcode versions found" + fi + + # Clean Homebrew cache + echo "Cleaning Homebrew cache..." + brew cleanup --prune=all || true + + # Remove iOS simulators (only if simctl is available) + if command -v xcrun simctl &> /dev/null; then + echo "Cleaning iOS simulators..." + xcrun simctl delete unavailable || true + else + echo "simctl not available, skipping iOS simulator cleanup" + fi + + # Clear system caches (be more selective) + echo "Clearing system caches..." + rm -rf ~/Library/Caches/* 2>/dev/null || true + + # Remove other large files + sudo rm -rf /usr/local/lib/android 2>/dev/null || true + sudo rm -rf /usr/local/share/dotnet 2>/dev/null || true + sudo rm -rf /usr/share/dotnet 2>/dev/null || true + sudo rm -rf /opt/ghc 2>/dev/null || true + sudo rm -rf "/usr/local/share/boost" 2>/dev/null || true + sudo rm -rf "$AGENT_TOOLSDIRECTORY" 2>/dev/null || true + echo "Final disk usage:" + df -h + + + + - name: Setup LFS uses: ./.github/actions/setup_lfs @@ -79,11 +137,16 @@ jobs: path: /tmp/atomic key: ${{ env.CMFGEN_DB_VER }} id: cmfgen-cache - - - name: Download CMFGEN database - run: | - wget -q -U "Mozilla/4.0" ${{ env.CMFGEN_DL_URL }}/${{ env.CMFGEN_DB_VER }} -O /tmp/atomic.tar.gz - tar -zxf /tmp/atomic.tar.gz -C /tmp + + - name: Checkout CMFGEN data repository + uses: actions/checkout@v4 + with: + repository: tardis-sn/carsus-data-cmfgen + path: cmfgen-data + if: steps.cmfgen-cache.outputs.cache-hit != 'true' + + - name: Copy CMFGEN atomic data + run: cp -r cmfgen-data/atomic /tmp/atomic if: steps.cmfgen-cache.outputs.cache-hit != 'true' - name: Download Lock File diff --git a/docs/installation.rst b/docs/installation.rst index b30cae188..6f47a0794 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -13,7 +13,7 @@ Prerequisites export XUVTOP=/path/to/chianti/root -#. *(optional)*. Download and extract the `CMFGEN Atomic Data `_. +#. *(optional)*. Download and extract the `CMFGEN Atomic Data `_. ==================== Clone the Repository diff --git a/docs/io/cmfgen.ipynb b/docs/io/cmfgen.ipynb index 0a37a6847..33f4671a1 100644 --- a/docs/io/cmfgen.ipynb +++ b/docs/io/cmfgen.ipynb @@ -12,7 +12,7 @@ "\n", "**Note:**\n", " \n", - "In this example, the data was downloaded from the [CMFGEN website](http://kookaburra.phyast.pitt.edu/hillier/web/CMFGEN.htm) and extracted to the `/tmp/atomic` folder.\n", + "In this example, the data was downloaded from the [CMFGEN website](https://sites.pitt.edu/~hillier/web/CMFGEN.htm) and extracted to the `/tmp/atomic` folder.\n", " \n", "\n", "\n" diff --git a/docs/quickstart.ipynb b/docs/quickstart.ipynb index 5efc342a2..8824d113f 100644 --- a/docs/quickstart.ipynb +++ b/docs/quickstart.ipynb @@ -130,7 +130,7 @@ "source": [ "### CMFGEN\n", "\n", - "The atomic database of [CMFGEN](http://kookaburra.phyast.pitt.edu/hillier/web/CMFGEN.htm) is a source of levels, lines and (optionally) **ionization energies**, **photoionization cross-sections** and **collisions**.\n", + "The atomic database of [CMFGEN](https://sites.pitt.edu/~hillier/web/CMFGEN.htm) is a source of levels, lines and (optionally) **ionization energies**, **photoionization cross-sections** and **collisions**.\n", "\n", "
\n", " \n",