Skip to content

Getting started china workshop#2

Open
jakeymac wants to merge 4 commits intomainfrom
getting-started-china-workshop
Open

Getting started china workshop#2
jakeymac wants to merge 4 commits intomainfrom
getting-started-china-workshop

Conversation

@jakeymac
Copy link
Copy Markdown

@jakeymac jakeymac commented May 1, 2026

This merge request includes the full getting-started workshop.

@jakeymac jakeymac requested a review from swainn May 1, 2026 21:24
Copy link
Copy Markdown
Member

@swainn swainn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition to the other comments, please add as many links to the Tethys docs as you can. I want links for every gizmo, map layout, templating, recipes, etc. referenced throughout the workshop: "To learn more about the MapView Gizmo, see: ".

See comments for other feedback.

To test your newly scaffolded app, install it by running the following commands:

```bash
cd tethysdev/tethysapp-earthquake_calculator
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
cd tethysdev/tethysapp-earthquake_calculator
cd ~/tethysdev/tethysapp-earthquake_calculator

tethys start
```

Now, go to [localhost:8000](http://localhost:8000) to view your app in your browser.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Now, go to [localhost:8000](http://localhost:8000) to view your app in your browser.
Now, go to [localhost:8000](http://localhost:8000) to view your app in your browser.
If prompted to login, use the default username and password:
username: admin
password: pass


To set the image that shows up for your app in the Tethys library and next to the app name, first add that image to the `public/images` directory inside your app files.

Here is an example image to use: [Download Example App Icon](/img/getting-started/earthquake-app-icon.png)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Here is an example image to use: [Download Example App Icon](/img/getting-started/earthquake-app-icon.png)
Here is an example image to use: [Download Example App Icon](/img/getting-started/earthquake-app-icon.png) Save the image as `earthquake-app-icon.png` in the `public/images` directory of the app.

To change the accent color used throughout your app, change the color to any hexcode color you'd like:

```python
color='#0E4F57'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
color='#0E4F57'
color = '#0E4F57'

color='#0E4F57'
```

After making these changes, just reload your app and you'll see them reflected in the browser inside your app.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
After making these changes, just reload your app and you'll see them reflected in the browser inside your app.
After making these changes, the development server should reload and then you can reload the page to the changes reflected in the browser.

Begin by adding the `compose_layers` method to your MapLayout controller class in `controllers.py`:

```python {5-30}
@controller(name="view_all_earthquakes", url="view_all_earthquakes", app_workspace=True)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use dashes instead of underscores for URLs:

Suggested change
@controller(name="view_all_earthquakes", url="view_all_earthquakes", app_workspace=True)
@controller(name="view_all_earthquakes", url="view-all-earthquakes", app_workspace=True)

Begin by updating your MapLayout class:

```python {11-12}
@controller(name="view_all_earthquakes", url="view_all_earthquakes", app_workspace=True)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@controller(name="view_all_earthquakes", url="view_all_earthquakes", app_workspace=True)
@controller(name="view_all_earthquakes", url="view-all-earthquakes", app_workspace=True)

```python {1,7-84}
import numpy as np

@controller(name="view_all_earthquakes", url="view_all_earthquakes", app_workspace=True)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@controller(name="view_all_earthquakes", url="view_all_earthquakes", app_workspace=True)
@controller(name="view_all_earthquakes", url="view-all-earthquakes", app_workspace=True)

- Wire up forms and custom settings
- Perform calculations
- Visualize the results with both interactive maps and plots.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's get the solution posted on Tethys Platform GitHub and put a link to it at the end of the workshop tutorial (hereish).

- Perform calculations
- Visualize the results with both interactive maps and plots.

For more information and tutorials like this one on how to build Tethys web applications, checkout the [Tethys Platform documentation](https://docs.tethysplatform.org/)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a "Next Steps" section with links to relevant tutorials they can do next.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants