Skip to content

Commit

Permalink
Merge pull request #87 from ken-lauer/enh_plot
Browse files Browse the repository at this point in the history
ENH: matplotlib and bokeh plotting tools
  • Loading branch information
ChristopherMayes authored Aug 22, 2024
2 parents 571ffb4 + 9e43973 commit 32670ae
Show file tree
Hide file tree
Showing 76 changed files with 15,474 additions and 3,795 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@

name: Publish Documentation

on:
push:
branches:
- '**'
- "**"

jobs:
deploy:
Expand All @@ -27,15 +26,18 @@ jobs:
shell: bash -l {0}
run: |
mamba list
- name: Execute notebooks
shell: bash -l {0}
run: |
bash scripts/execute_notebooks.bash
- name: Build Docs
shell: bash -l {0}
run: |
mkdocs build
zip -r pytao-examples.zip docs/examples/
mv pytao-examples.zip ./site/assets/.
mv pytao-examples.zip ./site/assets/
- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site/
publish_dir: ./site/
8 changes: 8 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ jobs:
with:
fetch-depth: 1

- uses: conda-incubator/setup-miniconda@v3
with:
python-version: 3.12
mamba-version: "*"
channels: conda-forge
activate-environment: pytao-dev
environment-file: dev-environment.yml

- name: Install pre-commit
run: python -m pip install pre-commit

Expand Down
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,10 @@ ENV/
*.swp

pytao/_version.py
pytao/tests/artifacts
docs/examples/alpha*.html
docs/examples/beta*.html
docs/examples/beta*.png
docs/examples/fodo10.bmad
docs/examples/markers.bmad
docs/examples/wake.dat
12 changes: 11 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ repos:
args: ["--maxkb=100000"]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.0
rev: v0.6.1
hooks:
- id: ruff
args: ["--config", "pyproject.toml"]
Expand All @@ -41,3 +41,13 @@ repos:
args: ["--config", "pyproject.toml"]
types_or: [python]
exclude: "^(pytao/_version.py)$"

- repo: local
hooks:
- id: jupyter-notebook-clear-output
name: jupyter-notebook-jupyter-clear
files: \.ipynb$
stages: [commit]
language: system
entry: jupyter nbconvert --ClearOutputPreprocessor.enabled=True --inplace
# exclude: "^.*().ipynb$"
3 changes: 2 additions & 1 deletion dev-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ dependencies:
- python >=3.9
- openPMD-beamphysics
- numpydoc
- bmad >=20240628.2
- bmad >=20240809
- bokeh
- jupyterlab>3
- ipywidgets
- matplotlib
- numpy
- h5py
- pexpect
- pydantic >=2
# Developer
- pygments
- pytest
Expand Down
1 change: 1 addition & 0 deletions docs/api/plot-bokeh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: pytao.plotting.bokeh
1 change: 1 addition & 0 deletions docs/api/plot-mpl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: pytao.plotting.mpl
5 changes: 5 additions & 0 deletions docs/api/plot.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
::: pytao.plotting.plot
::: pytao.plotting.curves
::: pytao.plotting.fields
::: pytao.plotting.pgplot
::: pytao.plotting.settings
1 change: 1 addition & 0 deletions docs/api/subprocesstao.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: pytao.SubprocessTao
File renamed without changes.
691 changes: 451 additions & 240 deletions docs/examples/advanced.ipynb

Large diffs are not rendered by default.

1,150 changes: 340 additions & 810 deletions docs/examples/basic.ipynb

Large diffs are not rendered by default.

Loading

0 comments on commit 32670ae

Please sign in to comment.