diff --git a/.gitignore b/.gitignore index 96883245..efe8c9c2 100644 --- a/.gitignore +++ b/.gitignore @@ -7,5 +7,6 @@ index.html !.pixi/config.toml pixi.lock .vscode/ +_build jupyterbook/content/code_gallery/data_access_notebooks/.dodsrc jupyterbook/content/code_gallery/data_access_notebooks/chlor_a.nc diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5c74c485..68957bd8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -34,7 +34,7 @@ repos: - id: add-trailing-comma - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.16.4 + rev: v0.16.5 hooks: - id: ruff @@ -55,7 +55,7 @@ repos: - id: nb-strip-paths - repo: https://github.com/woodruffw/zizmor-pre-commit - rev: v1.29.0 + rev: v1.30.0 hooks: - id: zizmor diff --git a/jupyterbook/_config.yml b/jupyterbook/_config.yml deleted file mode 100644 index dd3de465..00000000 --- a/jupyterbook/_config.yml +++ /dev/null @@ -1,111 +0,0 @@ -# Book settings -title: The U.S. Integrated Ocean Observing System (IOOS) -author: IOOS # The author of the book -logo: images/IOOS_logo.png # A path to the book logo - -# Patterns to skip when building the book. Can be glob-style (e.g. "*skip.ipynb") -exclude_patterns: [_build, Thumbs.db, .DS_Store, "**.ipynb_checkpoints", "**.archived.ipynb"] -# Auto-exclude files not in the toc -only_build_toc_files: true - -####################################################################################### -# Execution settings -execute: - execute_notebooks: off # Whether to execute notebooks at build time. Must be one of ("auto", "force", "cache", "off") - cache: "" # A path to the jupyter cache that will be used to store execution artifacts. Defaults to `_build/.jupyter_cache/` - exclude_patterns: [] # A list of patterns to *skip* in execution (e.g. a notebook that takes a really long time) - timeout: 30 # The maximum time (in seconds) each notebook cell is allowed to run. - run_in_temp: false # If `True`, then a temporary directory will be created and used as the command working directory (cwd),otherwise the notebook's parent directory will be the cwd. - allow_errors: false # If `False`, when a code cell raises an error the execution is stopped, otherwise all cells are always run. - stderr_output: show # One of 'show', 'remove', 'remove-warn', 'warn', 'error', 'severe' - -####################################################################################### -# Parse and render settings -parse: - myst_enable_extensions: # default extensions to enable in the myst parser. See https://myst-parser.readthedocs.io/en/latest/using/syntax-optional.html - - amsmath - - colon_fence - - deflist - - dollarmath - - html_admonition - - html_image - - linkify - - replacements - - smartquotes - - substitution - - myst_url_schemes: [mailto, http, https] # URI schemes that will be recognized as external URLs in Markdown links - myst_dmath_double_inline: true # Allow display math ($$) within an inline context - -####################################################################################### -# HTML-specific settings -html: - favicon: "images/IOOS_logo.png" # A path to a favicon image - use_edit_page_button: false # Whether to add an "edit this page" button to pages. If `true`, repository information in repository: must be filled in - use_repository_button: true # Whether to add a link to your repository button - use_issues_button: true # Whether to add an "open an issue" button - # Hitting https://github.com/jupyter-book/jupyter-book/issues/1966 - extra_navbar: IOOS - extra_footer: ioos.noaa.gov   - Facebook   - Twitter   - Contact Us
- U.S. Integrated Ocean Observing System Program
- 1315 East-West Highway
- SSMC3, 2nd Floor
- Silver Spring, MD 20910
- (240) 533-9444 - google_analytics_id: "G-546J258RCJ" - home_page_in_navbar: false # Whether to include your home page in the left Navigation Bar - baseurl: "https://ioos.github.io/ioos_code_lab/" # The base URL where your book will be hosted. Used for creating image previews and social links. e.g.: https://mypage.com/mybook/ - comments: - hypothesis: false - utterances: false - ####################################################################################### -# LaTeX-specific settings -latex: - latex_engine: pdflatex # one of 'pdflatex', 'xelatex' (recommended for unicode), 'luatex', 'platex', 'uplatex' - use_jupyterbook_latex: true # use jupyterbook-latex for pdf builds as default - -####################################################################################### -# Launch button settings -launch_buttons: - notebook_interface: jupyterlab # The interface interactive links will activate ["classic", "jupyterlab"] - binderhub_url: https://mybinder.org # The URL of the BinderHub (e.g., https://mybinder.org) - jupyterhub_url: "" # The URL of the JupyterHub (e.g., https://datahub.berkeley.edu) - thebe: false # Add a thebe button to pages (requires the repository to run on Binder) - colab_url: "https://colab.research.google.com" # The URL of Google Colab (https://colab.research.google.com) - -repository: - url: https://github.com/ioos/ioos_code_lab # The URL to your book's repository - path_to_book: "jupyterbook" # A path to your book's folder, relative to the repository root. - branch: main # Which branch of the repository should be used when creating links - -####################################################################################### -# Advanced and power-user settings -sphinx: - config: - linkcheck_ignore: [ - "./data_access_notebooks/.*", - "./data_analysis_and_visualization_notebooks/.*", - "./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 - myst_heading_anchors: 3 - nb_mime_priority_overrides: [ - ["html", "application/vnd.jupyter.widget-view+json", 10], - ["html", "application/javascript", 20], - ["html", "text/html", 30], - ["html", "image/svg+xml", 40], - ["html", "image/png", 50], - ["html", "image/gif", 60], - ["html", "image/jpeg", 70], - ["html", "text/markdown", 80], - ["html", "text/latex", 90], - ["html", "text/plain", 100] - ] diff --git a/jupyterbook/_toc.yml b/jupyterbook/_toc.yml deleted file mode 100644 index 1836ac38..00000000 --- a/jupyterbook/_toc.yml +++ /dev/null @@ -1,40 +0,0 @@ -format: jb-book -root: content/intro.md -title: The IOOS Data Demo Center -parts: - - - caption: Getting Started - chapters: - - file: content/ioos_installation_conda.md - title: Installing the IOOS Conda Environment - - - caption: Code Gallery - chapters: - - file: content/code_gallery/gallery.md - title: Notebooks gallery - - file: content/code_gallery/data_access.md - sections: - - glob: content/code_gallery/data_access_notebooks/* - - - file: content/code_gallery/data_analysis_and_visualization.md - sections: - - glob: content/code_gallery/data_analysis_and_visualization_notebooks/* - - - file: content/code_gallery/data_management.md - sections: - - glob: content/code_gallery/data_management_notebooks/* - - - caption: Video Tutorials - chapters: - - glob: content/Video_Demo_Markdown/* - - - caption: Other Resources - chapters: - - url: https://help.aodn.org.au/aodn-data-tools/user-code-library/ - title: Opening netCDF files - hints from AODN - - url: http://unidata.github.io/notebook-gallery/ - title: Unidata Jupyter Notebook Gallery - - url: http://iobis.org/tutorial/ - title: Extracting and Enriching OBIS data with R - - url: https://github.com/USGS-R - title: USGS-R Examples diff --git a/jupyterbook/content/code_gallery/data_access.md b/jupyterbook/content/code_gallery/data_access.md index f63f0d4a..8af4ae87 100644 --- a/jupyterbook/content/code_gallery/data_access.md +++ b/jupyterbook/content/code_gallery/data_access.md @@ -11,11 +11,3 @@ services (SOS, THREDDS, ERDDAP, etc) and tools for scientists and managers looki Matlab, R, etc). For more information on accessing IOOS data, see . - -______________________________________________________________________ - -## Chapter table of contents - -```{tableofcontents} - -``` diff --git a/jupyterbook/content/code_gallery/data_analysis_and_visualization.md b/jupyterbook/content/code_gallery/data_analysis_and_visualization.md index 4315f20c..fd0a6c46 100644 --- a/jupyterbook/content/code_gallery/data_analysis_and_visualization.md +++ b/jupyterbook/content/code_gallery/data_analysis_and_visualization.md @@ -1,11 +1,3 @@ # Data Analysis And Visualization This chapter will consist of notebooks pertaining to data analysis. - -______________________________________________________________________ - -## Chapter table of contents - -```{tableofcontents} - -``` diff --git a/jupyterbook/content/code_gallery/data_management.md b/jupyterbook/content/code_gallery/data_management.md index c272520e..b6b8599f 100644 --- a/jupyterbook/content/code_gallery/data_management.md +++ b/jupyterbook/content/code_gallery/data_management.md @@ -3,11 +3,3 @@ Data management is an increasingly important aspect of IOOS activities. In this chapter you will find examples of how to use various tools to ensure compliance with existing standards and conventions. For more details on IOOS recommendations on data standards, see . - -______________________________________________________________________ - -## Chapter table of contents - -```{tableofcontents} - -``` diff --git a/jupyterbook/images/favicon.png b/jupyterbook/images/favicon.png new file mode 100644 index 00000000..cfa35220 Binary files /dev/null and b/jupyterbook/images/favicon.png differ diff --git a/jupyterbook/myst.yml b/jupyterbook/myst.yml new file mode 100644 index 00000000..381e2a32 --- /dev/null +++ b/jupyterbook/myst.yml @@ -0,0 +1,31 @@ +version: 1 +project: + id: f52c9f46-1d93-487d-88d0-98c68a254f0b + title: IOOS CodeLab + github: https://github.com/ioos/ioos_code_lab + toc: + - file: content/intro.md + - title: Getting Started + children: + - file: content/ioos_installation_conda.md + - title: Code Gallery + children: + - file: content/code_gallery/gallery.md + - file: content/code_gallery/data_access.md + children: + - pattern: "content/code_gallery/data_access_notebooks/*.ipynb" + - file: content/code_gallery/data_analysis_and_visualization.md + children: + - pattern: "content/code_gallery/data_analysis_and_visualization_notebooks/*.ipynb" + - file: content/code_gallery/data_management.md + children: + - pattern: "content/code_gallery/data_management_notebooks/*.ipynb" + - title: Video Tutorials + children: + - pattern: content/Video_Demo_Markdown/*.md + +site: + template: book-theme + options: + favicon: images/favicon.png + logo: images/IOOS_logo.png diff --git a/pixi.toml b/pixi.toml index 4734efc7..41041ea3 100644 --- a/pixi.toml +++ b/pixi.toml @@ -6,10 +6,10 @@ platforms = ["linux-64"] version = "0.1.0" [tasks] -build_html = { cmd = ["jupyter-book", "build", "jupyterbook"] } +build_html = { cmd = "cd jupyterbook && jupyter-book build --html" } jb = { cmd = "python jupyterbook/add_header.py", depends-on=["build_html"] } linkcheck = { cmd = "jupyter-book build jupyterbook --builder linkcheck" } [dependencies] -jupyter-book = ">=1.0.4,<2" -pydata-sphinx-theme = "==0.16.1" +jupyter-book = ">=2.1.6,<3" +nodejs = ">=18.0.0,<26.8.0"