Skip to content

Commit

Permalink
Merge branch 'release/0.2.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
tanbro committed Mar 11, 2024
2 parents c6da96e + 3df6e0e commit b6df9f5
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 19 deletions.
19 changes: 19 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
charset = utf-8
insert_final_newline = true

# 4 space indentation
[*.py]
indent_style = space
indent_size = 4

# Tab indentation (no size specified)
[Makefile]
indent_style = tab
12 changes: 8 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-case-conflict
- id: check-added-large-files
Expand All @@ -19,17 +19,21 @@ repos:
- id: check-docstring-first

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.275
rev: v0.3.2
hooks:
- id: ruff
types_or: [python, pyi, jupyter]
args: [ --fix ]
- id: ruff-format
types_or: [ python, pyi, jupyter ]

- repo: https://github.com/kynan/nbstripout
rev: "0.6.1"
rev: "0.7.1"
hooks:
- id: nbstripout

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: "0.23.2"
rev: "0.28.0"
hooks:
- id: check-github-workflows
- id: check-readthedocs
8 changes: 6 additions & 2 deletions .ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@ extend-exclude = ["docs"]
# Always generate Python 3.7-compatible code.
target-version = "py37"
line-length = 128

[lint]
ignore-init-module-imports = true
[mccabe]

[lint.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 10

[lint.per-file-ignores]
# Ignore `F401`(imported but unused), `F403`(import *` used), `E402`(import violations) in all `__init__.py` files
[per-file-ignores]
"__init__.py" = ["E402", "F401", "F403"]
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# Changelog
# CHANGELOG

## v0.2.2

> 📅 **Date** 2024-3-11
Update dependencies and tools to latest version.

## v0.2.1

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The project itself's documentation site is a demo of how to use it.
To build and serve the doc-site:

```bash
pip install -r dev.requirements.txt
pip install -r requirements.txt
mkdocs serve
```

Expand Down
8 changes: 4 additions & 4 deletions notebooks/image.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
"metadata": {},
"outputs": [],
"source": [
"base_url = 'https://www.bing.com'\n",
"img_url = requests.get(f'{base_url}/HPImageArchive.aspx?format=js&idx=0&n=1').json()['images'][0]['url']\n",
"img_full_url = f'{base_url}{img_url}'\n",
"base_url = \"https://www.bing.com\"\n",
"img_url = requests.get(f\"{base_url}/HPImageArchive.aspx?format=js&idx=0&n=1\").json()[\"images\"][0][\"url\"]\n",
"img_full_url = f\"{base_url}{img_url}\"\n",
"print(img_full_url)\n",
"display(Image(url=img_full_url, width=320, height=240))"
]
Expand All @@ -54,7 +54,7 @@
"metadata": {},
"outputs": [],
"source": [
"display(Image(filename='../static/img_01.jpeg'))"
"display(Image(filename=\"../static/img_01.jpeg\"))"
]
}
],
Expand Down
10 changes: 5 additions & 5 deletions notebooks/matplotlib.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@
"source": [
"x = np.linspace(0, 2, 100)\n",
"\n",
"plt.plot(x, x, label='linear')\n",
"plt.plot(x, x**2, label='quadratic')\n",
"plt.plot(x, x**3, label='cubic')\n",
"plt.plot(x, x, label=\"linear\")\n",
"plt.plot(x, x**2, label=\"quadratic\")\n",
"plt.plot(x, x**3, label=\"cubic\")\n",
"\n",
"plt.xlabel('x label')\n",
"plt.ylabel('y label')\n",
"plt.xlabel(\"x label\")\n",
"plt.ylabel(\"y label\")\n",
"\n",
"plt.title(\"Simple Plot\")\n",
"\n",
Expand Down
1 change: 1 addition & 0 deletions dev.requirements.txt → requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ requests

# CI tools
build
setuptools_scm
pre-commit
ruff
6 changes: 4 additions & 2 deletions src/mkdocs_nbconvert/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
from mkdocs.structure.files import File
from mkdocs.utils import log
from nbconvert import MarkdownExporter
from nbconvert.preprocessors import CellExecutionError, ExecutePreprocessor # pyright: ignore[reportPrivateImportUsage]

from nbconvert.preprocessors import ( # pyright: ignore[reportPrivateImportUsage]
CellExecutionError,
ExecutePreprocessor,
)

__all__ = ["NbConvertPlugin"]

Expand Down

0 comments on commit b6df9f5

Please sign in to comment.