Skip to content

Commit

Permalink
Merge pull request #247 from ocefpaf/py313
Browse files Browse the repository at this point in the history
Upgrade the IOOS environment to Python 3.13
  • Loading branch information
ocefpaf authored Dec 16, 2024
2 parents e81bbed + 01b7d08 commit 83c9019
Show file tree
Hide file tree
Showing 14 changed files with 14,595 additions and 30,317 deletions.
44,717 changes: 14,501 additions & 30,216 deletions .binder/conda-lock.yml

Large diffs are not rendered by default.

82 changes: 19 additions & 63 deletions .binder/environment-python_and_r.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,103 +2,59 @@ name: IOOS
channels:
- conda-forge
dependencies:
- python=3.12
- bagit
- python=3.13
- bokeh
- cartopy
- cc-plugin-glider
- cc-plugin-ncei
- cf_xarray
- cftime
- cf-units
- ckanapi
- compliance-checker
- dask
- descartes
- easyargs
- erddapy
- flake8
- folium
- geodatasets
- geojson
- geojsonio
- geolinks
- gdal
- geopandas
- geoplot
- gliderpy
- gridgeo
- humanize
- hvplot
- intake
- ioos_qc
- ioos_tools
- ioos-metrics
- ipyleaflet
- joblib
- ipywidgets
- jupyter
- jupyter-book >=0.12.1
- jupyterlab
- lxml
- matplotlib-base
- nbclassic
- nbdime
- nbval
- nc-time-axis
- nco
- netcdf4
- numpy
- oceans
- oct2py
- odvc
- openpyxl
- owslib
- palettable
- phantomjs
- pocean-core >=3.1
- pre-commit
- pyarrow
- pandas
- pocean-core
- pyobis
- pyoos
- pyresample
- pysgrid
- pytest
- pyugrid
- pyworms
- rasterio
- seaborn
- selenium
- sensorml2iso
- simplekml
- siphon
- sympy
- tabulate
- thredds_crawler
- requests
- retrying
- seawater
- shapely
- tqdm
- utide
- windrose
- xarray
- xmltodict
- zarr
# R packages.
- rpy2
- r-base=4
- r-irkernel
- r-dplyr
- r-dt
- r-finch
- r-ggfortify
- r-ggplot2
- r-gsw
- r-htmlwidgets
- r-httr
- r-irkernel
- r-lubridate
- r-mapdata
- r-ncdf4
- r-obistools
- r-oce
- r-rcolorbrewer
- r-maps
- r-readr
- r-rerddap
- r-reshape2
- r-robis>=2.3.9
- r-sp
- r-xtractomatic
- r-xts
- r-robis # hoding osx-arm64
platforms:
- linux-64
- osx-64
# - osx-arm64
- win-64
1 change: 1 addition & 0 deletions .binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ channels:
- conda-forge
dependencies:
- python=3.13
- bokeh
- cartopy
- cf_xarray
- cf-units
Expand Down
16 changes: 7 additions & 9 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,23 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Setup Micromamba
uses: mamba-org/setup-micromamba@068f1ab4b37ed9b3d9f73da7db90a0cda0a48d29 #v1
- name: Set up Python
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
environment-name: IOOS
init-shell: bash
create-args: >-
--file .binder/conda-lock.yml
python-version: "3.x"


- name: Build documentation
shell: bash -l {0}
run: >
set -e
&& pip install jupyter-book
&& jupyter-book build jupyterbook
- name: GitHub Pages action
if: github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e #v4
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: jupyterbook/_build/html
32 changes: 32 additions & 0 deletions .github/workflows/docs-linkchecker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Check linkrot

on:
pull_request:
push:
branches: [main]

jobs:
build-docs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Set up Python
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: "3.x"


- name: Linkcheck
run: >
set -e
&& pip install jupyter-book
&& jupyter-book build jupyterbook --builder linkcheck
- name: GitHub Pages action
if: github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: jupyterbook/_build/html
14 changes: 5 additions & 9 deletions .github/workflows/test-env.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test Environment and link rot
name: Test Environment

on:
pull_request:
Expand All @@ -8,17 +8,18 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macos-latest, ubuntu-latest, windows-latest ]
# macos-latest is osx-arm64 and the env is not building there yet b/c of robis.
os: [ macos-13, ubuntu-latest, windows-latest ]
fail-fast: false
defaults:
run:
shell: bash -l {0}

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Setup Micromamba
uses: mamba-org/setup-micromamba@068f1ab4b37ed9b3d9f73da7db90a0cda0a48d29 #v1
uses: mamba-org/setup-micromamba@068f1ab4b37ed9b3d9f73da7db90a0cda0a48d29 # v2.0.3
with:
environment-name: IOOS
init-shell: bash
Expand All @@ -28,8 +29,3 @@ jobs:
- name: Test environment
run: >
python -c 'import osgeo.gdal; print(dir(osgeo.gdal))'
- name: Test links
if: startsWith(matrix.os, 'ubuntu')
run: >
jupyter-book build jupyterbook --builder linkcheck
9 changes: 5 additions & 4 deletions .github/workflows/test_data_access_notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Setup Micromamba
uses: mamba-org/setup-micromamba@068f1ab4b37ed9b3d9f73da7db90a0cda0a48d29 #v1
uses: mamba-org/setup-micromamba@068f1ab4b37ed9b3d9f73da7db90a0cda0a48d29 # v2.0.3
with:
environment-name: IOOS
init-shell: bash
Expand All @@ -20,5 +20,6 @@ jobs:
- name: Notebook tests
shell: bash -l {0}
run: |
python -m pytest --nbval --nbval-lax jupyterbook/content/code_gallery/data_access_notebooks/
run: >
micromamba install nbval
&& 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 @@ -8,10 +8,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Setup Micromamba
uses: mamba-org/setup-micromamba@068f1ab4b37ed9b3d9f73da7db90a0cda0a48d29 #v1
uses: mamba-org/setup-micromamba@068f1ab4b37ed9b3d9f73da7db90a0cda0a48d29 # v2.0.3
with:
environment-name: IOOS
init-shell: bash
Expand All @@ -20,5 +20,6 @@ jobs:
- name: Notebook tests
shell: bash -l {0}
run: |
python -m pytest --nbval --nbval-lax jupyterbook/content/code_gallery/data_analysis_and_visualization_notebooks/
run: >
micromamba install nbval
&& python -m pytest --nbval --nbval-lax jupyterbook/content/code_gallery/data_analysis_and_visualization_notebooks/
9 changes: 5 additions & 4 deletions .github/workflows/test_data_management_notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Setup Micromamba
uses: mamba-org/setup-micromamba@068f1ab4b37ed9b3d9f73da7db90a0cda0a48d29 #v1
uses: mamba-org/setup-micromamba@068f1ab4b37ed9b3d9f73da7db90a0cda0a48d29 # v2.0.3
with:
environment-name: IOOS
init-shell: bash
Expand All @@ -20,5 +20,6 @@ jobs:
- name: Notebook tests
shell: bash -l {0}
run: |
python -m pytest --nbval --nbval-lax jupyterbook/content/code_gallery/data_management_notebooks/
run: >
micromamba install nbval
&& python -m pytest --nbval --nbval-lax jupyterbook/content/code_gallery/data_management_notebooks/
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ repos:
- id: add-trailing-comma

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

Expand Down
2 changes: 2 additions & 0 deletions jupyterbook/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ sphinx:
"./data_management_notebooks/.*",
"./data_analysis_and_visualization_notebooks/.*",
"https://www.ncei.noaa.gov/archive/accession/0282699", # slow
"https://gcoos4.tamu.edu/erddap/info/fk_CREMP_yearly_revisited_DATA_v3_1996/index.html", # data is gone
"https://gcoos4.tamu.edu/erddap/tabledap/fk_CREMP_yearly_revisited_DATA_v3_1996.html", # data is gone
]
linkcheck_anchors_ignore: ["aboutPanel", "searchPanel", "!forum/ioos_tech"]
html_show_copyright: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"To demonstrate the Matlab/Octave notebook we will use a well known toolbox for tidal analysis [`t_tide`](https://www.eoas.ubc.ca/~rich/).\n",
"To demonstrate the Matlab/Octave notebook we will use a well known toolbox for tidal analysis [`t_tide`](https://www-old.eoas.ubc.ca/~rich/).\n",
"First we need to add it to the path."
]
},
Expand Down

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,18 @@ addopts =
--ignore="jupyterbook/content/code_gallery/data_analysis_and_visualization_notebooks/2018-03-15-ssh-skillscore.archived.ipynb"
--ignore="jupyterbook/content/code_gallery/data_analysis_and_visualization_notebooks/2018-03-30-wave_height_assessment.archived.ipynb"
# Missing library/rely on versions that are too old
--ignore="jupyterbook/content/code_gallery/data_analysis_and_visualization_notebooks/2017-03-30-octave_notebook_example.ipynb"
--ignore="jupyterbook/content/code_gallery/data_access_notebooks/2017-09-09-hurricane_irma.ipynb"
--ignore="jupyterbook/content/code_gallery/data_access_notebooks/2019-05-27-hurricane_gis_part02.ipynb"
--ignore="jupyterbook/content/code_gallery/data_analysis_and_visualization_notebooks/2017-03-30-octave_notebook_example.ipynb"
--ignore="jupyterbook/content/code_gallery/data_management_notebooks/2017-11-01-Creating-Archives-Using-Bagit.ipynb"
# Take too long to run
--ignore="jupyterbook/content/code_gallery/data_access_notebooks/2019-03-08-grids-temperature.ipynb"
--ignore="jupyterbook/content/code_gallery/data_access_notebooks/2024-09-17-CKAN_API_Query.ipynb"
# Skipping all the notbooks with the R kernel
--ignore="jupyterbook/content/code_gallery/data_access_notebooks/2017-08-01-xtractoR.ipynb"
--ignore="jupyterbook/content/code_gallery/data_access_notebooks/2017-11-30-rerddap.ipynb"
--ignore="jupyterbook/content/code_gallery/data_access_notebooks/2018-02-20-obis.ipynb"
--ignore="jupyterbook/content/code_gallery/data_analysis_and_visualization_notebooks/2017-01-23-R-notebook.ipynb"
--ignore="jupyterbook/content/code_gallery/data_analysis_and_visualization_notebooks/2024-05-16-white_shark_water_temp.ipynb"
# ERDDAP 403
--ignore="jupyterbook/content/code_gallery/data_analysis_and_visualization_notebooks/2021-10-25-ERDDAP-interpolate.ipynb"

0 comments on commit 83c9019

Please sign in to comment.