This page documents the procedures for:
- Requesting new notebooks to be added to the IOOS CodeLab;
- Building new notebooks;
- Reviewing submitted notebooks;
- Merging approved notebooks for inclusion into the CodeLab;
- Announcing the new notebooks to the community; and
- Logging any bugs that are found in the CodeLab.
- Managing the IOOS CodeLab Project Board.
- Local management of the ioos_code_lab repository.
- New notebooks should be requested by adding an issue to this GitHub repository using this template. The ticket should contain the following information (also provided in the issue template):
- [ ] What is language(s) for used in the example?
- [ ] Is it focused on a particular module/software or an IOOS data service?
- [ ] Can you provide a minimum example of the expected code and results in a notebook?
Please provide a detailed description of the suggested example below:
When the ticket gets created, make the following additions to the ticket:
- Add the label Notebook idea.
- Add the ticket to the IOOS CodeLab project.
- Put the card in the column backlog.
If you would like to work on a notebook that has been proposed, follow these steps:
- Create a fork of the ioos_code_lab repository.
- On your fork, create a branch where you will start working on the new notebook.
- Give the branch a name that conveys what the new notebook is. For example, a notebook on converting data into Darwin Core could have a branch name of
data2dwc
. This makes it easier to know which branch is dedicated to which new notebook.
- Give the branch a name that conveys what the new notebook is. For example, a notebook on converting data into Darwin Core could have a branch name of
- On the new
branch
in yourfork
, start creating the new notebook.- Notebooks are kept in the jupyterbook/content/code_gallery directory of this repository.
- There are three directories where notebooks can be placed:
data_access_notebooks
- Notebooks exemplifying how to access data from various services using various tools.data_analysis_and_visualization_notebooks
- Notebooks exemplifying doing some analysis and/or visualizations using tools common in the IOOS community.data_management_notebooks
- Notebooks on how to use various tools to ensure compliance with existing standards and conventions.
- There are three directories where notebooks can be placed:
- Typically, it's best to copy an existing (working) notebook to a new file. If you are creating a python notebook, copy one of the python notebooks. If you are creating an R notebook, copy one of the R notebooks, etc
- Name the notebook following the convention
[date]-[short name].ipynb
. Where,[date]
is the date (YYYY-MM-DD) you started the new notebook and[short name]
is an abbreviation for what the notebook will cover. Look at the existing notebook filenames to get a sense of the short names used.
- Notebooks are kept in the jupyterbook/content/code_gallery directory of this repository.
- Edit the notebook following the Jupyter Notebook documentation. The notebook should include the following information:
- Descriptive title for what the notebook is doing.
- A short summary providing context and expanding on the title.
- The date you started (or updated) the notebook.
- Once you feel comfortable with your notebook, commit your work to the branch on your fork on your local machine.
- Push your commit up to the branch on your fork in GitHub.
- Create a Pull Request (PR).
- Link the PR to the ticket requesting the new notebook.
- On the right hand side of the PR there is an option for
Linked issues
. Type the number for the issue there (or scroll through the tickets until you find the one of interest). - Admin Move the Project card from
Backlog
toWorking
.
- On the right hand side of the PR there is an option for
- When you are ready for it to be merged, in the PR click
Ready for review
.- Admin Move the Project card from
Working
toNeeds Review
.
- Admin Move the Project card from
See pull request reviews for more information on reviewing PRs.
Each new notebook needs at least one reviewer.
- When the PR is
Ready for review
, the reviewer should:- Try running the entire notebook. Typically by selecting from the Kernel dropdown
Restart and Run All
.- Any errors here should be logged and fixed or reported back to the PR. Admin move the Project card from
Needs Review
toWorking
.
- Any errors here should be logged and fixed or reported back to the PR. Admin move the Project card from
- Review the notebook for understandability.
- Does the notebook clearly describe the processes happening in each cell? Does it provide context?
- Review the code to ensure it's doing what it's supposed to.
- Check for spelling errors.
- Try running the entire notebook. Typically by selecting from the Kernel dropdown
For Administrators:
- If the notebook looks good, the reviewer will merge the PR.
- This kicks off a series of GitHub Actions.
- You can see the workflows at https://github.com/ioos/ioos_code_lab/actions
- Once the workflows are complete, check the IOOS CodeLab for the new notebook.
- Review the notebook for any display issues when presented on the web. Check for the extra cell at the bottom of the notebook.
- If there are issues, submit a new PR to resolve the issues.
When new notebooks, or significant changes to the site, are merged and pushed out, follow this procedure:
- Admin Move the appropriate Project card to Announcement.
- Draft announcement text.
- Include a brief summary of the new release.
- Include any relevant links to the demo center.
- Distribute text through the following channels.
- IOOS bi-weekly
- EOTO
- ioos_tech mail list
- dmac mail list
- Twitter/FB.
- Appropriate slack channels
- Bugs should be reported through tickets in this repository. Be sure to include the notebook where the problem is found. Include a clear description of the issue or change that is needed.
The project board captures the current progress on notebooks and adjustments to the IOOS Data Demo Center.
Column name | Purpose |
---|---|
Icebox | Back burner tickets to keep in the fray. |
Backlog | Tickets to be worked on next. |
Working | Tickets actively being contributed to. |
Needs Review | Tickets where a PR has been requested to merge. |
Announcement | Tickets that have been merged and an announcement needs to be made. |
Done | All completed tickets. |
This section walks through one way to manage the notebooks_demo git repository on your local machine.
Clone your fork of the notebooks_demo repository to a known location on your machine:
$ git clone https://github.com/MathewBiddle/ioos_code_lab.git
Set the upstream branch to the ioos/ioos_code_lab repository:
$ git remote add upstream https://github.com/ioos/ioos_code_lab.git
Keep your local main up-to-date with the upstream main (walkthough):
$ git fetch upstream
$ git pull upstream/main main
OR
$ git merge upstream/main main
Rebase (if needed):
$ git rebase upstream/main
Push your local repo up to your fork in GitHub.
$ git push