Skip to content

update contributing guides #536

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 6 additions & 32 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Pythia Portal contributor's guide
# Contributing to the Project Pythia Portal

This document contains information specific to contributing to the
Project Pythia Portal. Please first refer to [Pythia Contributor's
Guide](https://projectpythia.org/contributing.html) for overall
Project Pythia Portal. Please first refer to [Guide for Contributing to Project Pythia](https://projectpythia.org/contributing.html) for overall
contribution guidelines (such as detailed description of Project
Pythia structure, forking, repository cloning, branching, etc.).

Expand All @@ -22,7 +21,7 @@ The post will automatically be recognized and displayed when you build the porta

## Instructions for building the portal site

The portal site is built with [Sphinx](https://www.sphinx-doc.org/).
The portal site is built with [MyST-MD](https://mystmd.org/).

When testing new content it is important to build and view the site. Read the Docs automatically builds the site for you when each Pull Request is checked. However, you can also build it locally on your machine following the instructions
below.
Expand Down Expand Up @@ -70,28 +69,12 @@ _NOTE_: The `pre-commit` package is already installed via the `pythia` conda env
Build the site locally using Sphinx (which you just installed in the `pythia` environment, along with all necessary dependencies):

```bash
make html
myst start --execute
```

If this step fails and you have not updated your conda environment recently, try updating with `conda env update -f ../environment.yml` and `conda update --all` as described above.
If this step fails and you may not have updated your conda environment recently, try updating with `conda env update -f ../environment.yml` and `conda update --all` as described above.

The newly rendered site is now available in `portal/_build/html/index.html`.
Open with your web browser, or from the terminal:

```bash
open _build/html/index.html
`````

However, many of the links will not work. For all of the links
found in the portal to work properly, you'll need to set up a local
testing server. This can be done with Python's http.server by running
the following command from within the `portal` directory:

```bash
python -m http.server --directory _build/html/
```

and then pointing your browser at the URL: localhost:8000.
The newly rendered site is now available at [localhost:3000](http://localhost:3000). A link should appear in your terminal.

More information on setting up a local test server is available from [here](https://developer.mozilla.org/en-US/docs/Learn/Common_questions/set_up_a_local_testing_server)

Expand All @@ -108,15 +91,6 @@ conda activate pythia
conda update --all
```

### Preview the built site on Netlify

Once a pull request has passed all tests, including the `preview-site` check, the GitHub bot will post a comment with a preview link on the pull request. You can click on the link to launch a new tab with a build of the Project Pythia site.

![CI-check](/portal/_static/images/deploy-site-CI-check.png)

![Netlify Preview](/portal/_static/images/netlify-preview.png)


## Instructions for intacting with the Google Analytics API

### Setting up the Virtual Environment
Expand Down
30 changes: 30 additions & 0 deletions myst.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# See docs at: https://mystmd.org/guide/frontmatter
version: 1
extends:
- https://raw.githubusercontent.com/projectpythia/pythia-config/main/pythia.yml
project:
id: 770e49e5-344a-4c46-adaa-3afb060b2085
# title:
# description:
keywords: []
authors: []
github: https://github.com/projectpythia/projectpythia.github.io
# bibliography: []

toc:
- file: portal/index.md
- file: portal/about.md
- title: Blog
children:
- pattern: portal/posts/*.md
- file: portal/contributing.md
- file: portal/cookbook-guide.md
- file: portal/quick-cookbook-guide.md
- file: portal/metrics.md
site:
actions:
- title: Learn More
url: https://mystmd.org/guide
domains: []
options:
style: style.css
21 changes: 10 additions & 11 deletions portal/contributing.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Project Pythia Contributor's Guide
# Contributing to Project Pythia

```{note}
This the top-level guide for Project Pythia and a great starting point for getting involved!
Expand All @@ -10,16 +10,15 @@ and [contributing new Cookbooks](https://projectpythia.org/cookbook-guide.html).

## Overview

Welcome! This is the main contributors guide for Project Pythia.
Welcome! This is the main guide for contributing to Project Pythia.
Project Pythia is an open community, and all contributions are
welcome following our [Code of
Conduct](https://projectpythia.org/code_of_conduct.html). All
of the content for Project Pythia is hosted on GitHub in a number
of different public repositories. From this document you can learn
about the many ways that you can contribute to this community
project, and where you can find additional information. In many
cases pertinent details may be found in repository-specific
contributors guides **that should always be consulted in addition
cases pertinent details may be found in repository-specific guides **that should always be consulted in addition
to this guide**. More on this topic later.

## The many ways to contribute
Expand Down Expand Up @@ -72,7 +71,7 @@ is a collection of material that the Pythia team believes is essential
knowledge for geoscientists to effectively use the Scientific Python
Ecosystem. The Pythia Foundations content is hosted on a separate
[GitHub repo](https://github.com/ProjectPythia/pythia-foundations),
and contributors should consult the contributor’s guide there for
and contributors should consult the [Contributing to Foundations](https://foundations.projectpythia.org/appendix/how-to-contribute) guide there for
information specific to Foundations. However, adding new, or changing
existing Foundations content requires contributors to be familiar
with a few technologies and workflows, described in Advanced
Expand All @@ -88,7 +87,7 @@ specific problem. Typically, a cookbook references material presented
elsewhere in Project Pythia, such as [Pythia Foundations](https://foundations.projectpythia.org).
Each Cookbook is hosted in a separate GitHub repo under the umbrella [Project Pythia
organization](https://github.com/ProjectPythia).
Contributors should consult the [Cookbook-specific Contributor's guide](/cookbook-guide).
Contributors should consult the [Contributing a New Cookbook](/cookbook-guide) guide.

### Pythia Portal

Expand All @@ -114,10 +113,10 @@ process of setting up GitHub/Git, installing and configuring conda,
and submitting a PR. Note, while this information is common to all
Pythia repositories, repo-specific information might be required.

In all cases contributors should consult the repo-specific contributor’s
In all cases contributors should consult the repo-specific contribution
guide for their target repository.

Repo-specific guides can be found in the file named `CONTRIBUTING.md`, located in the top level directory of each repository, or by clicking on the menu item labeled “Contributor’s Guide” found in the rendered content generated by each repository.
Repo-specific guides can be found in the file named `CONTRIBUTING.md`, located in the top level directory of most repositories, or by clicking on the appropriately named menu item on each site. Note that the "Contributing a new Cookbook" guide is found in the Pythia portal (rather than in any one specific Cookbook).

Lastly, much of this information has been co-opted from the [GeoCAT project](https://geocat.ucar.edu).

Expand Down Expand Up @@ -221,12 +220,12 @@ desktop or laptop. Before using your conda environment to work on
Pythia content, you'll need to perform an addtional one-time setup
that is specific to each Pythia repo. After the one-time configuration is
complete you will need to "activate" a repo-specific environment whenever
you wish to use it. Consult the repo-specific contributor’s guide
you wish to use it. Consult the repo-specific contribution guide
for information on “Building the site”, and
follow the steps described therein.

```{note}
Repository-specific contributor's
Repository-specific contribution
information can always be accessed by navigating your web browser
to the appropriate Project Pythia GitHub repository,
[here](https://github.com/ProjectPythia/pythia-foundations) for
Expand Down Expand Up @@ -337,7 +336,7 @@ back to the Pythia repository you will need to submit a Pull Request
### Make your local changes

At this point you should be able to make your desired changes to
the local copies of your files. **Always consult the repo-specific contributor’s
the local copies of your files. **Always consult the repo-specific contribution
guide for information specific to the repo you are working on.**

### Submit a Pull Request (PR)
Expand Down
Loading