From 6a018e73c05a0b9ed8a227942dc3c1bf774b9d36 Mon Sep 17 00:00:00 2001 From: Jared Lewis Date: Tue, 12 Sep 2023 11:51:47 +1000 Subject: [PATCH 1/2] chore: Remove the pinned version of jupyer-server --- Makefile | 4 +++- setup.cfg | 4 +--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 7964407f..f47ad0ea 100644 --- a/Makefile +++ b/Makefile @@ -83,7 +83,9 @@ $(VENV_DIR): setup.py setup.cfg $(VENV_DIR)/bin/pip install --upgrade pip wheel $(VENV_DIR)/bin/pip install -e .[dev] - $(VENV_DIR)/bin/jupyter nbextension enable --py widgetsnbextension + + # Set jupytext as the default viewer when opening notebooks + $(VENV_DIR)/bin/jupytext-config set-default-viewer touch $(VENV_DIR) diff --git a/setup.cfg b/setup.cfg index d5a796d6..20935d6e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -68,9 +68,7 @@ plotting = notebooks = %(plotting)s %(optional)s - notebook - # See https://github.com/jupyter/notebook/issues/5492 - jupyter-server<2 + notebook>=7 ipywidgets tests = From a31d76d1c83c5d5c0ace819455894798a47b42cc Mon Sep 17 00:00:00 2001 From: Jared Lewis Date: Tue, 12 Sep 2023 14:25:47 +1000 Subject: [PATCH 2/2] chore: changelog --- .readthedocs.yml | 1 + CHANGELOG.rst | 1 + docs/source/notebooks/README.md | 11 +++++++++++ 3 files changed, 13 insertions(+) create mode 100644 docs/source/notebooks/README.md diff --git a/.readthedocs.yml b/.readthedocs.yml index 61fb948c..d85b8d85 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -17,6 +17,7 @@ python: path: . extra_requirements: - docs + - plotting # Build documentation in the docs/ directory with Sphinx sphinx: diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 02b71556..fdcb570b 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,7 @@ Changelog master ------ +- (`#257 `_) Updated to support the latest version of :mod:`notebook` - (`#252 `_) Add ``py.typed`` file do downstream packages can use the provided type-hints. Improved the coverage of the type-hints in ``run.py`` - (`#255 `_) Unpin upper limit of the version of numpy - (`#248 `_) Correctly filter the time index of empty ScmRuns. Resolves #245 diff --git a/docs/source/notebooks/README.md b/docs/source/notebooks/README.md new file mode 100644 index 00000000..21027df9 --- /dev/null +++ b/docs/source/notebooks/README.md @@ -0,0 +1,11 @@ +# Notebooks + +This directory contains notebooks of examples for how to use `scmdata`. + +## Jupytext + +We use [Jupytext](https://github.com/mwouts/jupytext) to encode the notebooks as standard .py files. This makes +it easier to version control notebooks as you get a clear, meaningful diffs. Jupytext also enables these notebooks +to be edited via Jupyter Lab or Jupyter Notebook. + +As part of the CI, these notebooks are run and checked for any errors. \ No newline at end of file