Skip to content

Commit 68b9c78

Browse files
Lint the repo (#31)
* Lint the repo * Lint code in comment (tut01) * Apply suggestions from code review Co-authored-by: Yvonne Fröhlich <[email protected]> * Lint again --------- Co-authored-by: yvonnefroelich <[email protected]> Co-authored-by: Yvonne Fröhlich <[email protected]>
1 parent 45705b7 commit 68b9c78

9 files changed

+5395
-5396
lines changed

.github/workflows/deploy-book.yml

+26-26
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ on:
1313
# unrelated files, you can make this run only if a file within that specific
1414
# folder has been modified.
1515
paths:
16-
- '.github/workflows/deploy-book.yml'
17-
- 'book/**'
16+
- ".github/workflows/deploy-book.yml"
17+
- "book/**"
1818

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

3131
steps:
32-
# Checkout current git repository
33-
- name: Checkout
34-
uses: actions/[email protected]
32+
# Checkout current git repository
33+
- name: Checkout
34+
uses: actions/[email protected]
3535

36-
# Install Mambaforge with conda-forge dependencies
37-
- name: Setup Mambaforge
38-
uses: mamba-org/[email protected]
39-
with:
40-
environment-name: agu24workshop
41-
environment-file: conda-lock.yml
42-
create-args: >-
43-
python=${{ matrix.python-version }}
44-
condarc: |
45-
channels:
46-
- conda-forge
47-
- nodefaults
36+
# Install Mambaforge with conda-forge dependencies
37+
- name: Setup Mambaforge
38+
uses: mamba-org/[email protected]
39+
with:
40+
environment-name: agu24workshop
41+
environment-file: conda-lock.yml
42+
create-args: >-
43+
python=${{ matrix.python-version }}
44+
condarc: |
45+
channels:
46+
- conda-forge
47+
- nodefaults
4848
49-
# Build the book
50-
- name: Build the book
51-
run: jupyter-book build book/
49+
# Build the book
50+
- name: Build the book
51+
run: jupyter-book build book/
5252

53-
# Push the book's HTML to github-pages
54-
- name: GitHub Pages action
55-
uses: peaceiris/[email protected]
56-
with:
57-
github_token: ${{ secrets.GITHUB_TOKEN }}
58-
publish_dir: book/_build/html
53+
# Push the book's HTML to github-pages
54+
- name: GitHub Pages action
55+
uses: peaceiris/[email protected]
56+
with:
57+
github_token: ${{ secrets.GITHUB_TOKEN }}
58+
publish_dir: book/_build/html

README.md

+16-16
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ pre-conference workshop (PREWS9) at the
99
[AGU24 Annual Meeting](https://www.agu.org/annual-meeting).
1010

1111
**Presenters**
12+
1213
- [Wei Ji Leong](https://github.com/weiji14)
1314
- [Yvonne Fröhlich](https://github.com/yvonnefroehlich)
1415
- [Jing-Hui Tong](https://github.com/jhtong33)
@@ -17,6 +18,7 @@ pre-conference workshop (PREWS9) at the
1718
- [Andre Luiz Belem](https://github.com/andrebelem)
1819

1920
**When**
21+
2022
- Sunday 8 December 2024, 8:30-17:00 (EST) / 13:10-22:00 (UTC)
2123
- [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)
2224

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

2830
## Schedule
2931

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

4647
## Getting started
4748

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

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

54-
5555
## Code of Conduct
5656

5757
All involved individuals must follow the

book/_config.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ logo: logo.webp
99
# See https://jupyterbook.org/content/execute.html
1010
execute:
1111
execute_notebooks: cache
12-
timeout: 270 # https://jupyterbook.org/en/stable/content/execute.html#setting-execution-timeout
12+
timeout: 270 # https://jupyterbook.org/en/stable/content/execute.html#setting-execution-timeout
1313

1414
# Define the name of the latex output file for PDF builds
1515
latex:
@@ -27,9 +27,9 @@ launch_buttons:
2727

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

3434
# Add GitHub buttons to your book
3535
# See https://jupyterbook.org/customize/config.html#add-a-link-to-your-repository

book/_toc.yml

+16-16
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@
44
format: jb-book
55
root: intro
66
parts:
7-
- caption: 🔗 Details
8-
chapters:
9-
- title: AGU24 Homepage
10-
url: https://www.agu.org/annual-meeting
11-
- title: Course materials on GitHub
12-
url: https://github.com/GenericMappingTools/agu24workshop
13-
- caption: 🧑‍🏫 Tutorials
14-
chapters:
15-
- file: tut01_firstfigure
16-
- file: tut02_spe_pd_gpd
17-
- file: tut03_spe_xarray
18-
- file: tut04_geophysics
19-
- file: tut05_topography
20-
- file: tut06_animation
21-
sections:
22-
- file: tut06_animation_extended
7+
- caption: 🔗 Details
8+
chapters:
9+
- title: AGU24 Homepage
10+
url: https://www.agu.org/annual-meeting
11+
- title: Course materials on GitHub
12+
url: https://github.com/GenericMappingTools/agu24workshop
13+
- caption: 🧑‍🏫 Tutorials
14+
chapters:
15+
- file: tut01_firstfigure
16+
- file: tut02_spe_pd_gpd
17+
- file: tut03_spe_xarray
18+
- file: tut04_geophysics
19+
- file: tut05_topography
20+
- file: tut06_animation
21+
sections:
22+
- file: tut06_animation_extended

book/intro.md

+14-20
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,12 @@ tutorials for making maps 🗺️ and animations 🎦
88
:gutter: 1
99
:padding: 1
1010

11-
1211
:::::{grid-item}
1312
::::{grid} 1 1 1 1
1413
:gutter: 1
1514

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

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

50-
5149
:::::{grid-item}
5250
::::{grid} 1 1 1 1
5351
:gutter: 1
5452

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

92-
9390
:::::{grid-item}
9491
::::{grid} 1 1 1 1
9592
:gutter: 1
9693

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

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

127-
128124
::::::
129125

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

135-
136130
# 🌠 Quickstart
137131

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

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

184-
```bash
185-
cd /path/to/agu24workshop
186-
conda env create --name agu24workshop --file environment.yml
187-
```
178+
```bash
179+
cd /path/to/agu24workshop
180+
conda env create --name agu24workshop --file environment.yml
181+
```
188182

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

192-
```bash
193-
conda activate agu24workshop
194-
jupyter lab
195-
```
186+
```bash
187+
conda activate agu24workshop
188+
jupyter lab
189+
```
196190

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

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

0 commit comments

Comments
 (0)