Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a serial plot for the residuals #84

Closed
wants to merge 18 commits into from
Closed
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
50 changes: 50 additions & 0 deletions .github/workflows/commenting_artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Bind Reports to Pull-Request

# Triggered by the name of the previos
on:
workflow_run:
workflows: ["Notebook Pipeline (Ubuntu)"]
types: [completed]

# Enable the option to post a comment
permissions:
pull-requests: write

jobs:
build:
runs-on: ubuntu-latest
# Check that the previos workflow succeeded
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Get Artifacts Link
env:
WORKFLOW_RUN_EVENT_OBJ: ${{ toJSON(github.event.workflow_run) }}
GH_TOKEN: ${{ github.token }}
run: |
PREVIOUS_JOB_ID=$(jq -r '.id' <<< "$WORKFLOW_RUN_EVENT_OBJ")
SUITE_ID=$(jq -r '.check_suite_id' <<< "$WORKFLOW_RUN_EVENT_OBJ")
# Sample for a single artifact, can be improved for a multiple artifacts
ARTIFACT_ID=$(gh api "/repos/${{ github.repository }}/actions/artifacts" \
--jq ".artifacts.[] |
select(.workflow_run.id==${PREVIOUS_JOB_ID}) |
.id")
echo "ARTIFACT_URL=https://github.com/${{ github.repository }}/suites/${SUITE_ID}/artifacts/${ARTIFACT_ID}" >> $GITHUB_ENV
PR_NUMBER=$(jq -r '.pull_requests[0].number' <<< "$WORKFLOW_RUN_EVENT_OBJ")
echo "PR_NUMBER=${PR_NUMBER}" >> $GITHUB_ENV

- uses: actions/github-script@v6
env:
PR_NUMBER: ${{ env.PR_NUMBER }}
PR_NOTES: |
Build artifacts:
| Name | Link |
|------|------|
| NB/WB Pipeline | [Archived ZIP](${{ env.ARTIFACT_URL }}) |
with:
script: |
github.rest.issues.createComment({
issue_number: process.env.PR_NUMBER,
owner: context.repo.owner,
repo: context.repo.repo,
body: process.env.PR_NOTES
})
63 changes: 41 additions & 22 deletions .github/workflows/test_notebook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,45 +10,64 @@ on:

jobs:
build:

runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10"]
os: [ubuntu-latest] # Once we get the tex packages changed, we should include "macos-13"
python-version: ["3.9", "3.10", "3.11", "3.12"]

steps:
- name: Install pdflatex
- name: Install Required Ubuntu Packages
run: |
sudo apt-get update
sudo apt-get install texlive-latex-base cm-super-minimal pdftk latex2html
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
- uses: actions/checkout@v4
- uses: mamba-org/setup-micromamba@v1
with:
python-version: ${{ matrix.python-version }}
mamba-version: "*"
channels: conda-forge,defaults
channel-priority: true
- name: Conda info
shell: bash -el {0}
run: conda info
- name: Install Dependencies & Main Code
init-shell: bash
environment-name: pulsar
cache-environment: true
cache-downloads: true
create-args: >-
-c conda-forge
python=${{ matrix.python-version }}
pytest
cython
pint-pulsar
tempo2
libstempo
enterprise-pulsar
enterprise_extensions
scikit-sparse
scikit-learn
ruamel.yaml
nbconvert
ipywidgets>=7.6.3
weasyprint
pytest-xdist>=2.3.0
jupyter
seaborn
gitpython
- name: Install Main Code
shell: bash -el {0}
run: |
mamba install -c conda-forge python=${{ matrix.python-version }} pytest cython=0.29.36 tempo2 enterprise-pulsar enterprise_extensions scikit-sparse
pip install -e .
- name: Test with Standard Pulsar
shell: bash -el {0}
run: |
export PULSAR_NAME='J0605+3757'
export JUPYTER_PLATFORM_DIRS=1 && jupyter --paths
tree tests
pytest tests/test_run_notebook.py -n auto -k $PULSAR_NAME
mv tmp-* nb_outputs
export JUPYTER_PLATFORM_DIRS=1
pytest tests/test_run_notebook.py -k $PULSAR_NAME
ls -lah
mv tmp* nb_outputs
- name: Archive Notebook Output Files
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: TestNB-OutputFiles
name: TestNB-OutputFiles_${{ matrix.python-version }}_${{ matrix.os }}_${{ steps.date.outputs.date }}
path: |
nb_outputs
nb_outputs/*/*.pdf
nb_outputs/*/*.tim
nb_outputs/*/*.par
compression-level: 6

Loading
Loading