From 35accb13584953f9930bfb41b9ab2a087fa7459e Mon Sep 17 00:00:00 2001 From: drearondov <63360808+drearondov@users.noreply.github.com> Date: Sun, 29 Oct 2023 11:18:04 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=9A=20Update=20installation=20script?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 14 ++++++- docs/code-of-conduct.rst | 2 +- docs/index.rst | 4 +- poetry.lock | 83 +++++++++++++++++++++++++++++++++++++++- pyproject.toml | 1 + src/__init__.py | 1 + src/rosepine.py | 6 +-- src/rosepinedawn.py | 6 +-- src/rosepinemoon.py | 6 +-- tox.ini | 7 ++-- 10 files changed, 109 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 15444bb..c8f4419 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,10 @@ [![Latest release](https://img.shields.io/github/v/release/drearondov/pygments-rose-pine?style=for-the-badge)](https://github.com/drearondov/pygments-rose-pine/releases/latest) [![Any color you like](https://img.shields.io/badge/code%20style-black-black?style=for-the-badge)](https://github.com/psf/black) +## Requirements + +This package has been tested on Python versions 3.9, 3.10, 3.11 with Python 3.9 beeing the minimum required. + ## Installation The `pygments-rose-pine` package is not currently published to [PyPI](https://pypi.org/). @@ -26,7 +30,7 @@ If, however, you still wish to install this package, the following steps *should* work to install the [latest release](https://github.com/drearondov/pygments-rose-pine/releases/latest). ```bash -repo="https://github.com/drearondov/pygments-rose-pine" +repo="git@github.com:rose-pine/pygments.git" # Find the latest release. latest=$(git ls-remote --tags --refs $repo | # Fetch remote tags. @@ -84,6 +88,14 @@ options(radian.color_scheme = "rose-pine") ## Gallery +*Rose Piné* + ![Rosé Pine](docs/static/rose-pine.png) + +*Rose Piné Moon* + ![Rosé Pine Moon](docs/static/rose-pine-moon.png) + +*Rose Piné Dawn* + ![Rosé Pine Dawn](docs/static/rose-pine-dawn.png) diff --git a/docs/code-of-conduct.rst b/docs/code-of-conduct.rst index c8b1c94..717d293 100644 --- a/docs/code-of-conduct.rst +++ b/docs/code-of-conduct.rst @@ -88,4 +88,4 @@ at ``_. Community Impact Guidelines were inspired by `Mozilla's code of conduct enforcement ladder `_. -For answers to common questions about this code of conduct, see the FAQ at ``_. Translations are available at ``_. +For answers to common questions about this code of conduct, see the FAQ at ``_. Translations are available at `. diff --git a/docs/index.rst b/docs/index.rst index 769c2d8..eb41c90 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -30,7 +30,7 @@ release `__. .. code:: bash - repo="https://github.com/drearondov/pygments-rose-pine" + repo="https://github.com/rose-pine/pygments.git" # Find the latest release. latest=$(git ls-remote --tags --refs $repo | # Fetch remote tags. @@ -111,7 +111,7 @@ Gallery :width: 45% .. image:: static/rose-pine-dawn.png - :width: 45% + :width: 40% .. |Python versions| image:: https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2Fdrearondov%2Fpygments-rose-pine%2Fmain%2Fpyproject.toml&style=for-the-badge&logo=python&logoColor=white&color=blue diff --git a/poetry.lock b/poetry.lock index cead555..dea4282 100644 --- a/poetry.lock +++ b/poetry.lock @@ -396,6 +396,37 @@ docs = ["furo (>=2023.7.26)", "sphinx (>=7.1.2)", "sphinx-autodoc-typehints (>=1 testing = ["covdefaults (>=2.3)", "coverage (>=7.3)", "diff-cover (>=7.7)", "pytest (>=7.4)", "pytest-cov (>=4.1)", "pytest-mock (>=3.11.1)", "pytest-timeout (>=2.1)"] typing = ["typing-extensions (>=4.7.1)"] +[[package]] +name = "flake8" +version = "6.1.0" +description = "the modular source code checker: pep8 pyflakes and co" +optional = false +python-versions = ">=3.8.1" +files = [ + {file = "flake8-6.1.0-py2.py3-none-any.whl", hash = "sha256:ffdfce58ea94c6580c77888a86506937f9a1a227dfcd15f245d694ae20a6b6e5"}, + {file = "flake8-6.1.0.tar.gz", hash = "sha256:d5b3857f07c030bdb5bf41c7f53799571d75c4491748a3adcd47de929e34cd23"}, +] + +[package.dependencies] +mccabe = ">=0.7.0,<0.8.0" +pycodestyle = ">=2.11.0,<2.12.0" +pyflakes = ">=3.1.0,<3.2.0" + +[[package]] +name = "flake8-docstrings" +version = "1.7.0" +description = "Extension for flake8 which uses pydocstyle to check docstrings" +optional = false +python-versions = ">=3.7" +files = [ + {file = "flake8_docstrings-1.7.0-py2.py3-none-any.whl", hash = "sha256:51f2344026da083fc084166a9353f5082b01f72901df422f74b4d953ae88ac75"}, + {file = "flake8_docstrings-1.7.0.tar.gz", hash = "sha256:4c8cc748dc16e6869728699e5d0d685da9a10b0ea718e090b1ba088e67a941af"}, +] + +[package.dependencies] +flake8 = ">=3" +pydocstyle = ">=2.1" + [[package]] name = "furo" version = "2023.9.10" @@ -679,6 +710,17 @@ files = [ [package.dependencies] traitlets = "*" +[[package]] +name = "mccabe" +version = "0.7.0" +description = "McCabe checker, plugin for flake8" +optional = false +python-versions = ">=3.6" +files = [ + {file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"}, + {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"}, +] + [[package]] name = "mdit-py-plugins" version = "0.4.0" @@ -866,6 +908,45 @@ files = [ [package.extras] tests = ["pytest"] +[[package]] +name = "pycodestyle" +version = "2.11.1" +description = "Python style guide checker" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pycodestyle-2.11.1-py2.py3-none-any.whl", hash = "sha256:44fe31000b2d866f2e41841b18528a505fbd7fef9017b04eff4e2648a0fadc67"}, + {file = "pycodestyle-2.11.1.tar.gz", hash = "sha256:41ba0e7afc9752dfb53ced5489e89f8186be00e599e712660695b7a75ff2663f"}, +] + +[[package]] +name = "pydocstyle" +version = "6.3.0" +description = "Python docstring style checker" +optional = false +python-versions = ">=3.6" +files = [ + {file = "pydocstyle-6.3.0-py3-none-any.whl", hash = "sha256:118762d452a49d6b05e194ef344a55822987a462831ade91ec5c06fd2169d019"}, + {file = "pydocstyle-6.3.0.tar.gz", hash = "sha256:7ce43f0c0ac87b07494eb9c0b462c0b73e6ff276807f204d6b53edc72b7e44e1"}, +] + +[package.dependencies] +snowballstemmer = ">=2.2.0" + +[package.extras] +toml = ["tomli (>=1.2.3)"] + +[[package]] +name = "pyflakes" +version = "3.1.0" +description = "passive checker of Python programs" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pyflakes-3.1.0-py2.py3-none-any.whl", hash = "sha256:4132f6d49cb4dae6819e5379898f2b8cce3c5f23994194c24b77d5da2e36f774"}, + {file = "pyflakes-3.1.0.tar.gz", hash = "sha256:a0aae034c444db0071aa077972ba4768d40c830d9539fd45bf4cd3f8f6992efc"}, +] + [[package]] name = "pygments" version = "2.16.1" @@ -1466,4 +1547,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = ">=3.9" -content-hash = "8238f0e463a49077f14ac4617d2956859ceb774757f18c981d49d62b7db2aca5" +content-hash = "1196c79c07439656b65c06629abba59cb51f37ac6536de8e5fb8d8c9b4ef58e1" diff --git a/pyproject.toml b/pyproject.toml index 1607154..dc04804 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,6 +44,7 @@ coverage = "^7.3.2" ipython = "^8.16.1" sphinx-autodoc-typehints = "^1.24.0" furo = "^2023.9.10" +flake8-docstrings = "^1.7.0" [tool.poetry.plugins."pygments.styles"] "rose-pine" = "rosepine:RosePineStyle" diff --git a/src/__init__.py b/src/__init__.py index 5fe8577..f3ea4de 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -1,3 +1,4 @@ +"""Rose Piné for Pygments.""" __author__: str = "Andrea Rondón" __email__: str = "andrea.estefania.rv@gmail.com" __version__: str = "1.0.0" diff --git a/src/rosepine.py b/src/rosepine.py index c855231..0084c08 100644 --- a/src/rosepine.py +++ b/src/rosepine.py @@ -27,9 +27,7 @@ @dataclass(frozen=True) class Color: - """ - Absolute colors as defined by rose-pine: https://rosepinetheme.com/palette - """ + """Absolute colors as defined by rose-pine: https://rosepinetheme.com/palette.""" pine_base = "#191724" pine_surface = "#1f1d2e" @@ -49,7 +47,7 @@ class Color: class RosePineStyle(Style): - """Soho vibes for Pygments. Based on the colors of Rose Pine main theme""" + """Soho vibes for Pygments. Based on the colors of Rose Pine main theme.""" styles: Dict[Any, str] = { Comment: Color.pine_subtle, diff --git a/src/rosepinedawn.py b/src/rosepinedawn.py index faedfbe..5553dc6 100644 --- a/src/rosepinedawn.py +++ b/src/rosepinedawn.py @@ -27,9 +27,7 @@ @dataclass(frozen=True) class Color: - """ - Absolute colors as defined by rose-pine: https://rosepinetheme.com/palette - """ + """Absolute colors as defined by rose-pine: https://rosepinetheme.com/palette.""" dawn_base = "#faf4ed" dawn_surface = "#fffaf3" @@ -49,7 +47,7 @@ class Color: class RosePineDawnStyle(Style): - """Soho vibes for Pygments. Based on the colors of Rose Pine Dawn theme""" + """Soho vibes for Pygments. Based on the colors of Rose Pine Dawn theme.""" styles: Dict[Any, str] = { Comment: Color.dawn_subtle, diff --git a/src/rosepinemoon.py b/src/rosepinemoon.py index 0d385ca..16b5303 100644 --- a/src/rosepinemoon.py +++ b/src/rosepinemoon.py @@ -27,9 +27,7 @@ @dataclass(frozen=True) class Color: - """ - Absolute colors as defined by rose-pine: https://rosepinetheme.com/palette - """ + """Absolute colors as defined by rose-pine: https://rosepinetheme.com/palette.""" moon_base = "#232136" moon_surface = "#2a273f" @@ -49,7 +47,7 @@ class Color: class RosePineMoonStyle(Style): - """Soho vibes for Pygments. Based on the colors of Rose Pine Moon theme""" + """Soho vibes for Pygments. Based on the colors of Rose Pine Moon theme.""" styles: Dict[Any, str] = { Comment: Color.moon_subtle, diff --git a/tox.ini b/tox.ini index 4e7f9ba..d08fb8c 100644 --- a/tox.ini +++ b/tox.ini @@ -35,18 +35,17 @@ deps = flake8-commas ~= 2.0.0 flake8-docstrings ~= 1.5.0 pep8-naming ~= 0.9.0 - mypy ~= 0.760 commands_pre = commands = - black --check rosepine.py - flake8 --docstring-convention=google rosepine.py + black --check src + flake8 --docstring-convention=google src mypy \ --disallow-untyped-calls \ --disallow-untyped-defs \ --disallow-incomplete-defs \ --disallow-untyped-decorators \ rosepine.py - bandit --recursive -ll rosepine.py + bandit --recursive -ll src [testenv:docs] basepython = python3.11