Skip to content
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
16 changes: 16 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: pre-commit

on:
push:
branches: [main]
pull_request:

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: pre-commit/action@v3.0.1
39 changes: 39 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: publish

on:
push:
branches: [main]
pull_request:
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages-${{ github.ref }}
cancel-in-progress: true

jobs:
render:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: quarto-dev/quarto-actions/setup@v2
- uses: quarto-dev/quarto-actions/render@v2
- uses: actions/upload-pages-artifact@v3
with:
path: _site

deploy:
# only deploy from main; on pull requests the render job checks the site builds
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
needs: render
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
_site/
.quarto/

/.quarto/
**/*.quarto_ipynb
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-merge-conflict
30 changes: 29 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,30 @@
# mlwp-tools.github.io
Website for the mlwp-tools organisation (https://mlwp-tools.github.io)

Source for the mlwp-tools website, https://mlwp-tools.github.io. The site is built with [Quarto](https://quarto.org) from the markdown files in this repository, and deployed to GitHub Pages by the `publish` workflow on every push to `main`.

## Adding or editing a page

1. Create a branch and add a markdown file at the repository root, e.g. `my-page.md`, starting with a front matter block that sets the page title:

```markdown
---
title: "My page"
---

Content goes here.
```

2. Link the page from the navbar by adding it under `website.navbar.left` in `_quarto.yml`.
3. Open a pull request. The `publish` workflow renders the site on the PR to check it builds, and deploys it once the PR is merged into `main`.

Small edits can also be made straight from the site through the "Edit this page" link on each page.

## Previewing locally

Install the [Quarto CLI](https://quarto.org/docs/get-started/) (or use `uvx --from quarto-cli quarto`), then run

```bash
quarto preview
```

which serves the site locally and re-renders on every change. `quarto render` builds the full site into `_site/`.
26 changes: 26 additions & 0 deletions _quarto.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
project:
type: website
output-dir: _site

website:
title: "mlwp-tools"
site-url: https://mlwp-tools.github.io
repo-url: https://github.com/mlwp-tools/mlwp-tools.github.io
repo-actions: [edit, issue]
navbar:
left:
- href: index.md
text: Home
- href: roadmap.md
text: Roadmap
right:
- icon: github
href: https://github.com/mlwp-tools
aria-label: mlwp-tools on GitHub

format:
html:
theme:
light: cosmo
dark: darkly
toc: true
19 changes: 19 additions & 0 deletions index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: "mlwp-tools"
subtitle: "Tools for machine-learning weather prediction"
toc: false
---

mlwp-tools is a collection of Python packages for working with machine-learning weather prediction (MLWP) data: defining dataset conventions, loading data into them, aligning datasets in space and time, and verifying forecasts.

## Packages

| Package | Description |
|---|---|
| [mlwp-data-specs](https://github.com/mlwp-tools/mlwp-data-specs) | Dataset specifications for MLWP applications for time, coordinate and uncertainty traits based on `xr.Dataset`s and CF Zarr |
| [mlwp-data-loaders](https://github.com/mlwp-tools/mlwp-data-loaders) | General-purpose data-loaders to create mlwp-data-spec conforming `xr.Dataset`s |
| [mxalign](https://github.com/mlwp-tools/mxalign) | xarray-based space/time/uncertainty-alignment for meteorological datasets |
| [mlwp-harp-writer](https://github.com/mlwp-tools/mlwp-harp-writer) | Write mxalign-aligned, mlwp-data-specs conforming datasets to HARP parquet datasets |
| [mlwp-scorecard](https://github.com/mlwp-tools/mlwp-scorecard) | Easy weather model scorecard creation in Python |

See the [roadmap](roadmap.md) for where the project is heading.
5 changes: 5 additions & 0 deletions roadmap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: "Roadmap"
---

The roadmap is coming soon.
Loading