Skip to content

Commit

Permalink
Merge pull request #14 from ihmeuw/feature/climate-draws-run
Browse files Browse the repository at this point in the history
Feature/climate draws run
  • Loading branch information
collijk authored Dec 24, 2024
2 parents fc5983d + eedf09d commit c67e151
Show file tree
Hide file tree
Showing 31 changed files with 1,024 additions and 785 deletions.
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
name: Release
name: Build and Deploy Docs

on:
release:
types: [ published ]
workflow_dispatch:
push:
branches:
- main

jobs:
build-and-publish:
build-and-deploy-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GH_TOKEN }}
- uses: ./.github/actions/python-poetry-env
- name: Publish to pypi
run: |
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
poetry publish --build --no-interaction
- name: Deploy docs
run: poetry run mkdocs gh-deploy --force
57 changes: 0 additions & 57 deletions .github/workflows/draft_release.yml

This file was deleted.

62 changes: 0 additions & 62 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,62 +0,0 @@
# Climate Data

This package contains pipelines and utilities to systematically extract, format, and downscale
data from ERA5 climate models and CMIP6 climate forecasts.

## Developer Installation

Instructions using [`conda`](https://docs.anaconda.com/miniconda/):

1. Clone this repository.

Over ssh:
```sh
git clone [email protected]:ihmeuw/climate-data.git
```

Over https:
```sh
git clone https://github.com/ihmeuw/climate-data.git
```

2. Create a new conda environment.

```sh
conda create -n climate-data python=3.12
conda activate climate-data
```

3. Install `poetry` and the project dependencies.

```sh
pip install poetry
cd climate-data
poetry install
```

### Pre-commit

[`pre-commit`](https://pre-commit.com/) hooks run all the auto-formatting (`ruff format`),
linters (e.g. `ruff` and `mypy`), and other quality checks to make sure the changeset is
in good shape before a commit/push happens.

You can install the hooks with (runs for each commit):

```sh
pre-commit install
```

Or if you want them to run only for each push:

```sh
pre-commit install -t pre-push
```

Or if you want e.g. want to run all checks manually for all files:

```sh
poetry run pre-commit run --all-files
```

`pre-commit` is configured in the `.pre-commit-config.yaml` file in the repository root.
All auto-formatting, linting, and other tooling is configured in the `pyproject.toml` file.
62 changes: 62 additions & 0 deletions docs/installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Climate Data Pipeline Installation

This package contains pipelines and utilities to systematically extract, format, and downscale
data from ERA5 climate models and CMIP6 climate forecasts.

## Developer Installation

Instructions using [`conda`](https://docs.anaconda.com/miniconda/):

1. Clone this repository.

Over ssh:
```sh
git clone [email protected]:ihmeuw/climate-data.git
```

Over https:
```sh
git clone https://github.com/ihmeuw/climate-data.git
```

2. Create a new conda environment.

```sh
conda create -n climate-data python=3.12
conda activate climate-data
```

3. Install `poetry` and the project dependencies.

```sh
pip install poetry
cd climate-data
poetry install
```

### Pre-commit

[`pre-commit`](https://pre-commit.com/) hooks run all the auto-formatting (`ruff format`),
linters (e.g. `ruff` and `mypy`), and other quality checks to make sure the changeset is
in good shape before a commit/push happens.

You can install the hooks with (runs for each commit):

```sh
pre-commit install
```

Or if you want them to run only for each push:

```sh
pre-commit install -t pre-push
```

Or if you want e.g. want to run all checks manually for all files:

```sh
poetry run pre-commit run --all-files
```

`pre-commit` is configured in the `.pre-commit-config.yaml` file in the repository root.
All auto-formatting, linting, and other tooling is configured in the `pyproject.toml` file.
12 changes: 11 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ theme:
name: Switch to light mode

nav:
- Introduction: 'index.md'
- Home: index.md
- Installation: 'installation.md'
# defer to gen-files + literate-nav
- Code Reference: reference/

watch:
- src/climate_data
Expand Down Expand Up @@ -59,6 +62,13 @@ markdown_extensions:
plugins:
- table-reader
- search
- gen-files:
scripts:
- scripts/gen_ref_pages.py
- scripts/gen_data_pages.py
- literate-nav:
nav_file: SUMMARY.md
- section-index
- mkdocstrings:
default_handler: python
handlers:
Expand Down
Loading

0 comments on commit c67e151

Please sign in to comment.