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
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,11 @@ __pycache__/
/build/
*.egg-info/

# jupyter
*.ipynb_checkpoints/

# Sphinx documentation
docs/_build/

# OSX
.DS_Store
16 changes: 16 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ repos:
# Run the formatter.
- id: ruff-format

- repo: https://github.com/kynan/nbstripout
rev: 0.9.0
hooks:
- id: nbstripout

- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
hooks:
Expand All @@ -46,3 +51,14 @@ repos:
- id: mdformat
additional_dependencies:
- mdformat-myst

- repo: https://github.com/nbQA-dev/nbQA
rev: 1.9.1
hooks:
- id: nbqa-ruff
args: ["--nbqa-shell"]
additional_dependencies: [ruff, jupytext]
- id: nbqa-pyupgrade
args: ["--py37-plus"]
- id: nbqa-isort
args: ["--float-to-top"]
6 changes: 5 additions & 1 deletion dev-environment.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ shapely
tqdm
xarray

# Development
jupyterlab

# Building
setuptools >=60

Expand All @@ -25,8 +28,9 @@ mypy
pre-commit

# Documentation
sphinx
myst-nb
nbqa
sphinx
sphinx-book-theme
sphinx-copybutton
sphinx-remove-toctrees
9 changes: 9 additions & 0 deletions docs/_static/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/* Center images produced by notebook outputs */
.jp-OutputArea-output img,
.output_area img,
.cell_output img,
.nb-output img {
display: block;
margin-left: auto;
margin-right: auto;
}
2 changes: 2 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ def setup(app):

templates_path = ["_templates"]

html_static_path = ["_static"]
html_css_files = ["custom.css"]
exclude_patterns = ["_build", ".DS_Store"]

intersphinx_mapping = {
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,15 @@ docs = [
# building documentation
"sphinx",
"myst-nb",
"nbqa",
"sphinx-book-theme",
"sphinx-copybutton",
"sphinx-remove-toctrees",
]

dev = [
# development tools
"jupyterlab",
# linting and testing
"pip",
"pytest",
Expand Down
Loading