Skip to content

Commit

Permalink
Merge branch 'main' into eqctier3-69d9894d-7a38-4654-a1f2-9faa25805725
Browse files Browse the repository at this point in the history
  • Loading branch information
malmans2 committed Oct 22, 2024
2 parents 602dfcd + f1a67ea commit 5f07784
Show file tree
Hide file tree
Showing 38 changed files with 3,553 additions and 663 deletions.
1 change: 1 addition & 0 deletions .github/workflows/deploy-book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
workflow_dispatch:

env:
PRE_BUILD_DIR: "_pre_build"
Expand Down
29 changes: 24 additions & 5 deletions .github/workflows/on-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,36 @@ jobs:
permissions:
contents: write
pull-requests: write
needs: pre-commit
steps:
- uses: actions/checkout@v4
- run: git fetch origin gh-pages
- uses: actions/setup-python@v5
with:
python-version: '3.x'
cache: 'pip'
- uses: actions/checkout@v4
- name: Get changed notebooks
id: changed-files
uses: tj-actions/changed-files@v45
with:
files: |
**.ipynb
- name: Remove untouched notebooks
id: remove-untouched-notebooks
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |-
for file in ${ALL_CHANGED_FILES}; do
mv "$file" "$file".keep
done
find . -type f -name "*.ipynb" -not -path "./templates/*" -exec rm -f {} +
for file in ${ALL_CHANGED_FILES}; do
mv "$file".keep "$file"
done
- run: pip install -r requirements.txt
- run: make build-book PRE_BUILD_DIR=${{ env.PRE_BUILD_DIR }} PRE_BUILD_FLAGS=${{ env.PRE_BUILD_FLAGS }}
- uses: rossjrw/pr-preview-action@v1
if: steps.changed-files.outputs.any_changed == 'true'
with:
source-dir: "${{ env.PRE_BUILD_DIR }}/_build/html"

Expand Down Expand Up @@ -97,16 +116,16 @@ jobs:
previews+="</ul>"
echo "previews=$previews" >>"$GITHUB_OUTPUT"
- name: Comment PR with permalinks
uses: thollander/actions-comment-pull-request@v2
uses: thollander/actions-comment-pull-request@v3
with:
message: |
**Permalinks:**
${{ steps.build-urls.outputs.permalinks }}
comment_tag: permalinks
comment-tag: permalinks
- name: Comment PR with previews
uses: thollander/actions-comment-pull-request@v2
uses: thollander/actions-comment-pull-request@v3
with:
message: |
**Previews:**
${{ steps.build-urls.outputs.previews }}
comment_tag: previews
comment-tag: previews
26 changes: 22 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-yaml
- id: check-toml
- id: check-merge-conflict
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.1
rev: v0.6.9
hooks:
- id: ruff
args: [--fix, --show-fixes]
types_or: [python, pyi]
- id: ruff-format
types_or: [python, pyi]
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.13.0
rev: v2.14.0
hooks:
- id: pretty-format-yaml
args: [--autofix, --preserve-quotes]
- id: pretty-format-toml
args: [--autofix]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.1
rev: v1.11.2
hooks:
- id: mypy
args: [--strict, --ignore-missing-imports]
Expand All @@ -31,6 +33,22 @@ repos:
language: python
types: [jupyter]
exclude: ^templates/
- repo: local
hooks:
- id: fix-markdown-strings
name: fix-markdown-strings
entry: python scripts/fix-markdown-strings.py
language: python
types: [jupyter]
additional_dependencies: [nbformat]
- repo: local
hooks:
- id: validate-headings
name: validate-headings
entry: python scripts/validate-headings.py
language: python
types: [jupyter]
additional_dependencies: [nbformat]
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.17
hooks:
Expand Down
2 changes: 1 addition & 1 deletion Climate_Projections/CMIP6/CMIP6.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

The individual quality assessments produced by the EQC evaluators are listed and linked below.

## Available assessments
**Available assessments**

```{tableofcontents}
```
Loading

0 comments on commit 5f07784

Please sign in to comment.