Skip to content

Commit

Permalink
Lint the repo (#31)
Browse files Browse the repository at this point in the history
* Lint the repo

* Lint code in comment (tut01)

* Apply suggestions from code review

Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com>

* Lint again

---------

Co-authored-by: yvonnefroelich <yvonne.froehlich@kit.edu>
Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com>
  • Loading branch information
3 people authored Dec 5, 2024
1 parent 45705b7 commit 68b9c78
Show file tree
Hide file tree
Showing 9 changed files with 5,395 additions and 5,396 deletions.
52 changes: 26 additions & 26 deletions .github/workflows/deploy-book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ on:
# unrelated files, you can make this run only if a file within that specific
# folder has been modified.
paths:
- '.github/workflows/deploy-book.yml'
- 'book/**'
- ".github/workflows/deploy-book.yml"
- "book/**"

# This job installs dependencies, builds the book, and pushes it to `gh-pages`
jobs:
Expand All @@ -29,30 +29,30 @@ jobs:
shell: bash -l {0}

steps:
# Checkout current git repository
- name: Checkout
uses: actions/checkout@v4.1.7
# Checkout current git repository
- name: Checkout
uses: actions/checkout@v4.1.7

# Install Mambaforge with conda-forge dependencies
- name: Setup Mambaforge
uses: mamba-org/setup-micromamba@v1.9.0
with:
environment-name: agu24workshop
environment-file: conda-lock.yml
create-args: >-
python=${{ matrix.python-version }}
condarc: |
channels:
- conda-forge
- nodefaults
# Install Mambaforge with conda-forge dependencies
- name: Setup Mambaforge
uses: mamba-org/setup-micromamba@v1.9.0
with:
environment-name: agu24workshop
environment-file: conda-lock.yml
create-args: >-
python=${{ matrix.python-version }}
condarc: |
channels:
- conda-forge
- nodefaults
# Build the book
- name: Build the book
run: jupyter-book build book/
# Build the book
- name: Build the book
run: jupyter-book build book/

# Push the book's HTML to github-pages
- name: GitHub Pages action
uses: peaceiris/actions-gh-pages@v4.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: book/_build/html
# Push the book's HTML to github-pages
- name: GitHub Pages action
uses: peaceiris/actions-gh-pages@v4.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: book/_build/html
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ pre-conference workshop (PREWS9) at the
[AGU24 Annual Meeting](https://www.agu.org/annual-meeting).

**Presenters**

- [Wei Ji Leong](https://github.com/weiji14)
- [Yvonne Fröhlich](https://github.com/yvonnefroehlich)
- [Jing-Hui Tong](https://github.com/jhtong33)
Expand All @@ -17,6 +18,7 @@ pre-conference workshop (PREWS9) at the
- [Andre Luiz Belem](https://github.com/andrebelem)

**When**

- Sunday 8 December 2024, 8:30-17:00 (EST) / 13:10-22:00 (UTC)
- [Event Time Zone Converter](https://www.timeanddate.com/worldclock/fixedtime.html?msg=AGU24+workshop%3A+Mastering+Geospatial+Visualizations+with+GMT%2FPyGMT&iso=20241208T0830&p1=263&ah=8&am=30)

Expand All @@ -27,21 +29,20 @@ Washington, DC 20001, United States

## Schedule

| Time (EST) | Topic |
|:-----------:|:-------------------------------------------------------:|
| 08:30-08:40 | Introduction to GMT / PyGMT |
| 08:40-08:55 | Installation |
| 08:55-09:45 | Tutorial 1 - First figure + Subplots / layout |
| 09:45-10:15 | **Break** |
| 10:15-11:00 | Tutorial 2 - Integration with scientific Python ecosystem: pandas / GeoPandas |
| 11:00-11:45 | Tutorial 3 - Integration with scientific Python ecosystem: Xarray (grids) |
| 11:45-12:45 | **Lunch** |
| 12:45-13:30 | Tutorial 4 - Geophysics (Seismology) |
| 13:30-14:15 | Tutorial 5 - 3-D Topography (Planetary / Antarctic maps) |
| 14:15-14:45 | **Break** |
| 14:45-15:30 | Tutorial 6 - Animations with GMT |
| 15:30-17:00 | Final exercises / mini-project |

| Time (EST) | Topic |
| :---------: | :------------------------------------------------------------------------------------------: |
| 08:30-08:40 | Introduction to GMT / PyGMT |
| 08:40-08:55 | Installation |
| 08:55-09:45 | Tutorial 1 - First figure and Subplots / layout |
| 09:45-10:15 | **Break** |
| 10:15-11:00 | Tutorial 2 - Integration with scientific Python ecosystem: pandas / GeoPandas (tabular data) |
| 11:00-11:45 | Tutorial 3 - Integration with scientific Python ecosystem: Xarray (gridded data) |
| 11:45-12:45 | **Lunch** |
| 12:45-13:30 | Tutorial 4 - Geophysics (Seismology) |
| 13:30-14:15 | Tutorial 5 - 3-D Topography (Planetary / Antarctic maps) |
| 14:15-14:45 | **Break** |
| 14:45-15:30 | Tutorial 6 - Animations with GMT |
| 15:30-17:00 | Final exercises / mini-project |

## Getting started

Expand All @@ -51,7 +52,6 @@ Launch on regular [Binder](https://mybinder.readthedocs.io/en/latest/index.html)

[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/GenericMappingTools/agu24workshop/main)


## Code of Conduct

All involved individuals must follow the
Expand Down
8 changes: 4 additions & 4 deletions book/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ logo: logo.webp
# See https://jupyterbook.org/content/execute.html
execute:
execute_notebooks: cache
timeout: 270 # https://jupyterbook.org/en/stable/content/execute.html#setting-execution-timeout
timeout: 270 # https://jupyterbook.org/en/stable/content/execute.html#setting-execution-timeout

# Define the name of the latex output file for PDF builds
latex:
Expand All @@ -27,9 +27,9 @@ launch_buttons:

# Information about where the book exists on the web
repository:
url: https://github.com/GenericMappingTools/agu24workshop # Online location of your book
path_to_book: book # Optional path to your book, relative to the repository root
branch: main # Which branch of the repository should be used when creating links (optional)
url: https://github.com/GenericMappingTools/agu24workshop # Online location of your book
path_to_book: book # Optional path to your book, relative to the repository root
branch: main # Which branch of the repository should be used when creating links (optional)

# Add GitHub buttons to your book
# See https://jupyterbook.org/customize/config.html#add-a-link-to-your-repository
Expand Down
32 changes: 16 additions & 16 deletions book/_toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
format: jb-book
root: intro
parts:
- caption: 🔗 Details
chapters:
- title: AGU24 Homepage
url: https://www.agu.org/annual-meeting
- title: Course materials on GitHub
url: https://github.com/GenericMappingTools/agu24workshop
- caption: 🧑‍🏫 Tutorials
chapters:
- file: tut01_firstfigure
- file: tut02_spe_pd_gpd
- file: tut03_spe_xarray
- file: tut04_geophysics
- file: tut05_topography
- file: tut06_animation
sections:
- file: tut06_animation_extended
- caption: 🔗 Details
chapters:
- title: AGU24 Homepage
url: https://www.agu.org/annual-meeting
- title: Course materials on GitHub
url: https://github.com/GenericMappingTools/agu24workshop
- caption: 🧑‍🏫 Tutorials
chapters:
- file: tut01_firstfigure
- file: tut02_spe_pd_gpd
- file: tut03_spe_xarray
- file: tut04_geophysics
- file: tut05_topography
- file: tut06_animation
sections:
- file: tut06_animation_extended
34 changes: 14 additions & 20 deletions book/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@ tutorials for making maps 🗺️ and animations 🎦
:gutter: 1
:padding: 1


:::::{grid-item}
::::{grid} 1 1 1 1
:gutter: 1

:::{grid-item-card} Tutorial 1 - First figure 🚀 and Subplots / layout
:img-top: _images/fd70248f75b8b37ee54b3135f77705f98c6d8489eb18b6910184b447d0f0638d.png
:img-top: \_images/fd70248f75b8b37ee54b3135f77705f98c6d8489eb18b6910184b447d0f0638d.png
:link: ./tut01_firstfigure.html
by [Jing-Hui Tong](https://orcid.org/0009-0002-7195-3071)
+++
Expand All @@ -29,7 +28,7 @@ by [Jing-Hui Tong](https://orcid.org/0009-0002-7195-3071)
:::

:::{grid-item-card} Tutorial 2 - Integration with the scientific Python ecosystem 🐍: pandas and GeoPandas (tabular data 🗒️)
:img-top: _images/7f18327908c8dd210197cc51845e45a933f356b9fd12bd029a4a8cbda080eb2b.png
:img-top: \_images/7f18327908c8dd210197cc51845e45a933f356b9fd12bd029a4a8cbda080eb2b.png
:link: ./tut02_spe_pd_gpd.html
by [Yvonne Fröhlich](https://orcid.org/0000-0002-8566-0619)
+++
Expand All @@ -47,13 +46,12 @@ by [Yvonne Fröhlich](https://orcid.org/0000-0002-8566-0619)
::::
:::::


:::::{grid-item}
::::{grid} 1 1 1 1
:gutter: 1

:::{grid-item-card} Tutorial 3 - Integration with the scientific Python ecosystem 🐍: Xarray (gridded data 🌐)
:img-top: _images/a18fcb026fb0d0c83360f2b8382a360e552dd50db6aa2db5311259bf5223d3a2.png
:img-top: \_images/a18fcb026fb0d0c83360f2b8382a360e552dd50db6aa2db5311259bf5223d3a2.png
:link: ./tut03_spe_xarray.html
by [Max Jones](https://orcid.org/0000-0003-0180-8928)
+++
Expand Down Expand Up @@ -89,13 +87,12 @@ and [Yvonne Fröhlich](https://orcid.org/0000-0002-8566-0619)
::::
:::::


:::::{grid-item}
::::{grid} 1 1 1 1
:gutter: 1

:::{grid-item-card} Tutorial 5 - 3-D Topography (Planetary / Antarctic maps)
:img-top: _images/0a6fc097b1fcaa99eff8632dab714787757564ed60e07f20825101c6a8e045ae.png
:img-top: \_images/0a6fc097b1fcaa99eff8632dab714787757564ed60e07f20825101c6a8e045ae.png
:link: ./tut05_topography.html
by [Wei Ji Leong](https://orcid.org/0000-0003-2354-1988)
and [André Belém](https://orcid.org/0000-0002-8865-6180)
Expand All @@ -109,7 +106,7 @@ and [André Belém](https://orcid.org/0000-0002-8865-6180)
:::

:::{grid-item-card} Tutorial 6 - Animations with GMT
:img-top: _images/5847818951ca8fbc9b86a6f2c67389b6.png
:img-top: \_images/5847818951ca8fbc9b86a6f2c67389b6.png
:link: ./tut06_animation.html
by [Federico Esteban](https://orcid.org/0000-0002-0641-7371)
+++
Expand All @@ -124,15 +121,12 @@ by [Federico Esteban](https://orcid.org/0000-0002-0641-7371)
::::
:::::


::::::


Each tutorial is rendered on this website for easy viewing 👀, but they are all Jupyter
notebooks designed to be ran interactively 💫. See the instructions below on how you can
start running the tutorials in no time! 🚀


# 🌠 Quickstart

To run these notebooks in an interactive Jupyter session online, 🖱️ click on the button
Expand Down Expand Up @@ -181,18 +175,18 @@ Here's the instructions to install the `agu24workshop` environment:

4. Run the following commands on the 🧑‍💻 command-line to create the virtual environment

```bash
cd /path/to/agu24workshop
conda env create --name agu24workshop --file environment.yml
```
```bash
cd /path/to/agu24workshop
conda env create --name agu24workshop --file environment.yml
```

5. Once the installation is completed 🏁, launch
[Jupyter Lab](https://jupyterlab.readthedocs.io) as follows:

```bash
conda activate agu24workshop
jupyter lab
```
```bash
conda activate agu24workshop
jupyter lab
```

This should open up a page in your default browser. If not, you can click and open
the 🔗 link that says `http://localhost:8888/lab?token=...` in your command-line
Expand All @@ -202,7 +196,7 @@ Here's the instructions to install the `agu24workshop` environment:
https://www.generic-mapping-tools.org/agu24workshop/tut01_firstfigure.html) using
either the download button on the ↗️ top right (select '.ipynb') or from GitHub at
https://github.com/GenericMappingTools/agu24workshop/tree/main/book. Make sure to put
the *.ipynb file(s) inside of the 'agu24workshop' folder.
the \*.ipynb file(s) inside of the 'agu24workshop' folder.

7. Open the Jupyter notebook in the left-pane file browser, e.g. by 🖱️ double-clicking
on `first-figure.ipynb`. You are now ready to run through the course materials 🎉!
Expand Down
Loading

0 comments on commit 68b9c78

Please sign in to comment.