From 955fb74673f2b4fa217227f293177f7531623758 Mon Sep 17 00:00:00 2001 From: Alexander Hess Date: Mon, 12 Oct 2020 22:47:50 +0200 Subject: [PATCH] Mention nox and init task --- README.md | 11 ++++++++++- noxfile.py | 5 +++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 66698ad..85f55ee 100644 --- a/README.md +++ b/README.md @@ -205,7 +205,16 @@ The following *one* command not only [poetry](https://python-poetry.org/docs/) is also used to execute commands in the project's (virtual) environment. The command is then prefixed with `poetry run ...`. -For example, to do the equivalent of clicking "Launch" in the Anaconda Navigator: + +The project uses [nox](https://nox.thea.codes/en/stable/) + to manage various maintenance tasks. +After cloning the repository and setting up the virual environment, + it is recommended to run the initialization task. +That needs to be done only once. + +- `poetry run nox -s init-project` + +To do the equivalent of clicking "Launch" in the Anaconda Navigator: - `poetry run jupyter lab` diff --git a/noxfile.py b/noxfile.py index 184e1b5..e77cc26 100644 --- a/noxfile.py +++ b/noxfile.py @@ -39,6 +39,11 @@ def init_project(session): ): session.run("poetry", "run", "pre-commit", "install", f"--hook-type={type_}") + # Copy the extensions' JavaScript and CSS files into Jupyter's search directory. + session.run( + "poetry", "run", "jupyter", "contrib", "nbextension", "install", "--user" + ) + @nox.session(name="fix-branch-references", venv_backend="none") def fix_branch_references(_session):