Skip to content

Commit

Permalink
Try to get casadata installed first (#32)
Browse files Browse the repository at this point in the history
* Try to get casadata installed first

Installing casatools/casatasks failed with:
```python
AutoUpdatesNotAllowed: data_update: path must exist as a directory and it must be owned by the user, path = /home/runner/.casa/data
```
so maybe if we put `casadata` earlier in the install path it won't try to update?

* Create build.yml

add `build` for PRs (don't deploy on PRs)

* trigger on PRs
  • Loading branch information
keflavich authored May 31, 2024
1 parent 3133e8e commit 4e67c00
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 1 deletion.
61 changes: 61 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Github Pages

on:
issues:
types:
- opened
pull_request_target:
types:
- opened

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up python
id: setup-python
uses: actions/setup-python@v2
with:
python-version: '3.10'
cache: 'pip'

- name: Install requirements
run: pip install -r requirements.txt

- name: Export notebooks
run: |
JUPYTER_CONFIG_DIR=./.jupyter jupyter nbconvert spectral_fitting/*.ipynb --execute --to html --ExecutePreprocessor.kernel_name=python
JUPYTER_CONFIG_DIR=./.jupyter jupyter nbconvert casa_to_spectralcube_guide/*.ipynb --execute --to html --ExecutePreprocessor.kernel_name=python
JUPYTER_CONFIG_DIR=./.jupyter jupyter nbconvert masking_and_moments/*.ipynb --execute --to html --ExecutePreprocessor.kernel_name=python
JUPYTER_CONFIG_DIR=./.jupyter jupyter nbconvert parallel_spectral_fitting/*.ipynb --execute --to html --ExecutePreprocessor.kernel_name=python
JUPYTER_CONFIG_DIR=./.jupyter jupyter nbconvert DameCube.ipynb --execute --to html --ExecutePreprocessor.kernel_name=python
JUPYTER_CONFIG_DIR=./.jupyter jupyter nbconvert PVDiagramPlotting.ipynb --execute --to html --ExecutePreprocessor.kernel_name=python
JUPYTER_CONFIG_DIR=./.jupyter jupyter nbconvert DiskPVExample.ipynb --execute --to html --ExecutePreprocessor.kernel_name=python
# JUPYTER_CONFIG_DIR=./.jupyter jupyter nbconvert SpectralCubeReprojectExample.ipynb --execute --to html --ExecutePreprocessor.kernel_name=python
# JUPYTER_CONFIG_DIR=./.jupyter jupyter nbconvert SpectralCubeReprojectMaskExample_v4p1.ipynb.ipynb --execute --to html --ExecutePreprocessor.kerne]l_name=python
- name: Prepare public folder
id: folder
run: |
cp spectral_fitting/*.html docs
cp casa_to_spectralcube_guide/*.html docs
cp masking_and_moments/*.html docs
cp parallel_spectral_fitting/*.html docs
cp *.html docs
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: docs
destination: docs/_site

- name: Setup Pages
id: pages
uses: actions/configure-pages@v3

- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: docs
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ git+https://github.com/radio-astro-tools/radio-beam/#egg=radio-beam
git+https://github.com/radio-astro-tools/pvextractor/#egg=pvextractor
dask[complete]
dask-image
casadata
casatools
casatasks
casadata

0 comments on commit 4e67c00

Please sign in to comment.