Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
jukent authored May 14, 2024
2 parents 631ac83 + 005a619 commit eaebaf5
Show file tree
Hide file tree
Showing 14 changed files with 138 additions and 33 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/trigger-replace-links.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: trigger-replace-links

on:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- uses: actions/checkout@v4
- name: Find and Replace Repository Name
uses: jacobtomlinson/gha-find-replace@v3
with:
find: "ProjectPythia/cookbook-template"
replace: "${{ github.repository_owner }}/${{ github.event.repository.name }}"
regex: false
exclude: ".github/workflows/trigger-replace-links.yaml"

- name: Find and Replace Repository ID
uses: jacobtomlinson/gha-find-replace@v3
with:
find: "475509405"
replace: "${{ github.repository_id}}"
regex: false
exclude: ".github/workflows/trigger-replace-links.yaml"

- name: Push changes
uses: stefanzweifel/git-auto-commit-action@v5
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,6 @@ dmypy.json

# Pyre type checker
.pyre/

# Ephemeral .nfs files
.nfs*
15 changes: 8 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand All @@ -10,37 +10,38 @@ repos:
- id: double-quote-string-fixer

- repo: https://github.com/psf/black
rev: 22.12.0
rev: 23.12.1
hooks:
- id: black

- repo: https://github.com/keewis/blackdoc
rev: v0.3.8
rev: v0.3.9
hooks:
- id: blackdoc

- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
rev: 7.0.0
hooks:
- id: flake8

- repo: https://github.com/asottile/seed-isort-config
rev: v2.2.0
hooks:
- id: seed-isort-config

- repo: https://github.com/PyCQA/isort
rev: 5.11.4
rev: 5.13.2
hooks:
- id: isort

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.7.1
rev: v3.1.0
hooks:
- id: prettier
additional_dependencies: [[email protected]]

- repo: https://github.com/nbQA-dev/nbQA
rev: 1.6.1
rev: 1.7.1
hooks:
- id: nbqa-black
additional_dependencies: [black]
Expand Down
48 changes: 48 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
cff-version: 1.2.0
message: "If you use this cookbook, please cite it as below."
authors:
# add additional entries for each author -- see https://github.com/citation-file-format/citation-file-format/blob/main/schema-guide.md
- family-names: Rose
given-names: Brian E. J.
orcid: https://orcid.org/0000-0002-9961-3821 # optional
website: https://github.com/brian-rose # optional
affiliation: University at Albany (State University of New York) # optional
- family-names: Kent
given-names: Julia
orcid: https://orcid.org/0000-0002-5611-8986
website: https://github.com/jukent
affiliation: UCAR/NCAR
- family-names: Tyle
given-names: Kevin
orcid: https://orcid.org/0000-0001-5249-9665
website: https://github.com/ktyle
affiliation: University at Albany (State University of New York)
- family-names: Clyne
given-names: John
orcid: https://orcid.org/0000-0003-2788-9017
website: https://github.com/clyne
affiliation: UCAR/NCAR
- family-names: Camron
given-names: Drew
orcid: https://orcid.org/0000-0001-7246-6502
website: https://github.com/dcamron
affiliation: UCAR/Unidata
- family-names: Grover
given-names: Maxwell
orcid: https://orcid.org/0000-0002-0370-8974
website: https://github.com/mgrover1
affiliation: Argonne National Laboratory
- family-names: Ford
given-names: Robert R.
orcid: https://orcid.org/0000-0001-5483-4965
website: https://github.com/r-ford
affiliation: University at Albany (State University of New York)
- family-names: Paul
given-names: Kevin
orcid: https://orcid.org/0000-0001-8155-8038
website: https://github.com/kmpaul
affiliation: NVIDIA
- name: "Cookbook Template contributors" # use the 'name' field to acknowledge organizations
website: "https://github.com/ProjectPythia/cookbook-template/graphs/contributors"
title: "Cookbook Template"
abstract: "A sample cookbook description."
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
# (Replace_with_your_title) Cookbook

[![nightly-build](https://github.com/ProjectPythia/cookbook-template/actions/workflows/nightly-build.yaml/badge.svg)](https://github.com/ProjectPythia/cookbook-template/actions/workflows/nightly-build.yaml)
[![Binder](http://binder.mypythia.org/badge_logo.svg)](http://binder.mypythia.org/v2/gh/ProjectPythia/cookbook-template/main?labpath=notebooks)
[![Binder](https://binder.projectpythia.org/badge_logo.svg)](https://binder.projectpythia.org/v2/gh/ProjectPythia/cookbook-template/main?labpath=notebooks)
[![DOI](https://zenodo.org/badge/475509405.svg)](https://zenodo.org/badge/latestdoi/475509405)

This Project Pythia Cookbook covers ... (replace `...` with the main subject of your cookbook ... e.g., _working with radar data in Python_)

Expand Down Expand Up @@ -35,12 +36,12 @@ This Project Pythia Cookbook covers ... (replace `...` with the main subject of

## Running the Notebooks

You can either run the notebook using [Binder](https://mybinder.org/) or on your local machine.
You can either run the notebook using [Binder](https://binder.projectpythia.org/) or on your local machine.

### Running on Binder

The simplest way to interact with a Jupyter Notebook is through
[Binder](https://mybinder.org/), which enables the execution of a
[Binder](https://binder.projectpythia.org/), which enables the execution of a
[Jupyter Book](https://jupyterbook.org) in the cloud. The details of how this works are not
important for now. All you need to know is how to launch a Pythia
Cookbooks chapter via Binder. Simply navigate your mouse to
Expand Down
36 changes: 19 additions & 17 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,10 @@
title: Project Pythia Cookbook Template
author: the <a href="https://projectpythia.org/">Project Pythia</a> Community
logo: notebooks/images/logos/pythia_logo-white-rtext.svg
email: [email protected]
copyright: "2022"

description: A sample cookbook description.
thumbnail: thumbnail.png
tags:
domains:
- sampledomain
packages:
- samplepackage
copyright: "2024"

execute:
# To execute notebooks via a binder instead, replace 'cache' with 'binder'
# To execute notebooks via a Binder instead, replace 'cache' with 'binder'
execute_notebooks: cache
timeout: 600
allow_errors: False # cells with expected failures must set the `raises-exception` cell tag
Expand All @@ -36,9 +27,10 @@ parse:

sphinx:
config:
linkcheck_ignore: ["https://doi.org/*",]
linkcheck_ignore: ["https://doi.org/*", "https://zenodo.org/badge/*"] # don't run link checker on DOI links since they are immutable
nb_execution_raise_on_error: true # raise exception in build if there are notebook errors (this flag is ignored if building on binder)
html_favicon: notebooks/images/icons/favicon.ico
html_last_updated_fmt: '%-d %B %Y'
html_last_updated_fmt: "%-d %B %Y"
html_theme: sphinx_pythia_theme
html_permalinks_icon: '<i class="fas fa-link"></i>'
html_theme_options:
Expand All @@ -48,7 +40,9 @@ sphinx:
use_issues_button: true
use_repository_button: true
use_edit_page_button: true
google_analytics_id: G-T52X8HNYE8
use_fullscreen_button: true
analytics:
google_analytics_id: G-T52X8HNYE8
github_url: https://github.com/ProjectPythia
twitter_url: https://twitter.com/project_pythia
icon_links:
Expand All @@ -57,13 +51,18 @@ sphinx:
icon: fab fa-youtube-square
type: fontawesome
launch_buttons:
binderhub_url: http://binder.mypythia.org
binderhub_url: https://binder.projectpythia.org
notebook_interface: jupyterlab
extra_navbar: ""
extra_footer: |
Theme by <a href="https://projectpythia.org">Project Pythia</a>.
All code in Pythia Cookbooks is licensed under Apache 2.0. All other non-code content is licensed under <a href="https://creativecommons.org/licenses/by/4.0/">Creative Commons BY 4.0 (CC BY 4.0)</a>.
logo_link: https://projectpythia.org
logo:
link: https://projectpythia.org
navbar_start:
- navbar-logo
navbar_end:
- navbar-icon-links
navbar_links:
- name: Home
url: https://projectpythia.org
Expand All @@ -76,6 +75,9 @@ sphinx:
- name: Community
url: https://projectpythia.org/index.html#join-us
footer_logos:
NCAR: notebooks/images/logos/NCAR-contemp-logo-blue.svg
NCAR: notebooks/images/logos/NSF-NCAR_Lockup-UCAR-Dark_102523.svg
Unidata: notebooks/images/logos/Unidata_logo_horizontal_1200x300.svg
UAlbany: notebooks/images/logos/UAlbany-A2-logo-purple-gold.svg
footer_start:
- footer-logos
- footer-info
6 changes: 6 additions & 0 deletions _gallery_info.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
thumbnail: thumbnail.png
tags:
domains:
- sampledomain
packages:
- samplepackage
6 changes: 6 additions & 0 deletions _static/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.bd-main .bd-content .bd-article-container {
max-width: 100%; /* default is 60em */
}
.bd-page-width {
max-width: 100%; /* default is 88rem */
}
3 changes: 3 additions & 0 deletions _toc.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
format: jb-book
root: README
parts:
- caption: Preamble
chapters:
- file: notebooks/how-to-cite
- caption: Introduction
chapters:
- file: notebooks/notebook-template
5 changes: 1 addition & 4 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,4 @@ channels:
dependencies:
- jupyter-book
- jupyterlab
- jupyter_server<2
- pip
- pip:
- sphinx-pythia-theme
- sphinx-pythia-theme
7 changes: 7 additions & 0 deletions notebooks/how-to-cite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# How to Cite This Cookbook

The material in this Project Pythia Cookbook is licensed for free and open consumption and reuse. All code is served under [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0), while all non-code content is licensed under [Creative Commons BY 4.0 (CC BY 4.0)](https://creativecommons.org/licenses/by/4.0/). Effectively, this means you are free to share and adapt this material so long as you give appropriate credit to the Cookbook authors and the Project Pythia community.

The source code for the book is [released on GitHub](https://github.com/ProjectPythia/cookbook-template) and archived on Zenodo. This DOI will always resolve to the latest release of the book source:

[![DOI](https://zenodo.org/badge/475509405.svg)](https://zenodo.org/badge/latestdoi/475509405)
1 change: 0 additions & 1 deletion notebooks/images/logos/NCAR-contemp-logo-blue.svg

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion notebooks/notebook-template.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.0"
"version": "3.10.8"
},
"nbdime-conflicts": {
"local_diff": [
Expand Down

0 comments on commit eaebaf5

Please sign in to comment.