Skip to content

Commit

Permalink
Catching up with main
Browse files Browse the repository at this point in the history
Merge branch 'main' into surf_trip
  • Loading branch information
MathewBiddle committed Aug 31, 2023
2 parents df32ce2 + a615c54 commit 0cee008
Show file tree
Hide file tree
Showing 62 changed files with 27,095 additions and 20,403 deletions.
40,846 changes: 21,678 additions & 19,168 deletions .binder/conda-lock.yml

Large diffs are not rendered by default.

9 changes: 8 additions & 1 deletion .binder/environment-python_and_r.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,17 @@ dependencies:
- geojsonio
- geolinks
- geopandas
- geoplot
- gridgeo
- humanize
- hvplot
- ioos_qc
- ipyleaflet
- joblib
- jupyter
- jupyter_server <2.0.0
- jupyter-book >=0.12.1
- jupyterlab
- matplotlib-base
- nbdime
- nbval
Expand All @@ -38,8 +42,9 @@ dependencies:
- odvc
- palettable
- phantomjs
- pocean-core
- pocean-core >=3.1
- pre-commit
- pyobis
- pyoos
- pyresample
- pysgrid
Expand All @@ -53,13 +58,15 @@ dependencies:
- simplekml
- siphon
- sympy
- tabulate
- thredds_crawler
- tqdm
- utide
- windrose
- xarray
- xlrd
- xmltodict
- zarr
# R packages.
- rpy2
- r-base=4
Expand Down
9 changes: 8 additions & 1 deletion .binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,17 @@ dependencies:
- geojsonio
- geolinks
- geopandas
- geoplot
- gridgeo
- humanize
- hvplot
- ioos_qc
- ipyleaflet
- joblib
- jupyter
- jupyter_server <2.0.0
- jupyter-book >=0.12.1
- jupyterlab
- matplotlib-base
- nbdime
- nbval
Expand All @@ -37,8 +41,9 @@ dependencies:
- odvc
- palettable
- phantomjs
- pocean-core
- pocean-core >=3.1
- pre-commit
- pyobis
- pyoos
- pyresample
- pysgrid
Expand All @@ -52,10 +57,12 @@ dependencies:
- simplekml
- siphon
- sympy
- tabulate
- thredds_crawler
- tqdm
- utide
- windrose
- xarray
- xlrd
- xmltodict
- zarr
8 changes: 0 additions & 8 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE/NEW_NOTEBOOK.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: New Notebook
description: Request to add a new notebook
title: "[New Notebook]: "
labels: ["Notebook idea"]
assignees:
- mathewbiddle
- ocefpaf
body:
- type: markdown
attributes:
value: |
If you want to suggest a notebook for the [IOOS CodeLab](https://ioos.github.io/ioos_code_lab/content/intro.html#) please answer these questions:
- type: input
id: language
attributes:
label: Programming Language
description: What programming language(s) will be used in the example?
placeholder: Python
- type: input
id: tool
attributes:
label: Module/Software/IOOS data service?
description: Is it focused on a particular module/software or an IOOS data service?
placeholder: ERDDAP
- type: input
id: example
attributes:
label: Module/Software/IOOS data service?
description: Can you provide a minimum example of the expected code and results in a notebook?
placeholder: ""
- type: input
id: description
attributes:
label: Provide a description.
description: Please provide a detailed description of the suggested example below.
placeholder: ""
5 changes: 0 additions & 5 deletions .github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

5 changes: 5 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Thank you for send a Pull Request to our code gallery! When adding or updating a notebook please check if:

- \[ \] The notebook has all the dependencies required to run in the IOOS env, if not please update the environment file.
- \[ \] You added a title, description, and a line with `Created: YYYY-MM-DD` in the first cell.
- \[ \] If you are updating a notebook add a line with `Updated: YYYY-MM-DD` below the created date.
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# See https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/keeping-your-actions-up-to-date-with-dependabot

version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
labels:
- "Bot"
16 changes: 6 additions & 10 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,22 @@ jobs:
- uses: actions/checkout@v3

- name: Setup Micromamba
uses: mamba-org/provision-with-micromamba@main
uses: mamba-org/setup-micromamba@v1
with:
environment-file: false

- name: Build environment
shell: bash -l {0}
run: |
micromamba create --name IOOS --file .binder/conda-lock.yml
micromamba activate IOOS
environment-name: IOOS
init-shell: bash
create-args: >-
--file .binder/conda-lock.yml
- name: Build documentation
shell: bash -l {0}
run: |
set -e
micromamba activate IOOS
jupyter-book build jupyterbook
- name: GitHub Pages action
if: github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v3.8.0
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: jupyterbook/_build/html
13 changes: 8 additions & 5 deletions .github/workflows/test-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,16 @@ jobs:

steps:
- uses: actions/checkout@v3

- name: Setup Micromamba
uses: mamba-org/provision-with-micromamba@main
uses: mamba-org/setup-micromamba@v1
with:
environment-file: false
- name: Build environment
environment-name: IOOS
init-shell: bash
create-args: >-
--file .binder/conda-lock.yml
- name: Test environment
shell: bash -l {0}
run: |
micromamba create --name IOOS --file .binder/conda-lock.yml
micromamba activate IOOS
python -c 'import osgeo.gdal; print(dir(osgeo.gdal))'
16 changes: 6 additions & 10 deletions .github/workflows/test_data_access_notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,14 @@ jobs:
- uses: actions/checkout@v3

- name: Setup Micromamba
uses: mamba-org/provision-with-micromamba@main
uses: mamba-org/setup-micromamba@v1
with:
environment-file: false

- name: Build environment
shell: bash -l {0}
run: |
micromamba create --name IOOS --file .binder/conda-lock.yml
micromamba activate IOOS
environment-name: IOOS
init-shell: bash
create-args: >-
--file .binder/conda-lock.yml
- name: Notebook tests
shell: bash -l {0}
run: |
micromamba activate IOOS
pytest --nbval --nbval-lax jupyterbook/content/code_gallery/data_access_notebooks/
python -m pytest --nbval --nbval-lax jupyterbook/content/code_gallery/data_access_notebooks/
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,14 @@ jobs:
- uses: actions/checkout@v3

- name: Setup Micromamba
uses: mamba-org/provision-with-micromamba@main
uses: mamba-org/setup-micromamba@v1
with:
environment-file: false

- name: Build environment
shell: bash -l {0}
run: |
micromamba create --name IOOS --file .binder/conda-lock.yml
micromamba activate IOOS
environment-name: IOOS
init-shell: bash
create-args: >-
--file .binder/conda-lock.yml
- name: Notebook tests
shell: bash -l {0}
run: |
micromamba activate IOOS
pytest --nbval --nbval-lax jupyterbook/content/code_gallery/data_analysis_and_visualization_notebooks/
python -m pytest --nbval --nbval-lax jupyterbook/content/code_gallery/data_analysis_and_visualization_notebooks/
16 changes: 6 additions & 10 deletions .github/workflows/test_data_management_notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,14 @@ jobs:
- uses: actions/checkout@v3

- name: Setup Micromamba
uses: mamba-org/provision-with-micromamba@main
uses: mamba-org/setup-micromamba@v1
with:
environment-file: false

- name: Build environment
shell: bash -l {0}
run: |
micromamba create --name IOOS --file .binder/conda-lock.yml
micromamba activate IOOS
environment-name: IOOS
init-shell: bash
create-args: >-
--file .binder/conda-lock.yml
- name: Notebook tests
shell: bash -l {0}
run: |
micromamba activate IOOS
pytest --nbval --nbval-lax jupyterbook/content/code_gallery/data_management_notebooks/
python -m pytest --nbval --nbval-lax jupyterbook/content/code_gallery/data_management_notebooks/
50 changes: 39 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ exclude: ".binder/conda-lock.yml"

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: check-ast
Expand All @@ -17,25 +17,53 @@ repos:
- id: double-quote-string-fixer

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0-alpha.4
rev: v3.0.0
hooks:
- id: prettier
types_or: [html]
exclude: "_templates/layout.html"

- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
hooks:
- id: flake8
exclude: docs/source/conf.py
args: [--max-line-length=105]

- repo: https://github.com/psf/black
rev: 22.10.0
rev: 23.7.0
hooks:
- id: black
language_version: python3

- repo: https://github.com/asottile/add-trailing-comma
rev: v2.3.0
rev: v3.0.1
hooks:
- id: add-trailing-comma

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.281
hooks:
- id: ruff

- repo: https://github.com/nbQA-dev/nbQA
rev: 1.7.0
hooks:
# mdformat works on the CLI but not as pre-commit yet.
# Use `nbqa mdformat jupyterbook --nbqa-md` to run it locally.
# - id: mdformat
- id: nbqa-check-ast
- id: nbqa-black
- id: nbqa-ruff
args: [--fix, --extend-ignore=E402]
# Skipping b/c These notebooks mix R and Python and
# will return false positive for "F821 Undefined name.""
exclude: 2017-11-30-rerddap\.ipynb$|2018-02-20-obis.ipynb$

- repo: https://github.com/bdice/nb-strip-paths
rev: 'v0.1.0'
hooks:
- id: nb-strip-paths

ci:
autofix_commit_msg: |
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
autofix_prs: false
autoupdate_commit_msg: "[pre-commit.ci] pre-commit autoupdate"
autoupdate_schedule: monthly
skip: []
submodules: false
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ If you would like to work on a notebook that has been proposed, follow these ste
1. Notebooks are kept in the [jupyterbook/content/code_gallery](https://github.com/ioos/ioos_code_lab/tree/main/jupyterbook/content/code_gallery) directory of this repository.
1. There are three directories where notebooks can be placed:
1. `data_access_notebooks` -
2. `data_analysis_and_visualization_notebooks` -
3. `data_management_notebooks` -
2. 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
3. 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.
1. `data_analysis_and_visualization_notebooks` -
1. `data_management_notebooks` -
1. 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
1. 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.
1. Edit the notebook following the [Jupyter Notebook documentation](https://jupyter-notebook.readthedocs.io/en/stable/notebook.html). The notebook should include the following information:
1. Descriptive title for what the notebook is doing.
1. A short summary providing context and expanding on the title.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ To suggest a notebook or ask questions please open an issue at: https://github.c

[![DOI](https://zenodo.org/badge/399546690.svg)](https://zenodo.org/badge/latestdoi/399546690)

---
______________________________________________________________________

## Build the JupyterBook locally

Expand All @@ -24,7 +24,7 @@ To suggest a notebook or ask questions please open an issue at: https://github.c
### Requirements:

- Git: https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
- Jupyter{Book}: https://jupyterbook.org/intro.html
- Jupyter\{Book}: https://jupyterbook.org/intro.html
- Web Browser

### Installation
Expand Down
Loading

0 comments on commit 0cee008

Please sign in to comment.