diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 000000000..0acaa5beb --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,47 @@ +# This file was created automatically with `myst init --gh-pages` 🪄 💚 +# Ensure your GitHub Pages settings for this repository are set to deploy with **GitHub Actions**. + +name: MyST GitHub Pages Deploy +on: + push: + # Runs on pushes targeting the default branch + branches: [main] +env: + # `BASE_URL` determines the website is served from, including CSS & JS assets + # You may need to change this to `BASE_URL: /${{ github.event.repository.name }}` + BASE_URL: '' # Not required for 'projectpythia-mystmd.github.io' domain. Other repos will need to set this! + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: 'pages' + cancel-in-progress: false +jobs: + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Setup Pages + uses: actions/configure-pages@v3 + - uses: actions/setup-node@v4 + with: + node-version: 18.x + - name: Install MyST Markdown + run: npm install -g mystmd + - name: Build HTML Assets + run: myst build --html + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: './_build/html' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/.github/workflows/publish-site.yaml b/.github/workflows/publish-site.yaml deleted file mode 100644 index b2bcec231..000000000 --- a/.github/workflows/publish-site.yaml +++ /dev/null @@ -1,51 +0,0 @@ -name: publish-site - -on: - # Trigger the workflow on push to main branch - push: - branches: - - main - workflow_dispatch: - schedule: - - cron: '0 0 * * 1' # Weekly on Monday - -jobs: - automate-metrics: - runs-on: macos-latest - steps: - - uses: actions/checkout@v3 - - name: Automate Metrics - env: - PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} - PRIVATE_KEY_ID: ${{ secrets.PRIVATE_KEY_ID }} - run: | - python -m venv analytics-api - source analytics-api/bin/activate - pip install google-analytics-data cartopy matplotlib - - python .github/workflows/get-metrics.py - python .github/workflows/write-metrics-md.py - - name: Upload zip - uses: actions/upload-artifact@v4 - with: - name: repo-zip - path: . - - build: - needs: automate-metrics - uses: ProjectPythia/cookbook-actions/.github/workflows/build-book.yaml@main - with: - environment_file: 'environment.yml' - environment_name: pythia - path_to_notebooks: 'portal' - build_command: 'make -j4 html' - build_from_code_artifact: 'true' - code_artifact_name: 'repo-zip' - workflow: '' - workflow_conclusion: '' - deploy: - needs: build - uses: ProjectPythia/cookbook-actions/.github/workflows/deploy-book.yaml@main - with: - cname: projectpythia.org - publish_dir: 'portal/_build/html' diff --git a/README.md b/README.md index 7ccb40f66..7c92c5150 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,6 @@ [![nightly-build](https://github.com/ProjectPythia/projectpythia.github.io/actions/workflows/nightly-build.yaml/badge.svg)](https://github.com/ProjectPythia/projectpythia.github.io/actions/workflows/nightly-build.yaml) This is the source repository for the [Project Pythia portal](https://projectpythia.org). -The portal site is built with [sphinx](https://www.sphinx-doc.org/). +The portal site is built with [MyST-MD](https://mystmd.org/). Information on contributing is available [here](CONTRIBUTING.md) diff --git a/myst.yml b/myst.yml new file mode 100644 index 000000000..3f368b72c --- /dev/null +++ b/myst.yml @@ -0,0 +1,34 @@ +# See docs at: https://mystmd.org/guide/frontmatter +version: 1 +extends: + - https://raw.githubusercontent.com/projectpythia-mystmd/pythia-config/main/pythia.yml +project: + id: 770e49e5-344a-4c46-adaa-3afb060b2085 + # title: + # description: + keywords: [] + authors: [] + github: https://github.com/projectpythia-mystmd/projectpythia-mystmd.github.io + # bibliography: [] + + toc: + - file: portal/index.md + - file: portal/about.md + - file: portal/blog.md + - file: portal/contributing.md + - file: portal/cookbook-guide.md + - file: portal/metrics.md + - title: Posts + children: + - file: portal/posts/cookoff2023.md + - file: portal/posts/cookoff2024-savethedate.md + - file: portal/posts/cookoff2024-website.md + +site: + template: book-theme + actions: + - title: Learn More + url: https://mystmd.org/guide + domains: [] + options: + style: style.css diff --git a/portal/contributing.md b/portal/contributing.md index 7b1cfce8e..09a0baf51 100644 --- a/portal/contributing.md +++ b/portal/contributing.md @@ -1,6 +1,6 @@ # Project Pythia Contributor's Guide -```{Note} +```{note} This the top-level guide for Project Pythia and a great starting point for getting involved! We also have specific guides for @@ -143,7 +143,7 @@ command line tool for collaborative software version control, while GitHub is an online, web-accessible service that greatly simplifies using the powerful, yet often complex, Git. -```{Note} +```{note} GitHub operates entirely within a web browser. You do not need to install anything, but you will need to set up a free GitHub account. Git is a command line tool that is most likely already @@ -225,7 +225,7 @@ you wish to use it. Consult the repo-specific contributor’s guide for information on “Building the site”, and follow the steps described therein. -```{Note} +```{note} Repository-specific contributor's information can always be accessed by navigating your web browser to the appropriate Project Pythia GitHub repository, @@ -326,7 +326,7 @@ on this later. For further information see the [GitHub docs on forking a repo](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo). -```{Note} +```{note} At this point you should have a local copy of the repository in your current working directory. You can safely make changes to any of the contents. Once you are ready to contribute your changes @@ -390,7 +390,7 @@ $ git commit PATH_TO_NEW_FILE Which will prompt you for a log message. Please provide something informative. If you make lots of changes, it is best to make multiple commits, broken up into related chunks. E.g. “fixed x”, “added documentation”, “added testing”. -```{Note} +```{note} When executing `git commit` after `git add PATH_TO_NEW_FILE`, specifying the path to the new file isn't stricly necessary. However, in other instances the file path argument is required. We include it @@ -411,7 +411,7 @@ $ git status after your `commit` to verify everything looks as expected. -```{Note} +```{note} `pre-commit` _hooks_ can sometimes be difficult to satisfy. You can always tell **git** not to run the _hook_ by running `git commit --no-verify`. diff --git a/portal/cookbook-guide.md b/portal/cookbook-guide.md index f0f239625..85a6d36c2 100644 --- a/portal/cookbook-guide.md +++ b/portal/cookbook-guide.md @@ -10,7 +10,7 @@ The following is a step-by-step guide to creating a new Cookbook and getting it Before you begin, ask yourself if the content you are developing for a cookbook would be better suited as an addition to an existing cookbook. The best place to discuss cookbook ideas is the [Project Pythia category of the Pangeo Discourse](https://discourse.pangeo.io/c/education/project-pythia/60). -```{Note} +```{note} These instructions assume that your goal is to contribute a new Cookbook to the community-maintained collection housed on the [Pythia Cookbook Gallery](https://cookbooks.projectpythia.org). Using the Pythia Cookbook template to create reproducible documents housed elsewhere is definitely possible! But we don't focus on that use case in this guide. @@ -39,7 +39,7 @@ Before developing your cookbook, you should consider how it will access the data Your cookbook is now ready to have content added! -```{Note} +```{note} In the rest of this guide, we assume that you are familiar with the basics of using git and GitHub. If not, we strongly recommend reading through our [GitHub tutorials in Foundations](https://foundations.projectpythia.org/foundations/getting-started-github.html). ``` @@ -54,7 +54,7 @@ However, we recommend transfering to the Pythia organization early, for a few re - Easier to get help from the Pythia infrastructure team - Encourages collaboration -```{Note} +```{note} You're still in control! You will always retain write access to your Cookbook repository even after transfering ownership to the Pythia organization. Also, _don't worry about breaking anything!_ Your repo will not affect any other Project Pythia content until you initiate the request to list it on the [Cookbook Gallery](https://cookbooks.projectpythia.org) (see below...) @@ -99,7 +99,7 @@ Your repository includes automation for building and publishing your Cookbook, p In each of these files, in the field called `environment_name:`, replace `cookbook-dev` with the name you used in your `environment.yml` file (probably `-dev`). Commit these changes. -```{Note} +```{note} If these workflow files look mysterious and you don't know anything about how GitHub Actions work, don't worry! The Pythia team will help with any problems that arise with the Cookbook automation. ``` @@ -167,7 +167,7 @@ Here's a handy trick for finding your published book: The link to your published book will then be displayed on the home page of the repo. -```{Note} +```{note} If you have transfered your repository to the ProjectPythia organization and also made a personal fork, the publishing pipeline automation will _only run on the upstream fork on the ProjectPythia organization_ so there's only one copy of the "published" book. It's possible to enable the workflows on your personal fork, but usually unneccesary if you preview your work via Pull Requests (see next section)! @@ -187,7 +187,7 @@ Not satisfied? Keep making changes! Every new push to the feature branch on your ### Building on the Pythia Binder -```{Note} +```{note} By default, notebooks are executed on the free GitHub Actions service. This works fine for most lightweight Cookbooks. If your book is building and publishing succesfully, you can safely ignore this section! ``` @@ -200,7 +200,7 @@ Here's how: - That will trigger a build and preview as usual, but the notebook execution will happen on the Binder. - If all is well, merge the changes, and all further builds will work this way. -```{Note} +```{note} The Binder uses your `environment.yml` file to create an image of an execution environment, which is stored for reuse. The time to execute your notebooks can vary, depending on whether the Binder needs to build a new image or not. ``` @@ -208,7 +208,7 @@ The Binder uses your `environment.yml` file to create an image of an execution e Once you're happy with your content and your Cookbook is building and deploying properly, it's time to think about submiting it for inclusion in the [Cookbook Gallery](https://cookbooks.projectpythia.org/)! -```{Note} +```{note} Cookbooks don't need to be "finished" in order to accepted in the Gallery! Cookbooks are typically accepted so long as they run cleanly, are free of obvious errors, and have some relevant new content. Cookbooks are meant to be living documents. We encourage authors to open GitHub issues to track progress on adding and updating content. @@ -231,7 +231,7 @@ Edit `CITATION.cff` as follows: - ORCID and other metadata for each author is optional but helpful - Under the `name:` field, change "Cookbook Template contributors" to "[Your Cookbook Name] contributors" -```{Note} +```{note} GitHub automatically tracks all contributions to your repository. The folks who help with infrastructure fixes, content reviews, etc., are considered "contributors" but not primary authors. We include the "contributors" as a single group in `CITATION.cff` to acknowledge this! ``` diff --git a/portal/index.md b/portal/index.md index b9a09d9cc..1e5a468f2 100644 --- a/portal/index.md +++ b/portal/index.md @@ -1,47 +1,55 @@ -# Project Pythia +--- +site: + hide_outline: true + hide_toc: true + hide_title_block: true +--- + ++++ {"kind": "split-image"} + +## Project Pythia -:::{banner} -:color: rgba(26, 100, 143, 0.9) -:image: _static/images/backgrounds/pexels-jeff-stapleton-5792818.jpg +:::{image} _static/images/backgrounds/pexels-jeff-stapleton-5792818.jpg :caption: Photo by Jeff Stapleton from Pexels -:class: dark-banner ::: -An education and training hub for the geoscientific Python community +An education and training hub for the geoscientific Python community + +Project Pythia is hosting a Cookbook Cook-Off June 11-14, 2024. {button}`Cookbook Cook-Off` + +Donate to support Project Pythia! +{button}`Donate now` + ++++ { "kind": "justified"} - - Project Pythia is hosting a Cookbook Cook-Off June 11-14, 2024.
- Learn more here. -
+## What is Project Pythia? -[Project Pythia](about) is the education working group for [Pangeo](https://pangeo.io) +{button}`Learn More →<./about.md>` + +{button}`About Pangeo →` + +[Project Pythia](./about.md) is the education working group for [Pangeo](https://pangeo.io) and is an educational resource for the entire geoscience community. Together these initiatives are helping geoscientists make sense of huge volumes of numerical scientific data using tools that facilitate open, reproducible science, and building an inclusive [community of practice](https://en.wikipedia.org/wiki/Community_of_practice) around these goals. -Project Pythia is a home for Python-centered learning resources that are _open-source_, +Project Pythia is a home for Python-justified learning resources that are _open-source_, _community-owned_, _geoscience-focused_, and _high-quality_. - - - About Project Pythia - -
- - About Pangeo logo - Pangeo - -
- ++++ { "kind": "justified"} ## Start Learning Project Pythia has several resources for you to use to start learning how to use Python and the technology in the Python ecosystem for the geosciences. -### The Foundations Book +::::{grid} 1 2 2 3 +:::{card} +:url: https://foundations.projectpythia.org +:header: The Foundations Book +:footer: Visit the Foundations Book » The [Pythia Foundations Book](https://foundations.projectpythia.org) is a [Jupyter Book](https://jupyterbook.org/) developed by the Pythia community to @@ -49,24 +57,20 @@ act as a **comprehensive set of tutorials** covering the **foundational skills** everyone needs to get started with **computing in the open-source Python ecosystem**. These foundational tutorials will serve as common references for more advanced and domain-specific content to be housed here in the Pythia Portal. +::: - - - Read the Pythia Foundations Book - - - -### Pythia Cookbooks +:::{card} +:url: https://cookbooks.projectpythia.org +:header: Pythia Cookbooks +:footer: Visit Pythia Cookbooks » Pythia Cookbooks are collections of more advanced and domain-specific example workflows building on top of Pythia Foundations. +::: - - - Visit Pythia Cookbooks - - - -### The Resource Gallery +:::{card} +:url: ./resource-gallery.md +:header: The Resource Gallery +:footer: Visit the Resource Gallery » There is a wealth of educational resources out there on the internet for learning Python and how to use it in the geosciences! We have attempted to gather together @@ -74,14 +78,12 @@ a curated and filterable list of these resources (including Pythia's own content into our [Pythia Resource Gallery](/resource-gallery). Click the link below to see a hand-picked selection of resources for learning at your own pace. +::: - - - Visit the Pythia Resource Gallery - - - -### Webinar Tutorial Series +:::{card} +:url: https://ncar-xdev.github.io/status/tutorials.html +:header: Webinar Tutorial Series +:footer: Visit the Pythia Webinar Tutorial Series » The [Pythia Webinar Tutorial Series](https://ncar-xdev.github.io/status/tutorials.html) is hosted regularly by the Project Pythia team. Anyone can join these hour-long, instructor-led interactive tutorials. Participants can @@ -90,81 +92,30 @@ the instructor. Each seminar is recorded for later viewing on the [Project Pythia YouTube channel](https://www.youtube.com/channel/UCoZPBqJal5uKpO8ZiwzavCw). Click the link below to view past and upcoming seminars, covering a range of topics from beginning to advanced. +::: - - - Visit the Pythia Webinar Tutorial Series - - - -### Pythia Data Collection +:::{card} +:url: https://github.com/ProjectPythia/pythia-datasets +:header: Pythia Data Collection +:footer: Visit the Pythia Data Repository » Looking for a free, public domain geoscience data set that you can use to sharpen your skills while learning the Scientific Python Ecosystem? All of the example data used by the [Pythia Foundations Book](https://foundations.projectpythia.org) are freely accessible. +::: +:::: - - - Visit the Pythia Data Repository - - - - ++++ { "kind": "justified"} ## Join us! +{button}`Go to Pangeo Discourse` + If you have questions or want to share anything with the Project Pythia Team, please reach out to us through the [Project Pythia category on the Pangeo Discourse forum](https://discourse.pangeo.io/c/education/project-pythia/) or join us at any of our [Monthly Project Meetings](#monthly-pythia-meetings). - - - Go to Pangeo Discourse - - - ### Contributing Anyone can contribute to and participate in Project Pythia! @@ -174,20 +125,6 @@ Please see our [Contributor’s Guide](/contributing) for details on how you can get involved, and come see our work in the [ProjectPythia GitHub Organization](https://github.com/ProjectPythia). - - ### Monthly Pythia Meetings Project Pythia holds regular public meetings via Zoom as scheduled on the calendar below. @@ -200,11 +137,10 @@ We publish all notes and agendas of our [Community Meetings](https://docs.google.com/document/d/e/2PACX-1vQWQrgHs_G5XyNH5GTFYydH_woUZcyZibdxPUWLpqFUYs20WM93kdx5onwOaizC_3-tfnbreMNQbYAp/pub) and [Outreach Meetings](https://docs.google.com/document/d/e/2PACX-1vQBAt5B24wig2eh-hxHzgJiXjKCpSeGKsw3PFizZjwH7ka71dagipKwCwQvmE-obmSOfR4Psj2lgbvU/pub). -### Meeting & Event Calendar +:::{iframe} https://calendar.google.com/calendar/embed?src=c_4qpvf316afd9mv0ci7d2uiafog%40group.calendar.google.com +::: -
- -
++++ { "kind": "justified"} ## How to Cite @@ -212,21 +148,6 @@ The material in Project Pythia is licensed for free and open consumption and reu To cite this project, please site our [NSF GEO OSE proposal](https://zenodo.org/record/8184298). Individual components of the project may be cited separately. -> Rose, Brian E. J., Clyne, John, May, Ryan, Munroe, James, Snyder, Amelia, Eroglu, Orhan, & Tyle, Kevin. (2023). Collaborative Research: GEO OSE TRACK 2: Project Pythia and Pangeo: Building an inclusive geoscience community through accessible, reusable, and reproducible workflows. Zenodo. https://doi.org/10.5281/zenodo.8184298 +> Rose, Brian E. J., Clyne, John, May, Ryan, Munroe, James, Snyder, Amelia, Eroglu, Orhan, & Tyle, Kevin. (2023). Collaborative Research: GEO OSE TRACK 2: Project Pythia and Pangeo: Building an inclusive geoscience community through accessible, reusable, and reproducible workflows. Zenodo. https://doi.org/10.5281/zenodo.8184298 [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.8184298.svg)](https://doi.org/10.5281/zenodo.8184298) - - -```{toctree} ---- -hidden: True -maxdepth: 1 ---- -about.md -contributing.md -cookbook-guide.md -code_of_conduct.md -resource-gallery.md -blog.md -metrics.md -``` diff --git a/style.css b/style.css new file mode 100644 index 000000000..e69de29bb