Revert "Update nrar import to be consistent with sxs updated package … #87
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will setup and test the python code using miniconda | |
name: Setup test publish reports | |
on: [push, pull_request] | |
# Allows you to run this workflow manually from the Actions tab | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | |
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -el {0} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-update-conda: true | |
activate-environment: nrcat | |
python-version: "3.10" | |
channels: main, conda-forge | |
allow-softlinks: true | |
channel-priority: flexible | |
show-channel-urls: true | |
- run: | | |
# Conda diagnostic | |
echo "Echoing conda diagnostic information" | |
conda --version | |
conda info | |
conda list | |
conda config --show-sources | |
conda config --show | |
conda info --envs | |
python --version | |
pip --version | |
pwd | |
ls -l | |
###################### | |
# Setup linters | |
# conda install black isort -y | |
# ################## | |
# Setup nrcattools | |
echo "Setting up nrcatalogtools" | |
pip install -r requirements.txt | |
export NRC_DIR=${PWD} | |
echo $NRC_DIR | |
cd ./test | |
pwd | |
ls | |
echo "Downloading lalsuite-extras" | |
# ################## | |
# LAL extras | |
export LAL_DATA_PATH="${PWD}/lalsuite-extra/data/lalsimulation" | |
echo "Using LAL_DATA_PATH" | |
echo $LAL_DATA_PATH | |
mkdir -p $LAL_DATA_PATH | |
cd $LAL_DATA_PATH | |
ls | |
## lal extras fetch method | |
# git lfs pull | |
wget https://git.ligo.org/lscsoft/lalsuite-extra/-/raw/master/data/lalsimulation/SEOBNRv4ROM_v2.0.hdf5 -O SEOBNRv4ROM_v2.0.hdf5 | |
cd $NRC_DIR | |
pwd | |
ls | |
echo "Setting up waveformtools" | |
# ###################### | |
# Clone waveformtools | |
cd .. | |
git clone https://gitlab.com/vaishakp/waveformtools.git | |
cd waveformtools | |
pip install -r requirements.txt | |
ls | |
export WTOOLS_DIR=$PWD | |
echo $WTOOLS_DIR | |
export PYTHONPATH="$WTOOLS_DIR":$PYTHONPATH | |
echo $PYTHONPATH | |
#################### | |
# Begin linting | |
# cd $NRC_DIR | |
# isort . | |
# black . | |
# flake8 . | |
# ################# | |
# Begin testing | |
pip install coverage | |
echo "Begin testing" | |
cd $NRC_DIR/test | |
# python -m unittest -v | |
coverage run --source=../nrcatalogtools -m unittest discover -v | |
coverage html | |
python .generate_badge.py | |
- name: Upload logs | |
uses: actions/upload-artifact@v3 | |
with: | |
name: logs_n_coverage | |
path: | | |
./test/logs/* | |
./test/cov_badge.svg | |
./test/htmlcov | |
cov_reports: | |
name: Publish coverage reports | |
needs: build | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -el {0} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Download artefacts from build | |
uses: actions/download-artifact@v3 | |
with: | |
name: logs_n_coverage | |
- name: Diagnostics | |
run: | | |
ls | |
ls ../ | |
mv cov_badge.svg htmlcov/ | |
cd htmlcov | |
ls | |
pwd | |
- name: Setup Pages | |
uses: actions/configure-pages@v3 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
# Upload entire repository | |
path: '/home/runner/work/nr-catalog-tools/nr-catalog-tools/htmlcov' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 |