Skip to content

Commit

Permalink
Add pre-commit (#1)
Browse files Browse the repository at this point in the history
* Add pre-commit

* Rename file

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix typo

---------

Co-authored-by: Qiusheng Wu <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Dec 12, 2024
1 parent 2d6a338 commit 1c6802a
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 108 deletions.
32 changes: 32 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
types: [python]
- id: trailing-whitespace
- id: requirements-txt-fixer
- id: check-added-large-files
args: ["--maxkb=500"]

- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
- id: black-jupyter

- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
args:
[
"--ignore-words-list=aci,acount,acounts,fallow,ges,hart,hist,nd,ned,ois,wqs,watermask,tre,mape",
"--skip=*.csv,*.geojson,*.json,*.yml*.js,*.html,*cff,*.pdf",
]

- repo: https://github.com/kynan/nbstripout
rev: 0.8.1
hooks:
- id: nbstripout
2 changes: 1 addition & 1 deletion 01-paper.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ MyST is focused on scientific writing, and ensuring that citations are first cla
![](./images/citations.png)
**Figure 1**: Citations are rendered with a popup directly inline.

MyST aims to show as much information in context as possible, for example, Figure 2 shows a reading experience for a referenced equation: you can immediately **click on the reference**, see the equation, all without loosing any context -- ultimately saving you time. Head _et al._ (2021) found that these ideas both improved the overall reading experience of articles as well as allowed researchers to answer questions about an article **26% faster** when compared to a traditional PDF!
MyST aims to show as much information in context as possible, for example, Figure 2 shows a reading experience for a referenced equation: you can immediately **click on the reference**, see the equation, all without losing any context -- ultimately saving you time. Head _et al._ (2021) found that these ideas both improved the overall reading experience of articles as well as allowed researchers to answer questions about an article **26% faster** when compared to a traditional PDF!

![](./images/equations.gif)
**Figure 2**: In context cross-references improve the reading experience.
Expand Down
139 changes: 35 additions & 104 deletions 02-notebook.ipynb

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# To execute the code in our notebook
altair
matplotlib
numpy
vega_datasets

# To interactively browser Jupyter content with MyST
jupyterlab_myst
matplotlib
numpy
vega_datasets

0 comments on commit 1c6802a

Please sign in to comment.