Skip to content

Docs repo rename #1

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

Merged
merged 6 commits into from
Oct 7, 2024
Merged
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
3 changes: 1 addition & 2 deletions docs/exporting-results.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ gh run download

The workflow run also provides a publicly available link to the download artifact:

Artifact download URL: [`https://github.com/uwescience/SciPy2024-GitHubActionsTutorial/actions/runs/9591972369/artifacts/1619380017`](https://github.com/uwescience/SciPy2024-
GitHubActionsTutorial/actions/runs/9591972369/artifacts/1619380017)
Artifact download URL: [`https://github.com/uwescience/GitHubActionsTutorial-USRSE24/actions/runs/11204894444/artifacts/2021247787`](https://github.com/uwescience/GitHubActionsTutorial-USRSE24/actions/runs/11204894444/artifacts/2021247787)

There is a `download-artifact` action to download the artifacts and share between jobs within a workflow run (note this is limited to the individual workflow run, for downloading across runs use the other options).

Expand Down
25 changes: 12 additions & 13 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
# Setup

* We expect all participants to have a GitHub account (if not you can make one here [https://github.com/login](https://github.com/login))
* Fork [https://github.com/uwescience/SciPy2024-GitHubActionsTutorial](https://github.com/uwescience/SciPy2024-GitHubActionsTutorial)
* Fork [https://github.com/uwescience/SciPy2024-GitHubActionsTutorial](https://github.com/uwescience/GitHubActionsTutorial-USRSE24)
* Enable GitHub Actions:
* Settings -> Actions -> Allow actions and reusable workflows
* [Managing Permissions
Documentation](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository)


All workflow configurations are stored in the [`.github/workflows`](https://github.com/uwescience/SciPy2024-GitHubActionsTutorial/tree/main/.github/workflows) folder and we will go through them in the following order:

1. [`python_env.yml`](https://github.com/uwescience/SciPy2024-GitHubActionsTutorial/blob/main/.github/workflows/python_env.yml)
2. [`conda_env.yml`](https://github.com/uwescience/SciPy2024-GitHubActionsTutorial/blob/main/.github/workflows/conda_env.yml)
3. [`noise_processing.yml`](https://github.com/uwescience/SciPy2024-GitHubActionsTutorial/blob/main/.github/workflows/noise_processing.yml)
4. [`create_website_spectrogram.yml`](https://github.com/uwescience/SciPy2024-GitHubActionsTutorial/blob/main/.github/workflows/create_website_spectrogram.yml)
5. [`create_website.yml`](https://github.com/uwescience/SciPy2024-GitHubActionsTutorial/blob/main/.github/workflows/create_website.yml)
6. [`batch_image_correlation.yml`](https://github.com/uwescience/SciPy2024-GitHubActionsTutorial/blob/main/.github/workflows/batch_image_correlation.yml)
7. [`image_correlation_pair.yml`](https://github.com/uwescience/SciPy2024-GitHubActionsTutorial/blob/main/.github/workflows/image_correlation_pair.yml)
8. [`summary_statistics.yml`](https://github.com/uwescience/SciPy2024-GitHubActionsTutorial/blob/main/.github/workflows/summary_statistics.yml)
9. [`model_benchmarking.yml`](https://github.com/uwescience/SciPy2024-GitHubActionsTutorial/blob/main/.github/workflows/model_benchmarking.yml)
10. [`create_website_benchmarks`](https://github.com/uwescience/SciPy2024-GitHubActionsTutorial/blob/main/.github/workflows/create_website_benchmarks.yml)
All workflow configurations are stored in the [`.github/workflows`](https://github.com/uwescience/GitHubActionsTutorial-USRSE24/tree/main/.github/workflows) folder and we will go through them in the following order:

1. [`python_env.yml`](https://github.com/uwescience/GitHubActionsTutorial-USRSE24/blob/main/.github/workflows/python_env.yml)
2. [`conda_env.yml`](https://github.com/uwescience/GitHubActionsTutorial-USRSE24/blob/main/.github/workflows/conda_env.yml)
3. [`noise_processing.yml`](https://github.com/uwescience/GitHubActionsTutorial-USRSE24/blob/main/.github/workflows/noise_processing.yml)
4. [`create_website_spectrogram.yml`](https://github.com/uwescience/GitHubActionsTutorial-USRSE24/blob/main/.github/workflows/create_website_spectrogram.yml)
5. [`create_website.yml`](https://github.com/uwescience/GitHubActionsTutorial-USRSE24/blob/main/.github/workflows/create_website.yml)
6. [`batch_image_correlation.yml`](https://github.com/uwescience/GitHubActionsTutorial-USRSE24/blob/main/.github/workflows/batch_image_correlation.yml)
7. [`image_correlation_pair.yml`](https://github.com/uwescience/GitHubActionsTutorial-USRSE24/blob/main/.github/workflows/image_correlation_pair.yml)
8. [`summary_statistics.yml`](https://github.com/uwescience/GitHubActionsTutorial-USRSE24/blob/main/.github/workflows/summary_statistics.yml)
9. [`model_benchmarking.yml`](https://github.com/uwescience/GitHubActionsTutorial-USRSE24/blob/main/.github/workflows/model_benchmarking.yml)
10. [`create_website_benchmarks`](https://github.com/uwescience/GitHubActionsTutorial-USRSE24/blob/main/.github/workflows/create_website_benchmarks.yml)



Expand Down
10 changes: 5 additions & 5 deletions docs/model_benchmarking.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

Here we will describe a scenario in which users submit different models to be applied to common data and compare the results. For this we will leverage GitHub's core features to facilitate code versioning and collaborative development and will set up a GitHub Actions configuration which triggers the evaluation when a user creates a `pull request` with a new version of the model and updates a table with user's results and corresponding commit number.

We will use a simple approach to approximate the number of ships passing during a time window by counting the number of peaks that appear above a threshold in the broadband plot. The threshold is set in the [`model_benchmarking.py`](https://github.com/uwescience/SciPy2024-GitHubActionsTutorial/blob/main/ambient_sound_analysis/model_benchmarking.py) script.
We will use a simple approach to approximate the number of ships passing during a time window by counting the number of peaks that appear above a threshold in the broadband plot. The threshold is set in the [`model_benchmarking.py`](https://github.com/uwescience/GitHubActionsTutorial-USRSE24/blob/main/ambient_sound_analysis/model_benchmarking.py) script.


## Model Versioning Workflow
The workflow which triggers the model evaluation is in [`model_benchmarking.yml`](https://github.com/uwescience/SciPy2024-GitHubActionsTutorial/blob/main/.github/workflows/model_benchmarking.yml). It consists of the following steps:
The workflow which triggers the model evaluation is in [`model_benchmarking.yml`](https://github.com/uwescience/GitHubActionsTutorial-USRSE24/blob/main/.github/workflows/model_benchmarking.yml). It consists of the following steps:

1. it gets triggered on `pull_request`
* `synchronize` type ensures it get triggered when somebody updates existing pull request
Expand All @@ -18,7 +18,7 @@ The workflow which triggers the model evaluation is in [`model_benchmarking.yml`

## Model Benchmarking Workflow

The next workflow follows the steps `create_website_spectrogram` workflow, which converts a notebook [`display_benchmarks`](https://github.com/uwescience/SciPy2024-GitHubActionsTutorial/blob/main/ambient_sound_analysis/display_benchmarks.ipynb) to a website. In this case, we have a very simple notebook which reads all `score_[SHA].csv` and displays a "benchmark table" with the individual entries. This notebook is converted to a webpage ([https://uwescience.github.io/SciPy2024-GitHubActionsTutorial/display_benchmarks.html](https://uwescience.github.io/SciPy2024-GitHubActionsTutorial/display_benchmarks.html/)).
The next workflow follows the steps `create_website_spectrogram` workflow, which converts a notebook [`display_benchmarks`](https://github.com/uwescience/GitHubActionsTutorial-USRSE24/blob/main/ambient_sound_analysis/display_benchmarks.ipynb) to a website. In this case, we have a very simple notebook which reads all `score_[SHA].csv` and displays a "benchmark table" with the individual entries. This notebook is converted to a webpage ([https://uwescience.github.io/GitHubActionsTutorial-USRSE24/display_benchmarks.html](https://uwescience.github.io/GitHubActionsTutorial-USRSE24/display_benchmarks.html/)).

### Exercise

Expand All @@ -29,7 +29,7 @@ Create a branch and update the `model_versioning.py` file with a different thres
threshold = ??
```

Submit a pull request from this branch to main and monitor the execution of the workflows. Check out the generated website at [https://uwescience.github.io/SciPy2024-GitHubActionsTutorial/display_benchmarks.html](https://uwescience.github.io/SciPy2024-GitHubActionsTutorial/display_benchmarks.html/).
Submit a pull request from this branch to main and monitor the execution of the workflows. Check out the generated website at [https://uwescience.github.io/GitHubActionsTutorial-USRSE24/display_benchmarks.html](https://uwescience.github.io/GitHubActionsTutorial-USRSE24/display_benchmarks.html/).



Expand All @@ -42,4 +42,4 @@ Submit a pull request from this branch to main and monitor the execution of the





6 changes: 3 additions & 3 deletions docs/python-environment-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
First, we will run a basic workflow which creates a python environment with a few scientific packages and prints out their version.

Python Environment Workflow Configuration:
[`.github/workflows/python_env.yml`](https://github.com/uwescience/SciPy2024-GitHubActionsTutorial/blob/main/.github/workflows/python_env.yml)
[`.github/workflows/python_env.yml`](https://github.com/uwescience/GitHubActionsTutorial-USRSE24/blob/main/.github/workflows/python_env.yml)


* Go to **Actions** tab
Expand All @@ -14,12 +14,12 @@ Python Environment Workflow Configuration:


### Exercise:
Edit [`.github/workflows/python_env.yml`](https://github.com/uwescience/SciPy2024-GitHubActionsTutorial/blob/main/.github/workflows/python_env.yml) to install packages popular in your research. Trigger the workflow to monitor their installation.
Edit [`.github/workflows/python_env.yml`](https://github.com/uwescience/GitHubActionsTutorial-USRSE24/blob/main/.github/workflows/python_env.yml) to install packages popular in your research. Trigger the workflow to monitor their installation.


## Installing Packages with Conda
We can also install packages through conda (instead of `pip`). We will use a `miniconda-setup` action to achieve that easily.


Conda Environment Workflow Configuration [`.github/workflows/conda_env.yml`](https://github.com/uwescience/SciPy2024-GitHubActionsTutorial/blob/main/.github/workflows/conda_env.yml)
Conda Environment Workflow Configuration [`.github/workflows/conda_env.yml`](https://github.com/uwescience/GitHubActionsTutorial-USRSE24/blob/main/.github/workflows/conda_env.yml)

6 changes: 3 additions & 3 deletions docs/scheduled-algorithm-deployment-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Next, we will demonstrate how GitHub Actions can be used to display a spectrogram for a segment from an underwater audio stream.

Spectrogram Visualization Workflow: [`.github/workflows/noise_processing.yml`](https://github.com/uwescience/SciPy2024-GitHubActionsTutorial/blob/main/.github/workflows/noise_processing.yml)
Spectrogram Visualization Workflow: [`.github/workflows/noise_processing.yml`](https://github.com/uwescience/GitHubActionsTutorial-USRSE24/blob/main/.github/workflows/noise_processing.yml)

Workflow Steps:

Expand All @@ -17,6 +17,6 @@ Workflow Steps:
* Upload the `.png` files to GitHub

After the workflow is executed `psd.png` and `broadband.png`files are updated in the repo and are visualized below.
![alt text](https://raw.githubusercontent.com/uwescience/SciPy2024-GitHubActionsTutorial/main/ambient_sound_analysis/img/psd.png)
![alt text](https://raw.githubusercontent.com/uwescience/GitHubActionsTutorial-USRSE24/main/ambient_sound_analysis/img/psd.png)

![alt text](https://raw.githubusercontent.com/uwescience/SciPy2024-GitHubActionsTutorial/main/ambient_sound_analysis/img/broadband.png)
![alt text](https://raw.githubusercontent.com/uwescience/GitHubActionsTutorial-USRSE24/main/ambient_sound_analysis/img/broadband.png)
8 changes: 4 additions & 4 deletions docs/visualizing-results-webpage.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ We saw it is pretty easy to continuously update results on the Readme of the rep

We will demonstrate the scenario of converting a Jupyter Notebook to a webpage.

Notebook: [`plot_noise_levels.ipynb`](https://github.com/uwescience/SciPy2024-GitHubActionsTutorial/blob/main/ambient_sound_analysis/plot_noise_levels.ipynb)
Notebook: [`plot_noise_levels.ipynb`](https://github.com/uwescience/GitHubActionsTutorial-USRSE24/blob/main/ambient_sound_analysis/plot_noise_levels.ipynb)

Create Website with Spectrogram Workflow: [`.github/workflows/create_website_spectrogram.yml`](https://github.com/uwescience/SciPy2024-GitHubActionsTutorial/blob/main/.github/workflows/create_website_spectrogram.yml)
Create Website with Spectrogram Workflow: [`.github/workflows/create_website_spectrogram.yml`](https://github.com/uwescience/GitHubActionsTutorial-USRSE24/blob/main/.github/workflows/create_website_spectrogram.yml)


The process consists of the following stages:
Expand All @@ -25,7 +25,7 @@ The process consists of the following stages:

The website can be found here:

[https://uwescience.github.io/SciPy2024-GitHubActionsTutorial/plot\_noise\_levels.html](https://uwescience.github.io/SciPy2024-GitHubActionsTutorial/plot_noise_levels.html)
[https://uwescience.github.io/GitHubActionsTutorial-USRSE24/plot\_noise\_levels.html](https://uwescience.github.io/GitHubActionsTutorial-USRSE24/plot_noise_levels.html)


The procedure is set up to run on `push` thus every time the notebook is updated the website is updated.
Expand All @@ -43,4 +43,4 @@ Other ways:
* [Jupyterbook](https://jupyterbook.org/en/stable/publish/gh-pages.html)
* [Readthedocs](https://about.readthedocs.com/?ref=readthedocs.com)
* Jekyll template
* Dashboard
* Dashboard
Loading