Skip to content
Open
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
13 changes: 8 additions & 5 deletions .github/workflows/bridge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/docs-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
89 changes: 76 additions & 13 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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') }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this needed?


build:
if: github.repository_owner == 'tardis-sn'
needs: [test-cache]
# needs: [test-cache]
runs-on: ${{ matrix.os }}
name: ${{ matrix.label }}
strategy:
Expand All @@ -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

Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Prerequisites

export XUVTOP=/path/to/chianti/root

#. *(optional)*. Download and extract the `CMFGEN Atomic Data <http://kookaburra.phyast.pitt.edu/hillier/web/CMFGEN.htm>`_.
#. *(optional)*. Download and extract the `CMFGEN Atomic Data <https://sites.pitt.edu/~hillier/web/CMFGEN.htm>`_.

====================
Clone the Repository
Expand Down
2 changes: 1 addition & 1 deletion docs/io/cmfgen.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
"</div>\n",
"\n"
Expand Down
2 changes: 1 addition & 1 deletion docs/quickstart.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
"<div class=\"alert alert-info\">\n",
" \n",
Expand Down
Loading