From ccf9ce2833f8c0020227bf5fe6e83ee0e6732d39 Mon Sep 17 00:00:00 2001 From: Brian Pugh Date: Sun, 27 Aug 2023 15:12:30 -0700 Subject: [PATCH] include rich with typer --- .pre-commit-config.yaml | 7 +++--- bootstrap | 1 + poetry.lock | 56 ++++++++++++++++++++++++++++++++++++++++- pyproject.toml | 1 + 4 files changed, 61 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8f833fc..2411e95 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ exclude: ^(poetry.lock|.idea/) repos: - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: "v0.0.280" + rev: "v0.0.286" hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] @@ -19,7 +19,7 @@ repos: types: [python] - repo: https://github.com/adamchainz/blacken-docs - rev: 1.15.0 + rev: 1.16.0 hooks: - id: blacken-docs additional_dependencies: @@ -62,6 +62,7 @@ repos: - "--paths=pythontemplate" - "--deps-file=pyproject.toml" - "--sections=tool.poetry.dependencies" + - "--exclude-deps=rich" - repo: https://github.com/codespell-project/codespell rev: v2.2.5 @@ -71,6 +72,6 @@ repos: - id: codespell - repo: https://github.com/RobertCraigie/pyright-python - rev: v1.1.318 + rev: v1.1.324 hooks: - id: pyright diff --git a/bootstrap b/bootstrap index 355b51b..bfe6557 100755 --- a/bootstrap +++ b/bootstrap @@ -299,6 +299,7 @@ def main(): if not include_cli: run([POETRY_BIN, "remove", "typer"]) + run([POETRY_BIN, "remove", "rich"]) run([POETRY_BIN, "update"]) run([POETRY_BIN, "install"]) diff --git a/poetry.lock b/poetry.lock index 0b1853c..77c066d 100644 --- a/poetry.lock +++ b/poetry.lock @@ -579,6 +579,30 @@ optional-strict = ["IPython (==7.14.0)", "IPython (==7.18.0)", "IPython (==8.12. tests = ["coverage[toml] (>=5.3)", "pytest (>=4.6.0)", "pytest (>=4.6.0)", "pytest (>=4.6.0,<=4.6.11)", "pytest (>=4.6.0,<=4.6.11)", "pytest (>=4.6.0,<=6.1.2)", "pytest (>=6.2.5)", "pytest-cov (>=2.8.1)", "pytest-cov (>=2.8.1)", "pytest-cov (>=2.9.0)", "pytest-cov (>=3.0.0)", "ubelt (>=1.3.3)", "xdoctest (>=1.1.1)"] tests-strict = ["coverage[toml] (==5.3)", "pytest (==4.6.0)", "pytest (==4.6.0)", "pytest (==4.6.0)", "pytest (==4.6.0)", "pytest (==4.6.0)", "pytest (==6.2.5)", "pytest-cov (==2.8.1)", "pytest-cov (==2.8.1)", "pytest-cov (==2.9.0)", "pytest-cov (==3.0.0)", "ubelt (==1.3.3)", "xdoctest (==1.1.1)"] +[[package]] +name = "markdown-it-py" +version = "3.0.0" +description = "Python port of markdown-it. Markdown parsing, done right!" +optional = false +python-versions = ">=3.8" +files = [ + {file = "markdown-it-py-3.0.0.tar.gz", hash = "sha256:e3f60a94fa066dc52ec76661e37c851cb232d92f9886b15cb560aaada2df8feb"}, + {file = "markdown_it_py-3.0.0-py3-none-any.whl", hash = "sha256:355216845c60bd96232cd8d8c40e8f9765cc86f46880e43a8fd22dc1a1a8cab1"}, +] + +[package.dependencies] +mdurl = ">=0.1,<1.0" + +[package.extras] +benchmarking = ["psutil", "pytest", "pytest-benchmark"] +code-style = ["pre-commit (>=3.0,<4.0)"] +compare = ["commonmark (>=0.9,<1.0)", "markdown (>=3.4,<4.0)", "mistletoe (>=1.0,<2.0)", "mistune (>=2.0,<3.0)", "panflute (>=2.3,<3.0)"] +linkify = ["linkify-it-py (>=1,<3)"] +plugins = ["mdit-py-plugins"] +profiling = ["gprof2dot"] +rtd = ["jupyter_sphinx", "mdit-py-plugins", "myst-parser", "pyyaml", "sphinx", "sphinx-copybutton", "sphinx-design", "sphinx_book_theme"] +testing = ["coverage", "pytest", "pytest-cov", "pytest-regressions"] + [[package]] name = "markupsafe" version = "2.1.3" @@ -652,6 +676,17 @@ files = [ [package.dependencies] traitlets = "*" +[[package]] +name = "mdurl" +version = "0.1.2" +description = "Markdown URL utilities" +optional = false +python-versions = ">=3.7" +files = [ + {file = "mdurl-0.1.2-py3-none-any.whl", hash = "sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8"}, + {file = "mdurl-0.1.2.tar.gz", hash = "sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba"}, +] + [[package]] name = "nodeenv" version = "1.8.0" @@ -956,6 +991,25 @@ urllib3 = ">=1.21.1,<3" socks = ["PySocks (>=1.5.6,!=1.5.7)"] use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] +[[package]] +name = "rich" +version = "13.5.2" +description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" +optional = false +python-versions = ">=3.7.0" +files = [ + {file = "rich-13.5.2-py3-none-any.whl", hash = "sha256:146a90b3b6b47cac4a73c12866a499e9817426423f57c5a66949c086191a8808"}, + {file = "rich-13.5.2.tar.gz", hash = "sha256:fb9d6c0a0f643c99eed3875b5377a184132ba9be4d61516a55273d3554d75a39"}, +] + +[package.dependencies] +markdown-it-py = ">=2.2.0" +pygments = ">=2.13.0,<3.0.0" +typing-extensions = {version = ">=4.0.0,<5.0", markers = "python_version < \"3.9\""} + +[package.extras] +jupyter = ["ipywidgets (>=7.5.1,<9)"] + [[package]] name = "setuptools" version = "68.1.2" @@ -1323,4 +1377,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = "^3.8" -content-hash = "cca8ef3067e0fcb330bbe3ae6d53fa712aae08df3b1cd220576d07808ecb3255" +content-hash = "e910721733e186bda10e50c696da7cb8d08ce5ae36a151eb00a7b6a563effb2b" diff --git a/pyproject.toml b/pyproject.toml index db6b525..481b57e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,6 +30,7 @@ pythontemplate = "pythontemplate.cli.main:run_app" python = "^3.8" typer = ">=0.9.0" typing-extensions = "^4.7.1" +rich = ">=10.11.0" [tool.poetry.group.docs.dependencies] sphinx = "~6.2.1"