From 0bacd890979ee39c7a55ca8a9c6630e12b5cf9ba Mon Sep 17 00:00:00 2001 From: Sandro Campos Date: Fri, 16 Feb 2024 14:46:59 -0500 Subject: [PATCH] Update to PPT v1.5.3 --- .copier-answers.yml | 2 +- .pre-commit-config.yaml | 3 --- docs/conf.py | 10 ++++++++++ docs/index.rst | 4 ++-- docs/requirements.txt | 1 + 5 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.copier-answers.yml b/.copier-answers.yml index 6ef826a..ab85c17 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -1,5 +1,5 @@ # Changes here will be overwritten by Copier -_commit: v1.5.1-11-g34358f1 +_commit: v1.5.3 _src_path: gh:lincc-frameworks/python-project-template author_email: scampos@andrew.cmu.edu author_name: Sandro Campos diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0e09d56..cade04c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -42,7 +42,6 @@ repos: name: Validate pyproject.toml description: Verify that pyproject.toml adheres to the established schema. - # Automatically sort the imports used in .py files - repo: https://github.com/pycqa/isort rev: 5.12.0 @@ -52,8 +51,6 @@ repos: description: Sort and organize imports in .py and .pyi files. types_or: [python, pyi] - - # Analyze the src code style and report code that doesn't adhere. - repo: local hooks: diff --git a/docs/conf.py b/docs/conf.py index 4e2e86c..0b63f1d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -29,6 +29,16 @@ extensions.append("autoapi.extension") extensions.append("nbsphinx") +# -- sphinx-copybutton configuration ---------------------------------------- +extensions.append("sphinx_copybutton") +## sets up the expected prompt text from console blocks, and excludes it from +## the text that goes into the clipboard. +copybutton_exclude = ".linenos, .gp" +copybutton_prompt_text = ">> " + +## lets us suppress the copy button on select code blocks. +copybutton_selector = "div:not(.no-copybutton) > div.highlight > pre" + templates_path = [] exclude_patterns = ["_build", "**.ipynb_checkpoints"] diff --git a/docs/index.rst b/docs/index.rst index c375e20..c53cdf0 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -13,7 +13,7 @@ virtual environment. LINCC-Frameworks engineers primarily use `conda` to manage environments. If you have conda installed locally, you can run the following to create and activate a new environment. -.. code-block:: bash +.. code-block:: console >> conda create env -n python=3.10 >> conda activate @@ -22,7 +22,7 @@ create and activate a new environment. Once you have created a new environment, you can install this project for local development using the following commands: -.. code-block:: bash +.. code-block:: console >> pip install -e .'[dev]' >> pre-commit install diff --git a/docs/requirements.txt b/docs/requirements.txt index e4a22bb..30d419a 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,6 +1,7 @@ sphinx sphinx-rtd-theme sphinx-autoapi +sphinx-copybutton nbsphinx ipython jupytext