Skip to content
Draft
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
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,9 @@ updates:
github-actions:
patterns:
- "*"
allow:
- dependency-type: all
labels:
- "tool: github actions"
commit-message:
prefix: "⬆️ "
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
environment: [test-py310, test-py314]
environment: [test-pyoldest, test-pylatest]
runs-on: ${{ matrix.os }}

steps:
Expand Down
71 changes: 71 additions & 0 deletions .github/workflows/docs-latest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: 📚 Latest documentation

on:
workflow_dispatch:
push:
branches:
- master

permissions:
contents: read

concurrency:
group: docs-latest
cancel-in-progress: true

jobs:
build:
name: Build documentation
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v7

- name: 🟨 Set up Pixi
uses: prefix-dev/setup-pixi@v0.10.1
with:
environments: docs

- name: 📝 Build docs
run: pixi run -e docs doc-build

- name: 📦 Upload documentation
uses: actions/upload-artifact@v7
with:
name: docs-html
path: docs/build/html
retention-days: 1

deploy:
name: Deploy latest documentation
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out repo
uses: actions/checkout@v7

- name: 📥 Download documentation
uses: actions/download-artifact@v8
with:
name: docs-html
path: docs/build/html

- name: Initialize GitHub Pages branch
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: docs/pages-root
clean: false
force: false
attempt-limit: 5

- name: 🚀 Deploy latest documentation
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: docs/build/html
target-folder: latest
force: false
attempt-limit: 5
80 changes: 80 additions & 0 deletions .github/workflows/docs-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: 📚 Documentation preview

on:
pull_request:
types:
- opened
- reopened
- synchronize
- closed

permissions:
contents: read

concurrency:
group: docs-preview-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
build:
name: Build documentation
if: github.event.action != 'closed'
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v7

- name: 🟨 Set up Pixi
uses: prefix-dev/setup-pixi@v0.10.1
with:
environments: docs

- name: 📝 Build docs
run: pixi run -e docs doc-build

- name: 📦 Upload documentation
uses: actions/upload-artifact@v7
with:
name: docs-html
path: docs/build/html
retention-days: 1

preview:
name: Deploy PR preview
needs: build
# Fork PRs are built above, but cannot safely write previews to this repository.
if: >-
always() &&
github.event.pull_request.head.repo.full_name == github.repository &&
(github.event.action == 'closed' || needs.build.result == 'success')
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Check out repo
uses: actions/checkout@v7

- name: 📥 Download documentation
if: github.event.action != 'closed'
uses: actions/download-artifact@v8
with:
name: docs-html
path: docs/build/html

- name: Initialize GitHub Pages branch
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: docs/pages-root
clean: false
force: false
attempt-limit: 5

- name: 🚀 Deploy documentation preview
uses: rossjrw/pr-preview-action@v1
with:
source-dir: docs/build/html
preview-branch: gh-pages
umbrella-dir: pr-preview
qr-code: false
74 changes: 74 additions & 0 deletions .github/workflows/docs-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: 📚 Versioned documentation

on:
release:
types:
- published

permissions:
contents: read

concurrency:
group: docs-release-${{ github.event.release.tag_name }}
cancel-in-progress: false

jobs:
build:
name: Build documentation
runs-on: ubuntu-latest
steps:
- name: Check out release tag
uses: actions/checkout@v7
with:
ref: ${{ github.event.release.tag_name }}

- name: 🟨 Set up Pixi
uses: prefix-dev/setup-pixi@v0.10.1
with:
environments: docs

- name: 📝 Build docs
run: pixi run -e docs doc-build

- name: 📦 Upload documentation
uses: actions/upload-artifact@v7
with:
name: docs-html
path: docs/build/html
retention-days: 1

deploy:
name: Deploy versioned documentation
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out release tag
uses: actions/checkout@v7
with:
ref: ${{ github.event.release.tag_name }}

- name: 📥 Download documentation
uses: actions/download-artifact@v8
with:
name: docs-html
path: docs/build/html

- name: Initialize GitHub Pages branch
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: docs/pages-root
clean: false
force: false
attempt-limit: 5

- name: 🚀 Deploy versioned documentation
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: docs/build/html
target-folder: versions/${{ github.event.release.tag_name }}
force: false
attempt-limit: 5
48 changes: 0 additions & 48 deletions .github/workflows/docs.yml

This file was deleted.

6 changes: 2 additions & 4 deletions .lefthook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ pre-commit:
stage_fixed: true
run: pixi {run} dprint {staged_files}

- name: taplo
- name: toml format
glob: "*.toml"
stage_fixed: true
run: pixi {run} taplo {staged_files}
run: pixi {run} toml-format {staged_files}

- name: ruff check
glob: "*.{py,pyi}"
Expand All @@ -43,8 +43,6 @@ pre-commit:

- name: pyrefly
glob: "*.{py,pyi}"
skip: # Skip until raysect/cherab-stubs are released
- run: test ${CI:-false} = true
run: pixi {run} pyrefly-check {staged_files}

- name: actionlint
Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,22 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.7.0] - 2026-08-28

### Added

- Add `UnstructGrid2D.plot_tri_mesh()` for plotting cell data on the triangulated mesh with Matplotlib's `tripcolor()`
- Add GitHub Pages workflows for pull request previews, versioned release documentation, and
continuously updated `master` branch documentation under `latest/`

### Changed

- Use explicit triangle face colors in the `plot_tri_mesh()` implementations of the 2D and 2D-extended unstructured grids

### Removed

- **Breaking:** Remove the redundant `UnstructGrid2D.plot_triangle_mesh()` method in favor of `plot_tri_mesh()`

## [0.6.0] - 2026-08-12

### Added
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
[codecov-badge]: https://img.shields.io/codecov/c/github/cherab/imas?token=05LZGWUUXA&style=flat-square&logo=codecov
[conda]: https://prefix.dev/channels/conda-forge/packages/cherab-imas
[conda-badge]: https://img.shields.io/conda/vn/conda-forge/cherab-imas?logo=conda-forge&style=flat-square
[docs]: https://github.com/cherab/imas/actions/workflows/docs.yml
[docs-badge]: https://img.shields.io/github/actions/workflow/status/cherab/imas/docs.yml?style=flat-square&logo=GitHub&label=Docs
[docs]: https://github.com/cherab/imas/actions/workflows/docs-latest.yml
[docs-badge]: https://img.shields.io/github/actions/workflow/status/cherab/imas/docs-latest.yml?style=flat-square&logo=GitHub&label=Docs
[license]: https://opensource.org/licenses/EUPL-1.1
[license-badge]: https://img.shields.io/badge/license-EUPL_1.1%20-blue?style=flat-square
[pixi-badge]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/prefix-dev/pixi/main/assets/badge/v0.json&style=flat-square
Expand Down
Loading
Loading