From 0effc3da490c3fa77f2ac1bb57192e5b1ec23941 Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Wed, 4 Jun 2025 15:49:44 +1000 Subject: [PATCH 01/31] Specify the build-system in pyproject.toml - Needed so that "uv tool install" can work with a git url. - pipx seemed to work without this. - Also need to ensure that tools.toml is installed as package-data. --- pyproject.toml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 30c4a4e..f1555a2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,5 +37,12 @@ pydoc_color = "eris.pydoc_color:main" [project.urls] homepage = "https://github.com/ahamilton/eris" +[build-system] +requires = ["setuptools>=61.0"] +build-backend = "setuptools.build_meta" + [tool.setuptools] packages=["eris"] + +[tool.setuptools.package-data] +"eris" = ["tools.toml"] From 5448eced5a131c37228dafd6b30d25dc1814bb40 Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Wed, 4 Jun 2025 16:00:26 +1000 Subject: [PATCH 02/31] Update version to v2025.06.04 --- README.md | 2 +- eris/__init__.py | 2 +- fill3/fill3/__init__.py | 2 +- fill3/pyproject.toml | 2 +- lscolors/lscolors/__init__.py | 2 +- lscolors/pyproject.toml | 2 +- packaging/make-readme.py | 2 +- pyproject.toml | 2 +- termstr/pyproject.toml | 2 +- termstr/termstr/__init__.py | 2 +- uv.lock | 8 ++++---- 11 files changed, 14 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 980e517..f966da3 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Eris maintains an up-to-date set of reports for every file in a codebase. Install eris with pipx, then install all the tools eris uses: - pipx install --system-site-packages git+https://gitlab.com/ahamilton/eris@v2025.06.03#subdirectory=eris + pipx install --system-site-packages git+https://gitlab.com/ahamilton/eris@v2025.06.04#subdirectory=eris eris --install-all-tools Or install from source: (includes tools) diff --git a/eris/__init__.py b/eris/__init__.py index 36d6d03..274d002 100644 --- a/eris/__init__.py +++ b/eris/__init__.py @@ -1,3 +1,3 @@ -__version__ = "v2025.06.03" +__version__ = "v2025.06.04" diff --git a/fill3/fill3/__init__.py b/fill3/fill3/__init__.py index 3bac230..338e58b 100755 --- a/fill3/fill3/__init__.py +++ b/fill3/fill3/__init__.py @@ -15,7 +15,7 @@ import fill3.terminal as terminal import termstr -__version__ = "v2025.06.03" +__version__ = "v2025.06.04" ########################## diff --git a/fill3/pyproject.toml b/fill3/pyproject.toml index 6abceb7..43c3261 100644 --- a/fill3/pyproject.toml +++ b/fill3/pyproject.toml @@ -2,7 +2,7 @@ tool.uv.package = true [project] name = "fill3" -version = "v2025.06.03" +version = "v2025.06.04" description = "Fill3 provides basic widgets for a tui." authors = [ { name = "Andrew Hamilton", email = "and_hamilton@yahoo.com" }, diff --git a/lscolors/lscolors/__init__.py b/lscolors/lscolors/__init__.py index 3f4df55..701a73f 100644 --- a/lscolors/lscolors/__init__.py +++ b/lscolors/lscolors/__init__.py @@ -15,7 +15,7 @@ import lscolors import termstr -__version__ = "v2025.06.03" +__version__ = "v2025.06.04" FILE_KEY = "fi" diff --git a/lscolors/pyproject.toml b/lscolors/pyproject.toml index dc61127..2ebb549 100644 --- a/lscolors/pyproject.toml +++ b/lscolors/pyproject.toml @@ -7,7 +7,7 @@ allow-direct-references = true [project] name = "lscolors" -version = "v2025.06.03" +version = "v2025.06.04" description = "Give coloring for file types as in the ls command." authors = [ { name = "Andrew Hamilton", email = "and_hamilton@yahoo.com" }, diff --git a/packaging/make-readme.py b/packaging/make-readme.py index c22571e..fae28d8 100755 --- a/packaging/make-readme.py +++ b/packaging/make-readme.py @@ -26,7 +26,7 @@ Eris maintains an up-to-date set of reports for every file in a codebase. Install eris with pipx, then install all the tools eris uses: - pipx install --system-site-packages git+https://gitlab.com/ahamilton/eris@v2025.06.03#subdirectory=eris + pipx install --system-site-packages git+https://gitlab.com/ahamilton/eris@v2025.06.04#subdirectory=eris eris --install-all-tools Or install from source: (includes tools) diff --git a/pyproject.toml b/pyproject.toml index f1555a2..3e8c6a0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ tool.uv.package = true [project] name = "eris" -version = "v2025.06.03" +version = "v2025.06.04" description = "Eris maintains an up-to-date set of reports for every file in a codebase." readme = "README.md" authors = [ diff --git a/termstr/pyproject.toml b/termstr/pyproject.toml index 8f6d442..35d4b30 100644 --- a/termstr/pyproject.toml +++ b/termstr/pyproject.toml @@ -2,7 +2,7 @@ tool.uv.package = true [project] name = "termstr" -version = "v2025.06.03" +version = "v2025.06.04" description = "Termstr provides strings with extra terminal styling." authors = [ { name = "Andrew Hamilton", email = "and_hamilton@yahoo.com" }, diff --git a/termstr/termstr/__init__.py b/termstr/termstr/__init__.py index 02cd4f7..70df20e 100644 --- a/termstr/termstr/__init__.py +++ b/termstr/termstr/__init__.py @@ -10,7 +10,7 @@ import weakref import cwcwidth -__version__ = "v2025.06.03" +__version__ = "v2025.06.04" ESC = "\x1b" diff --git a/uv.lock b/uv.lock index 9e81e46..3a2d1fc 100644 --- a/uv.lock +++ b/uv.lock @@ -27,7 +27,7 @@ wheels = [ [[package]] name = "eris" -version = "2025.6.3" +version = "2025.6.4" source = { editable = "." } dependencies = [ { name = "docopt-ng" }, @@ -54,7 +54,7 @@ requires-dist = [ [[package]] name = "fill3" -version = "2025.6.3" +version = "2025.6.4" source = { editable = "fill3" } dependencies = [ { name = "termstr" }, @@ -65,7 +65,7 @@ requires-dist = [{ name = "termstr", editable = "termstr" }] [[package]] name = "lscolors" -version = "2025.6.3" +version = "2025.6.4" source = { editable = "lscolors" } dependencies = [ { name = "termstr" }, @@ -171,7 +171,7 @@ sdist = { url = "https://files.pythonhosted.org/packages/d6/b4/b44fccc7040b01449 [[package]] name = "termstr" -version = "2025.6.3" +version = "2025.6.4" source = { editable = "termstr" } dependencies = [ { name = "cwcwidth" }, From b5031417dc4327eede16d4086c5985f45990cacf Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Wed, 4 Jun 2025 18:26:14 +1000 Subject: [PATCH 03/31] Make python tools work better under uv - uv's has its own python, and standard python tools are installed in the system python. --- eris/tools.toml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/eris/tools.toml b/eris/tools.toml index 3e94f14..71361b9 100644 --- a/eris/tools.toml +++ b/eris/tools.toml @@ -58,7 +58,7 @@ tools_for_extensions = [ [pycodestyle] dependencies = ["python3-pycodestyle"] url = "http://pycodestyle.pycqa.org/en/latest/" - command = "python3.11 -m pycodestyle --max-line-length=100" + command = "/usr/bin/python3.11 -m pycodestyle --max-line-length=100" [pydocstyle] dependencies = ["python3-pydocstyle"] @@ -68,18 +68,18 @@ tools_for_extensions = [ [pyflakes] dependencies = ["python3-pyflakes"] url = "https://pypi.org/project/pyflakes/" - command = "python3.11 -m pyflakes" + command = "pyflakes3" [pylint] dependencies = ["pylint"] url = "https://www.pylint.org/" - command = "python3.11 -m pylint -f colorized --errors-only" + command = "pylint -f colorized --errors-only" has_color = true [bandit] dependencies = ["python3-bandit"] url = "https://pypi.org/project/bandit/" - command = "python3.11 -m bandit.cli.main -f screen" + command = "bandit -f screen" has_color = true timeout = 60 @@ -262,7 +262,7 @@ tools_for_extensions = [ [yamllint] dependencies = ["yamllint"] url = "https://github.com/adrienverge/yamllint" - command = "python3.11 -m yamllint -f colored" + command = "yamllint -f colored" has_color = true [mediainfo] From 3913a495375ef77debca1dba8800f12a85ad67dc Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Wed, 4 Jun 2025 18:32:53 +1000 Subject: [PATCH 04/31] tools: Remove pydocstyle which has been superceeded by ruff --- eris/tools.toml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/eris/tools.toml b/eris/tools.toml index 71361b9..56902d1 100644 --- a/eris/tools.toml +++ b/eris/tools.toml @@ -2,7 +2,7 @@ tools_for_extensions = [ [["py"], ["python_syntax", "python_unittests", "pytest", "pydoc", "mypy", - "python_coverage", "pycodestyle", "pydocstyle", "pyflakes", + "python_coverage", "pycodestyle", "pyflakes", "pylint", "python_gut", "python_mccabe", "bandit"]], # [["pyc"], ["pydisasm"]], [["pl", "pm", "t"], ["perl_syntax", "perldoc"]], @@ -60,11 +60,6 @@ tools_for_extensions = [ url = "http://pycodestyle.pycqa.org/en/latest/" command = "/usr/bin/python3.11 -m pycodestyle --max-line-length=100" -[pydocstyle] - dependencies = ["python3-pydocstyle"] - url = "http://www.pydocstyle.org/en/2.1.1/usage.html" - command = "python3.11 -m pydocstyle --ignore=D1,D213" - [pyflakes] dependencies = ["python3-pyflakes"] url = "https://pypi.org/project/pyflakes/" From 7827aae0ae0b747f1fce5d7a5ad6cfbed2d3e534 Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Wed, 4 Jun 2025 18:47:01 +1000 Subject: [PATCH 05/31] tools: With uv the system python's version isn't necessarily 3.11 --- eris/tools.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eris/tools.toml b/eris/tools.toml index 56902d1..c8897f4 100644 --- a/eris/tools.toml +++ b/eris/tools.toml @@ -45,7 +45,7 @@ tools_for_extensions = [ [python_syntax] dependencies = [] url = "https://en.wikipedia.org/wiki/Python_syntax_and_semantics" - command = "python3.11 -m py_compile" + command = "python3 -m py_compile" [pydoc] dependencies = [] @@ -58,7 +58,7 @@ tools_for_extensions = [ [pycodestyle] dependencies = ["python3-pycodestyle"] url = "http://pycodestyle.pycqa.org/en/latest/" - command = "/usr/bin/python3.11 -m pycodestyle --max-line-length=100" + command = "/usr/bin/python3 -m pycodestyle --max-line-length=100" [pyflakes] dependencies = ["python3-pyflakes"] From 31985cc5512a72ac7399535361f3aaee349abff8 Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Wed, 4 Jun 2025 22:52:09 +1000 Subject: [PATCH 06/31] Now using uv instead of pipx - Update the installation instructions in the readme. - Change the install script to use uv. --- README.md | 22 ++++++++++++++++------ install | 2 +- packaging/make-readme.py | 18 ++++++++++++++---- 3 files changed, 31 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index f966da3..874dbbf 100644 --- a/README.md +++ b/README.md @@ -2,18 +2,28 @@ ## Summary -Eris maintains an up-to-date set of reports for every file in a codebase. +Eris maintains an up to date set of reports for every file in a codebase. ## Installation #### Debian / Ubuntu / Fedora / Arch / Alpine -Install eris with pipx, then install all the tools eris uses: +Firstly uv is needed to install eris. - pipx install --system-site-packages git+https://gitlab.com/ahamilton/eris@v2025.06.04#subdirectory=eris +To install uv: + + curl -LsSf https://astral.sh/uv/install.sh | sh + +For other ways to install uv see its [installation page](https://docs.astral.sh/uv/getting-started/installation/). + +Then use uv to install eris: + + uv tool install git+https://gitlab.com/ahamilton/eris@v2025.06.04 + +Then use eris to install all the tools it uses: eris --install-all-tools -Or install from source: (includes tools) +Or install from source: (including tools) git clone https://gitlab.com/ahamilton/eris cd eris @@ -26,10 +36,10 @@ Then to run: ## Tools -File types(100) | Tools(57) +File types(100) | Tools(56) ----------:| ----- .* | [contents](http://pygments.org/) • [metadata](https://github.com/ahamilton/eris) • [git_diff](https://git-scm.com/docs/git-diff) • [git_blame](https://git-scm.com/docs/git-blame) • [git_log](https://git-scm.com/docs/git-log) -.py | [python_syntax](https://en.wikipedia.org/wiki/Python_syntax_and_semantics) • [python_unittests](https://docs.python.org/3/library/unittest.html) • [pytest](https://docs.pytest.org/en/latest/) • [pydoc](https://docs.python.org/3/library/pydoc.html) • [mypy](http://mypy-lang.org/) • [python_coverage](https://coverage.readthedocs.io/) • [pycodestyle](http://pycodestyle.pycqa.org/en/latest/) • [pydocstyle](http://www.pydocstyle.org/en/2.1.1/usage.html) • [pyflakes](https://pypi.org/project/pyflakes/) • [pylint](https://www.pylint.org/) • [python_gut](https://github.com/ahamilton/eris) • [python_mccabe](https://pypi.org/project/mccabe/) • [bandit](https://pypi.org/project/bandit/) +.py | [python_syntax](https://en.wikipedia.org/wiki/Python_syntax_and_semantics) • [python_unittests](https://docs.python.org/3/library/unittest.html) • [pytest](https://docs.pytest.org/en/latest/) • [pydoc](https://docs.python.org/3/library/pydoc.html) • [mypy](http://mypy-lang.org/) • [python_coverage](https://coverage.readthedocs.io/) • [pycodestyle](http://pycodestyle.pycqa.org/en/latest/) • [pyflakes](https://pypi.org/project/pyflakes/) • [pylint](https://www.pylint.org/) • [python_gut](https://github.com/ahamilton/eris) • [python_mccabe](https://pypi.org/project/mccabe/) • [bandit](https://pypi.org/project/bandit/) .pl .pm .t | [perl_syntax](https://en.wikipedia.org/wiki/Perl) • [perldoc](http://perldoc.perl.org/) .p6 .pm6 | [perl6_syntax](https://rakudo.org/) .pod .pod6 | [perldoc](http://perldoc.perl.org/) diff --git a/install b/install index e4081a7..74554c6 100755 --- a/install +++ b/install @@ -5,5 +5,5 @@ set -e set -x -pipx install --system-site-packages "$@" . +uv tool install "$@" . eris --install-all-tools diff --git a/packaging/make-readme.py b/packaging/make-readme.py index fae28d8..1f10441 100755 --- a/packaging/make-readme.py +++ b/packaging/make-readme.py @@ -18,18 +18,28 @@ def main(): ## Summary -Eris maintains an up-to-date set of reports for every file in a codebase. +Eris maintains an up to date set of reports for every file in a codebase. ## Installation #### Debian / Ubuntu / Fedora / Arch / Alpine -Install eris with pipx, then install all the tools eris uses: +Firstly uv is needed to install eris. - pipx install --system-site-packages git+https://gitlab.com/ahamilton/eris@v2025.06.04#subdirectory=eris +To install uv: + + curl -LsSf https://astral.sh/uv/install.sh | sh + +For other ways to install uv see its [installation page](https://docs.astral.sh/uv/getting-started/installation/). + +Then use uv to install eris: + + uv tool install git+https://gitlab.com/ahamilton/eris@v2025.06.04 + +Then use eris to install all the tools it uses: eris --install-all-tools -Or install from source: (includes tools) +Or install from source: (including tools) git clone https://gitlab.com/ahamilton/eris cd eris From 968d2b8443d5f5ead70c87d1d15c46e8eb482e2a Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Wed, 4 Jun 2025 23:00:11 +1000 Subject: [PATCH 07/31] Fix README formatting --- README.md | 1 + packaging/make-readme.py | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index 874dbbf..4b294d4 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ Then use uv to install eris: uv tool install git+https://gitlab.com/ahamilton/eris@v2025.06.04 Then use eris to install all the tools it uses: + eris --install-all-tools Or install from source: (including tools) diff --git a/packaging/make-readme.py b/packaging/make-readme.py index 1f10441..f2e952d 100755 --- a/packaging/make-readme.py +++ b/packaging/make-readme.py @@ -37,6 +37,7 @@ Then use uv to install eris: uv tool install git+https://gitlab.com/ahamilton/eris@v2025.06.04 Then use eris to install all the tools it uses: + eris --install-all-tools Or install from source: (including tools) From 03c2644ac4ef8055028e1f3a20c174f55d1f38f5 Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Sat, 7 Jun 2025 21:52:06 +1000 Subject: [PATCH 08/31] packaging: Make pyproject.toml work with pip --- pyproject.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 3e8c6a0..b98ed38 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,13 +11,13 @@ authors = [ requires-python = ">=3.11" dependencies = [ "docopt-ng==0.9.0", - "fill3", - "lscolors", + "fill3 @ git+https://gitlab.com/ahamilton/eris@v2025.06.04#subdirectory=fill3", + "lscolors @ git+https://gitlab.com/ahamilton/eris@v2025.06.04#subdirectory=lscolors", "pexpect==4.9.0", "pillow==11.2.1", "pygments==2.19.1", "pyinotify-elephant-fork==0.0.1", - "termstr", + "termstr @ git+https://gitlab.com/ahamilton/eris@v2025.06.04#subdirectory=termstr", ] [tool.uv.sources] From 35b3ac22ece31e671afdf93d3a8a9457a271dfbb Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Sat, 7 Jun 2025 22:01:21 +1000 Subject: [PATCH 09/31] Update README - Can install with pipx or uv. --- README.md | 16 ++++------------ packaging/make-readme.py | 16 ++++------------ 2 files changed, 8 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 4b294d4..a7dca6b 100644 --- a/README.md +++ b/README.md @@ -8,15 +8,13 @@ Eris maintains an up to date set of reports for every file in a codebase. #### Debian / Ubuntu / Fedora / Arch / Alpine -Firstly uv is needed to install eris. +Eris can be installed by pipx or [uv](https://docs.astral.sh/uv/getting-started/installation/). -To install uv: +To install with pipx: - curl -LsSf https://astral.sh/uv/install.sh | sh + pipx install git+https://gitlab.com/ahamilton/eris@v2025.06.04 -For other ways to install uv see its [installation page](https://docs.astral.sh/uv/getting-started/installation/). - -Then use uv to install eris: +or to install with uv: uv tool install git+https://gitlab.com/ahamilton/eris@v2025.06.04 @@ -24,12 +22,6 @@ Then use eris to install all the tools it uses: eris --install-all-tools -Or install from source: (including tools) - - git clone https://gitlab.com/ahamilton/eris - cd eris - ./install - Then to run: eris diff --git a/packaging/make-readme.py b/packaging/make-readme.py index f2e952d..5189e59 100755 --- a/packaging/make-readme.py +++ b/packaging/make-readme.py @@ -24,15 +24,13 @@ Eris maintains an up to date set of reports for every file in a codebase. #### Debian / Ubuntu / Fedora / Arch / Alpine -Firstly uv is needed to install eris. +Eris can be installed by pipx or [uv](https://docs.astral.sh/uv/getting-started/installation/). -To install uv: +To install with pipx: - curl -LsSf https://astral.sh/uv/install.sh | sh + pipx install git+https://gitlab.com/ahamilton/eris@v2025.06.04 -For other ways to install uv see its [installation page](https://docs.astral.sh/uv/getting-started/installation/). - -Then use uv to install eris: +or to install with uv: uv tool install git+https://gitlab.com/ahamilton/eris@v2025.06.04 @@ -40,12 +38,6 @@ Then use eris to install all the tools it uses: eris --install-all-tools -Or install from source: (including tools) - - git clone https://gitlab.com/ahamilton/eris - cd eris - ./install - Then to run: eris From 5ba4f6bb811b715fa8f5c926590ae53672f4bfe9 Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Sat, 7 Jun 2025 22:02:35 +1000 Subject: [PATCH 10/31] Update version to v2025.06.07 --- README.md | 4 ++-- eris/__init__.py | 2 +- fill3/fill3/__init__.py | 2 +- fill3/pyproject.toml | 2 +- lscolors/lscolors/__init__.py | 2 +- lscolors/pyproject.toml | 2 +- packaging/make-readme.py | 4 ++-- pyproject.toml | 8 ++++---- termstr/pyproject.toml | 2 +- termstr/termstr/__init__.py | 2 +- uv.lock | 8 ++++---- 11 files changed, 19 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index a7dca6b..05a3ffb 100644 --- a/README.md +++ b/README.md @@ -12,11 +12,11 @@ Eris can be installed by pipx or [uv](https://docs.astral.sh/uv/getting-started/ To install with pipx: - pipx install git+https://gitlab.com/ahamilton/eris@v2025.06.04 + pipx install git+https://gitlab.com/ahamilton/eris@v2025.06.07 or to install with uv: - uv tool install git+https://gitlab.com/ahamilton/eris@v2025.06.04 + uv tool install git+https://gitlab.com/ahamilton/eris@v2025.06.07 Then use eris to install all the tools it uses: diff --git a/eris/__init__.py b/eris/__init__.py index 274d002..f47acec 100644 --- a/eris/__init__.py +++ b/eris/__init__.py @@ -1,3 +1,3 @@ -__version__ = "v2025.06.04" +__version__ = "v2025.06.07" diff --git a/fill3/fill3/__init__.py b/fill3/fill3/__init__.py index 338e58b..cb8e67c 100755 --- a/fill3/fill3/__init__.py +++ b/fill3/fill3/__init__.py @@ -15,7 +15,7 @@ import fill3.terminal as terminal import termstr -__version__ = "v2025.06.04" +__version__ = "v2025.06.07" ########################## diff --git a/fill3/pyproject.toml b/fill3/pyproject.toml index 43c3261..2316d21 100644 --- a/fill3/pyproject.toml +++ b/fill3/pyproject.toml @@ -2,7 +2,7 @@ tool.uv.package = true [project] name = "fill3" -version = "v2025.06.04" +version = "v2025.06.07" description = "Fill3 provides basic widgets for a tui." authors = [ { name = "Andrew Hamilton", email = "and_hamilton@yahoo.com" }, diff --git a/lscolors/lscolors/__init__.py b/lscolors/lscolors/__init__.py index 701a73f..581bfdb 100644 --- a/lscolors/lscolors/__init__.py +++ b/lscolors/lscolors/__init__.py @@ -15,7 +15,7 @@ import lscolors import termstr -__version__ = "v2025.06.04" +__version__ = "v2025.06.07" FILE_KEY = "fi" diff --git a/lscolors/pyproject.toml b/lscolors/pyproject.toml index 2ebb549..a20b3ea 100644 --- a/lscolors/pyproject.toml +++ b/lscolors/pyproject.toml @@ -7,7 +7,7 @@ allow-direct-references = true [project] name = "lscolors" -version = "v2025.06.04" +version = "v2025.06.07" description = "Give coloring for file types as in the ls command." authors = [ { name = "Andrew Hamilton", email = "and_hamilton@yahoo.com" }, diff --git a/packaging/make-readme.py b/packaging/make-readme.py index 5189e59..a938099 100755 --- a/packaging/make-readme.py +++ b/packaging/make-readme.py @@ -28,11 +28,11 @@ Eris can be installed by pipx or [uv](https://docs.astral.sh/uv/getting-started/ To install with pipx: - pipx install git+https://gitlab.com/ahamilton/eris@v2025.06.04 + pipx install git+https://gitlab.com/ahamilton/eris@v2025.06.07 or to install with uv: - uv tool install git+https://gitlab.com/ahamilton/eris@v2025.06.04 + uv tool install git+https://gitlab.com/ahamilton/eris@v2025.06.07 Then use eris to install all the tools it uses: diff --git a/pyproject.toml b/pyproject.toml index b98ed38..dd0a5e5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ tool.uv.package = true [project] name = "eris" -version = "v2025.06.04" +version = "v2025.06.07" description = "Eris maintains an up-to-date set of reports for every file in a codebase." readme = "README.md" authors = [ @@ -11,13 +11,13 @@ authors = [ requires-python = ">=3.11" dependencies = [ "docopt-ng==0.9.0", - "fill3 @ git+https://gitlab.com/ahamilton/eris@v2025.06.04#subdirectory=fill3", - "lscolors @ git+https://gitlab.com/ahamilton/eris@v2025.06.04#subdirectory=lscolors", + "fill3 @ git+https://gitlab.com/ahamilton/eris@v2025.06.07#subdirectory=fill3", + "lscolors @ git+https://gitlab.com/ahamilton/eris@v2025.06.07#subdirectory=lscolors", "pexpect==4.9.0", "pillow==11.2.1", "pygments==2.19.1", "pyinotify-elephant-fork==0.0.1", - "termstr @ git+https://gitlab.com/ahamilton/eris@v2025.06.04#subdirectory=termstr", + "termstr @ git+https://gitlab.com/ahamilton/eris@v2025.06.07#subdirectory=termstr", ] [tool.uv.sources] diff --git a/termstr/pyproject.toml b/termstr/pyproject.toml index 35d4b30..73a2840 100644 --- a/termstr/pyproject.toml +++ b/termstr/pyproject.toml @@ -2,7 +2,7 @@ tool.uv.package = true [project] name = "termstr" -version = "v2025.06.04" +version = "v2025.06.07" description = "Termstr provides strings with extra terminal styling." authors = [ { name = "Andrew Hamilton", email = "and_hamilton@yahoo.com" }, diff --git a/termstr/termstr/__init__.py b/termstr/termstr/__init__.py index 70df20e..432ecd3 100644 --- a/termstr/termstr/__init__.py +++ b/termstr/termstr/__init__.py @@ -10,7 +10,7 @@ import weakref import cwcwidth -__version__ = "v2025.06.04" +__version__ = "v2025.06.07" ESC = "\x1b" diff --git a/uv.lock b/uv.lock index 3a2d1fc..fec26b8 100644 --- a/uv.lock +++ b/uv.lock @@ -27,7 +27,7 @@ wheels = [ [[package]] name = "eris" -version = "2025.6.4" +version = "2025.6.7" source = { editable = "." } dependencies = [ { name = "docopt-ng" }, @@ -54,7 +54,7 @@ requires-dist = [ [[package]] name = "fill3" -version = "2025.6.4" +version = "2025.6.7" source = { editable = "fill3" } dependencies = [ { name = "termstr" }, @@ -65,7 +65,7 @@ requires-dist = [{ name = "termstr", editable = "termstr" }] [[package]] name = "lscolors" -version = "2025.6.4" +version = "2025.6.7" source = { editable = "lscolors" } dependencies = [ { name = "termstr" }, @@ -171,7 +171,7 @@ sdist = { url = "https://files.pythonhosted.org/packages/d6/b4/b44fccc7040b01449 [[package]] name = "termstr" -version = "2025.6.4" +version = "2025.6.7" source = { editable = "termstr" } dependencies = [ { name = "cwcwidth" }, From 4341df0114f2ba254f05e27c5ea5f193f7da8522 Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Mon, 9 Jun 2025 15:52:06 +1000 Subject: [PATCH 11/31] tools: Add some tools suggested by gemini ai --- README.md | 10 ++++++---- eris/tools.toml | 49 ++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 52 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 05a3ffb..8686f1d 100644 --- a/README.md +++ b/README.md @@ -29,21 +29,23 @@ Then to run: ## Tools -File types(100) | Tools(56) +File types(103) | Tools(63) ----------:| ----- .* | [contents](http://pygments.org/) • [metadata](https://github.com/ahamilton/eris) • [git_diff](https://git-scm.com/docs/git-diff) • [git_blame](https://git-scm.com/docs/git-blame) • [git_log](https://git-scm.com/docs/git-log) -.py | [python_syntax](https://en.wikipedia.org/wiki/Python_syntax_and_semantics) • [python_unittests](https://docs.python.org/3/library/unittest.html) • [pytest](https://docs.pytest.org/en/latest/) • [pydoc](https://docs.python.org/3/library/pydoc.html) • [mypy](http://mypy-lang.org/) • [python_coverage](https://coverage.readthedocs.io/) • [pycodestyle](http://pycodestyle.pycqa.org/en/latest/) • [pyflakes](https://pypi.org/project/pyflakes/) • [pylint](https://www.pylint.org/) • [python_gut](https://github.com/ahamilton/eris) • [python_mccabe](https://pypi.org/project/mccabe/) • [bandit](https://pypi.org/project/bandit/) +.py | [python_syntax](https://en.wikipedia.org/wiki/Python_syntax_and_semantics) • [python_unittests](https://docs.python.org/3/library/unittest.html) • [pytest](https://docs.pytest.org/en/latest/) • [pydoc](https://docs.python.org/3/library/pydoc.html) • [mypy](http://mypy-lang.org/) • [python_coverage](https://coverage.readthedocs.io/) • [pycodestyle](http://pycodestyle.pycqa.org/en/latest/) • [pyflakes](https://pypi.org/project/pyflakes/) • [pylint](https://www.pylint.org/) • [python_gut](https://github.com/ahamilton/eris) • [python_mccabe](https://pypi.org/project/mccabe/) • [bandit](https://pypi.org/project/bandit/) • [black](https://github.com/psf/black) • [isort](https://pycqa.github.io/isort/) .pl .pm .t | [perl_syntax](https://en.wikipedia.org/wiki/Perl) • [perldoc](http://perldoc.perl.org/) .p6 .pm6 | [perl6_syntax](https://rakudo.org/) .pod .pod6 | [perldoc](http://perldoc.perl.org/) .c .h | [c_syntax_gcc](https://gcc.gnu.org/) • [cppcheck](http://sourceforge.net/p/cppcheck/wiki/Home/) .cc .cpp .hpp | [cpp_syntax_gcc](https://gcc.gnu.org/) • [cppcheck](http://sourceforge.net/p/cppcheck/wiki/Home/) -.rb | [ruby_syntax](http://www.ruby-lang.org/) +.rb | [ruby_syntax](http://www.ruby-lang.org/) • [rubocop](https://rubocop.org/) +.rs | [rustfmt](https://github.com/rust-lang/rustfmt) • [clippy](https://github.com/rust-lang/rust-clippy) .lua | [lua_syntax](http://www.lua.org) • [lua_check](https://github.com/mpeterv/luacheck) -.js | [js_syntax](http://nodejs.org/) +.js .ts | [js_syntax](http://nodejs.org/) • [typescript_check](https://www.typescriptlang.org/) .php | [php8_syntax](https://en.wikipedia.org/wiki/PHP) .go | [go_vet](https://github.com/golang/go) • [godoc](https://github.com/golang/go) .bash .sh .dash .ksh | [shellcheck](https://www.shellcheck.net/) +.wat | [wat_syntax_check](https://github.com/WebAssembly/wabt) .wasm | [wasm_validate](https://github.com/WebAssembly/wabt) • [wasm_objdump](https://github.com/WebAssembly/wabt) .pdf | [pdf2txt](https://github.com/pdfminer/pdfminer.six) .html .htm | [html_syntax](https://www.html-tidy.org/) • [html2text](http://www.mbayer.de/html2text/) • [elinks](http://elinks.cz/) diff --git a/eris/tools.toml b/eris/tools.toml index c8897f4..a8b8621 100644 --- a/eris/tools.toml +++ b/eris/tools.toml @@ -3,19 +3,21 @@ tools_for_extensions = [ [["py"], ["python_syntax", "python_unittests", "pytest", "pydoc", "mypy", "python_coverage", "pycodestyle", "pyflakes", - "pylint", "python_gut", "python_mccabe", "bandit"]], + "pylint", "python_gut", "python_mccabe", "bandit", "black", "isort"]], # [["pyc"], ["pydisasm"]], [["pl", "pm", "t"], ["perl_syntax", "perldoc"]], [["p6", "pm6"], ["perl6_syntax"]], [["pod", "pod6"], ["perldoc"]], [["c", "h"], ["c_syntax_gcc", "cppcheck"]], [["cc", "cpp", "hpp"], ["cpp_syntax_gcc", "cppcheck"]], - [["rb"], ["ruby_syntax"]], + [["rb"], ["ruby_syntax", "rubocop"]], + [["rs"], ["rustfmt", "clippy"]], [["lua"], ["lua_syntax", "lua_check"]], - [["js"], ["js_syntax"]], + [["js", "ts"], ["js_syntax", "typescript_check"]], [["php"], ["php8_syntax"]], [["go"], ["go_vet", "godoc"]], [["bash", "sh", "dash", "ksh"], ["shellcheck"]], + [["wat"], ["wat_syntax_check"]], [["wasm"], ["wasm_validate", "wasm_objdump"]], [["pdf"], ["pdf2txt"]], [["html", "htm"], ["html_syntax", "html2text", "elinks"]], @@ -78,6 +80,18 @@ tools_for_extensions = [ has_color = true timeout = 60 +[black] + dependencies = ["black"] + url = "https://github.com/psf/black" + command = "black --check --diff --color" + has_color = true + +[isort] + dependencies = ["python3-isort", "python3-colorama"] + url = "https://pycqa.github.io/isort/" + command = "isort --check-only --diff --color" + has_color = true + [perl_syntax] dependencies = ["perl"] url = "https://en.wikipedia.org/wiki/Perl" @@ -223,6 +237,24 @@ tools_for_extensions = [ url = "http://www.ruby-lang.org/" command = "ruby -c" +[rubocop] + dependencies = ["rubocop"] + url = "https://rubocop.org/" + command = "rubocop --color --fail-level autocorrect --display-style-guide" + has_color = true + +[rustfmt] + dependencies = ["rustfmt"] + url = "https://github.com/rust-lang/rustfmt" + command = "cargo fmt --check -- --color always" + has_color = true + +[clippy] + dependencies = ["rust-clippy"] + url = "https://github.com/rust-lang/rust-clippy" + command = "rustc -Awarnings -Dclippy::all" + has_color = true + [lua_syntax] dependencies = ["lua5.3"] url = "http://www.lua.org" @@ -233,6 +265,12 @@ tools_for_extensions = [ url = "http://nodejs.org/" command = "node --check" +[typescript_check] + dependencies = ["node-typescript"] + url = "https://www.typescriptlang.org/" + command = "tsc --pretty --noEmit" + has_color = true + [lua_check] dependencies = ["lua-check"] url = "https://github.com/mpeterv/luacheck" @@ -244,6 +282,11 @@ tools_for_extensions = [ url = "https://github.com/golang/go" command = "go vet" +[wat_syntax_check] + dependencies = ["wabt"] + url = "https://github.com/WebAssembly/wabt" + command = "wat2wasm --check-only" + [wasm_validate] dependencies = ["wabt"] url = "https://github.com/WebAssembly/wabt" From 6ec4f958ff84288b712de46568ee8b64f807ff9d Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Mon, 9 Jun 2025 15:53:06 +1000 Subject: [PATCH 12/31] Update version to v2025.06.09 --- README.md | 4 ++-- eris/__init__.py | 2 +- fill3/fill3/__init__.py | 2 +- fill3/pyproject.toml | 2 +- lscolors/lscolors/__init__.py | 2 +- lscolors/pyproject.toml | 2 +- packaging/make-readme.py | 4 ++-- pyproject.toml | 8 ++++---- termstr/pyproject.toml | 2 +- termstr/termstr/__init__.py | 2 +- uv.lock | 8 ++++---- 11 files changed, 19 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 8686f1d..85c54a0 100644 --- a/README.md +++ b/README.md @@ -12,11 +12,11 @@ Eris can be installed by pipx or [uv](https://docs.astral.sh/uv/getting-started/ To install with pipx: - pipx install git+https://gitlab.com/ahamilton/eris@v2025.06.07 + pipx install git+https://gitlab.com/ahamilton/eris@v2025.06.09 or to install with uv: - uv tool install git+https://gitlab.com/ahamilton/eris@v2025.06.07 + uv tool install git+https://gitlab.com/ahamilton/eris@v2025.06.09 Then use eris to install all the tools it uses: diff --git a/eris/__init__.py b/eris/__init__.py index f47acec..dc26c70 100644 --- a/eris/__init__.py +++ b/eris/__init__.py @@ -1,3 +1,3 @@ -__version__ = "v2025.06.07" +__version__ = "v2025.06.09" diff --git a/fill3/fill3/__init__.py b/fill3/fill3/__init__.py index cb8e67c..09e8b96 100755 --- a/fill3/fill3/__init__.py +++ b/fill3/fill3/__init__.py @@ -15,7 +15,7 @@ import fill3.terminal as terminal import termstr -__version__ = "v2025.06.07" +__version__ = "v2025.06.09" ########################## diff --git a/fill3/pyproject.toml b/fill3/pyproject.toml index 2316d21..428004d 100644 --- a/fill3/pyproject.toml +++ b/fill3/pyproject.toml @@ -2,7 +2,7 @@ tool.uv.package = true [project] name = "fill3" -version = "v2025.06.07" +version = "v2025.06.09" description = "Fill3 provides basic widgets for a tui." authors = [ { name = "Andrew Hamilton", email = "and_hamilton@yahoo.com" }, diff --git a/lscolors/lscolors/__init__.py b/lscolors/lscolors/__init__.py index 581bfdb..5d583dd 100644 --- a/lscolors/lscolors/__init__.py +++ b/lscolors/lscolors/__init__.py @@ -15,7 +15,7 @@ import lscolors import termstr -__version__ = "v2025.06.07" +__version__ = "v2025.06.09" FILE_KEY = "fi" diff --git a/lscolors/pyproject.toml b/lscolors/pyproject.toml index a20b3ea..e727251 100644 --- a/lscolors/pyproject.toml +++ b/lscolors/pyproject.toml @@ -7,7 +7,7 @@ allow-direct-references = true [project] name = "lscolors" -version = "v2025.06.07" +version = "v2025.06.09" description = "Give coloring for file types as in the ls command." authors = [ { name = "Andrew Hamilton", email = "and_hamilton@yahoo.com" }, diff --git a/packaging/make-readme.py b/packaging/make-readme.py index a938099..69a1872 100755 --- a/packaging/make-readme.py +++ b/packaging/make-readme.py @@ -28,11 +28,11 @@ Eris can be installed by pipx or [uv](https://docs.astral.sh/uv/getting-started/ To install with pipx: - pipx install git+https://gitlab.com/ahamilton/eris@v2025.06.07 + pipx install git+https://gitlab.com/ahamilton/eris@v2025.06.09 or to install with uv: - uv tool install git+https://gitlab.com/ahamilton/eris@v2025.06.07 + uv tool install git+https://gitlab.com/ahamilton/eris@v2025.06.09 Then use eris to install all the tools it uses: diff --git a/pyproject.toml b/pyproject.toml index dd0a5e5..59e8b9b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ tool.uv.package = true [project] name = "eris" -version = "v2025.06.07" +version = "v2025.06.09" description = "Eris maintains an up-to-date set of reports for every file in a codebase." readme = "README.md" authors = [ @@ -11,13 +11,13 @@ authors = [ requires-python = ">=3.11" dependencies = [ "docopt-ng==0.9.0", - "fill3 @ git+https://gitlab.com/ahamilton/eris@v2025.06.07#subdirectory=fill3", - "lscolors @ git+https://gitlab.com/ahamilton/eris@v2025.06.07#subdirectory=lscolors", + "fill3 @ git+https://gitlab.com/ahamilton/eris@v2025.06.09#subdirectory=fill3", + "lscolors @ git+https://gitlab.com/ahamilton/eris@v2025.06.09#subdirectory=lscolors", "pexpect==4.9.0", "pillow==11.2.1", "pygments==2.19.1", "pyinotify-elephant-fork==0.0.1", - "termstr @ git+https://gitlab.com/ahamilton/eris@v2025.06.07#subdirectory=termstr", + "termstr @ git+https://gitlab.com/ahamilton/eris@v2025.06.09#subdirectory=termstr", ] [tool.uv.sources] diff --git a/termstr/pyproject.toml b/termstr/pyproject.toml index 73a2840..4f50147 100644 --- a/termstr/pyproject.toml +++ b/termstr/pyproject.toml @@ -2,7 +2,7 @@ tool.uv.package = true [project] name = "termstr" -version = "v2025.06.07" +version = "v2025.06.09" description = "Termstr provides strings with extra terminal styling." authors = [ { name = "Andrew Hamilton", email = "and_hamilton@yahoo.com" }, diff --git a/termstr/termstr/__init__.py b/termstr/termstr/__init__.py index 432ecd3..e730338 100644 --- a/termstr/termstr/__init__.py +++ b/termstr/termstr/__init__.py @@ -10,7 +10,7 @@ import weakref import cwcwidth -__version__ = "v2025.06.07" +__version__ = "v2025.06.09" ESC = "\x1b" diff --git a/uv.lock b/uv.lock index fec26b8..32b2d33 100644 --- a/uv.lock +++ b/uv.lock @@ -27,7 +27,7 @@ wheels = [ [[package]] name = "eris" -version = "2025.6.7" +version = "2025.6.9" source = { editable = "." } dependencies = [ { name = "docopt-ng" }, @@ -54,7 +54,7 @@ requires-dist = [ [[package]] name = "fill3" -version = "2025.6.7" +version = "2025.6.9" source = { editable = "fill3" } dependencies = [ { name = "termstr" }, @@ -65,7 +65,7 @@ requires-dist = [{ name = "termstr", editable = "termstr" }] [[package]] name = "lscolors" -version = "2025.6.7" +version = "2025.6.9" source = { editable = "lscolors" } dependencies = [ { name = "termstr" }, @@ -171,7 +171,7 @@ sdist = { url = "https://files.pythonhosted.org/packages/d6/b4/b44fccc7040b01449 [[package]] name = "termstr" -version = "2025.6.7" +version = "2025.6.9" source = { editable = "termstr" } dependencies = [ { name = "cwcwidth" }, From ad74f48679f34748ca3fbff34e2f3b483548f1af Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Mon, 9 Jun 2025 17:08:07 +1000 Subject: [PATCH 13/31] tools: Fix python isort - isort is not in the path - Run in the system python with /usr/bin/python3 -m isort --- eris/tools.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eris/tools.toml b/eris/tools.toml index a8b8621..24deb72 100644 --- a/eris/tools.toml +++ b/eris/tools.toml @@ -89,7 +89,7 @@ tools_for_extensions = [ [isort] dependencies = ["python3-isort", "python3-colorama"] url = "https://pycqa.github.io/isort/" - command = "isort --check-only --diff --color" + command = "/usr/bin/python3 -m isort --check-only --diff --color" has_color = true [perl_syntax] From 1a31aa838e5cb2b5fad43ab5eeb8119e8efa8e76 Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Mon, 9 Jun 2025 17:50:57 +1000 Subject: [PATCH 14/31] packaging: Python tools use the system python not venv python --- eris/tools.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/eris/tools.py b/eris/tools.py index 08a3be4..a292637 100755 --- a/eris/tools.py +++ b/eris/tools.py @@ -35,8 +35,7 @@ import tomllib import eris -PYTHON_VERSION = "3.11" -PYTHON_EXECUTABLE = "python" + PYTHON_VERSION +PYTHON_EXECUTABLE = "/usr/bin/python3" CACHE_PATH = ".eris" @@ -654,13 +653,16 @@ def splitext(path): return root, ext +def python_has_module(python_path, module_name): + one_liner = ("import importlib, sys; " + f"sys.exit(importlib.util.find_spec('{module_name}') is not None)") + return bool(subprocess.call([python_path, "-c", one_liner])) + + @functools.cache def is_tool_available(tool): if (hasattr(tool, "command") and tool.command.startswith(f"{PYTHON_EXECUTABLE} -m ")): - try: - return importlib.util.find_spec(tool.command.split()[2]) is not None - except ModuleNotFoundError: - return False + return python_has_module(PYTHON_EXECUTABLE, tool.command.split()[2]) try: return all(shutil.which(executable) for executable in tool.executables) except AttributeError: From 410666e0b064f3671824a4e673748cf93ecc2bcc Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Mon, 9 Jun 2025 18:12:47 +1000 Subject: [PATCH 15/31] tools: Get tools tests passing - 7zz is now 7z - Update golden files for different shade of grey --- eris/tools.toml | 2 +- tests/golden-files/results/contents-hi3_py | 2 +- tests/golden-files/results/python_gut-hi3_py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eris/tools.toml b/eris/tools.toml index 24deb72..1ac39c0 100644 --- a/eris/tools.toml +++ b/eris/tools.toml @@ -156,7 +156,7 @@ tools_for_extensions = [ [7z] dependencies = ["7zip"] url = "http://p7zip.sourceforge.net/" - command = "7zz l" + command = "7z l" [unxz] dependencies = ["xz-utils"] diff --git a/tests/golden-files/results/contents-hi3_py b/tests/golden-files/results/contents-hi3_py index f8eb0b0..a4b5d4f 100644 --- a/tests/golden-files/results/contents-hi3_py +++ b/tests/golden-files/results/contents-hi3_py @@ -1,4 +1,4 @@     -def hi():  +def hi():   print("hi") \ No newline at end of file diff --git a/tests/golden-files/results/python_gut-hi3_py b/tests/golden-files/results/python_gut-hi3_py index 994b829..07e324f 100644 --- a/tests/golden-files/results/python_gut-hi3_py +++ b/tests/golden-files/results/python_gut-hi3_py @@ -1,3 +1,3 @@     -def hi(): \ No newline at end of file +def hi(): \ No newline at end of file From 2b5b7f7fe97bdb2e60488b39a728574e0bdbe33e Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Mon, 9 Jun 2025 18:18:52 +1000 Subject: [PATCH 16/31] tools: Drop fragile golden tests that work on x86 but not arm --- tests/tools_test.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tests/tools_test.py b/tests/tools_test.py index e708bf3..227475b 100755 --- a/tests/tools_test.py +++ b/tests/tools_test.py @@ -107,12 +107,6 @@ class ToolsTestCase(unittest.TestCase): def test_c_syntax_gcc(self): self._test_tool(tools.c_syntax_gcc, [("hello.c", tools.Status.ok)]) - def test_objdump_headers(self): - self._test_tool(tools.objdump_headers, [("rotatingtree.o", tools.Status.ok)]) - - def test_objdump_disassemble(self): - self._test_tool(tools.objdump_disassemble, [("rotatingtree.o", tools.Status.problem)]) - def test_readelf(self): self._test_tool(tools.readelf, [("rotatingtree.o", tools.Status.ok)]) From a78f53740a737d19dff92fe1457fecc9e8a39e38 Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Mon, 9 Jun 2025 22:39:07 +1000 Subject: [PATCH 17/31] tools: Document tools.toml - So that it can be understood in isolation by ai. --- eris/tools.toml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/eris/tools.toml b/eris/tools.toml index 1ac39c0..9bf91d9 100644 --- a/eris/tools.toml +++ b/eris/tools.toml @@ -1,5 +1,6 @@ - +# tools_for_extensions is a mapping that defines which tools are run on files of +# certain types. The tools are defined below. tools_for_extensions = [ [["py"], ["python_syntax", "python_unittests", "pytest", "pydoc", "mypy", "python_coverage", "pycodestyle", "pyflakes", @@ -43,6 +44,17 @@ tools_for_extensions = [ [["iso"], ["isoinfo"]], ] +# Now define all the tools. +# +# Each section defines a tool by these attributes: +# dependencies: A list of debian packages that need to be installed for the tool to run. +# url: Where the tool is documented. +# command: The shell command to run the tool. All tools must produce a text report given a +# file in the codebase. The file's path is added to the end of the command. +# All reports are ideally in color. All tools should return an error code of 0 iff +# there are no issues with the file. +# has_color: Is true if the command's output is in color. +# timeout: Some commands have a timeout if they can't be trusted to finish in a reasonable time. [python_syntax] dependencies = [] From 9962068019b4b87fced7990f6d03db3a22e3191c Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Tue, 10 Jun 2025 13:22:30 +1000 Subject: [PATCH 18/31] Page the output when listing all tools. --- eris/__main__.py | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/eris/__main__.py b/eris/__main__.py index ff9cbd5..033d777 100755 --- a/eris/__main__.py +++ b/eris/__main__.py @@ -1115,17 +1115,28 @@ def print_tool_info(): for extension in extensions: for tool in tools_: extensions_for_tool.setdefault(tool, {extension}).add(extension) + pager_process = None + if shutil.which("less"): + pager_process = subprocess.Popen(["less", "-RFEX"], + stdin=subprocess.PIPE, text=True) + output_file = pager_process.stdin + else: + output_file = sys.stdout for tool in sorted(tools.tools_all(), key=lambda t: t.__name__): print(termstr.TermStr(tool.__name__, is_bold=True) if tools.is_tool_available(tool) - else termstr.TermStr(tool.__name__, fg_color=termstr.Color.red) + " (not available)") + else termstr.TermStr(tool.__name__, fg_color=termstr.Color.red) + " (not available)" + , file=output_file) if hasattr(tool, "command"): - print(f"command: {tool.command} foo.{extensions[0]}") + print(f"command: {tool.command} foo.{extensions[0]}", file=output_file) else: - print("function:", "eris.tools." + tool.__name__) - print("url:", tool.url) + print("function:", "eris.tools." + tool.__name__, file=output_file) + print("url:", tool.url, file=output_file) extensions = list(extensions_for_tool.get(tool, {"*"})) - print("extensions:", ", ".join(extensions)) - print() + print("extensions:", ", ".join(extensions), file=output_file) + print("", file=output_file) + if pager_process is not None: + output_file.close() + pager_process.wait() def install_all_tools(): From 4c68e226bf1b0fbd3095bfe2a3d9fd8ef0ff3cae Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Tue, 10 Jun 2025 13:39:24 +1000 Subject: [PATCH 19/31] coding style: Redirect stdout to simplify multiple prints --- eris/__main__.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/eris/__main__.py b/eris/__main__.py index 033d777..b7ac7db 100755 --- a/eris/__main__.py +++ b/eris/__main__.py @@ -1122,18 +1122,18 @@ def print_tool_info(): output_file = pager_process.stdin else: output_file = sys.stdout - for tool in sorted(tools.tools_all(), key=lambda t: t.__name__): - print(termstr.TermStr(tool.__name__, is_bold=True) if tools.is_tool_available(tool) - else termstr.TermStr(tool.__name__, fg_color=termstr.Color.red) + " (not available)" - , file=output_file) - if hasattr(tool, "command"): - print(f"command: {tool.command} foo.{extensions[0]}", file=output_file) - else: - print("function:", "eris.tools." + tool.__name__, file=output_file) - print("url:", tool.url, file=output_file) - extensions = list(extensions_for_tool.get(tool, {"*"})) - print("extensions:", ", ".join(extensions), file=output_file) - print("", file=output_file) + with contextlib.redirect_stdout(output_file): + for tool in sorted(tools.tools_all(), key=lambda t: t.__name__): + print(termstr.TermStr(tool.__name__, is_bold=True) if tools.is_tool_available(tool) + else termstr.TermStr(tool.__name__, fg_color=termstr.Color.red) + " (not available)") + if hasattr(tool, "command"): + print(f"command: {tool.command} foo.{extensions[0]}") + else: + print("function:", "eris.tools." + tool.__name__) + print("url:", tool.url) + extensions = list(extensions_for_tool.get(tool, {"*"})) + print("extensions:", ", ".join(extensions)) + print("") if pager_process is not None: output_file.close() pager_process.wait() From ce224275e9fa1dbe5b612cbe587fe9da911999c9 Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Tue, 10 Jun 2025 16:57:44 +1000 Subject: [PATCH 20/31] coding style: Extract the paging code into its own context manager --- eris/__main__.py | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/eris/__main__.py b/eris/__main__.py index b7ac7db..32cc11a 100755 --- a/eris/__main__.py +++ b/eris/__main__.py @@ -1109,20 +1109,26 @@ def manage_cache(root_path): gitignore_file.write("*") +@contextlib.contextmanager +def print_to_pager(pager_command=["less", "-RFEX"]): + try: + pager_process = subprocess.Popen(pager_command, stdin=subprocess.PIPE, text=True) + except FileNotFoundError: + yield + else: + with contextlib.redirect_stdout(pager_process.stdin): + yield + pager_process.stdin.close() + pager_process.wait() + + def print_tool_info(): extensions_for_tool = {} for extensions, tools_ in tools.TOOLS_FOR_EXTENSIONS: for extension in extensions: for tool in tools_: extensions_for_tool.setdefault(tool, {extension}).add(extension) - pager_process = None - if shutil.which("less"): - pager_process = subprocess.Popen(["less", "-RFEX"], - stdin=subprocess.PIPE, text=True) - output_file = pager_process.stdin - else: - output_file = sys.stdout - with contextlib.redirect_stdout(output_file): + with print_to_pager(): for tool in sorted(tools.tools_all(), key=lambda t: t.__name__): print(termstr.TermStr(tool.__name__, is_bold=True) if tools.is_tool_available(tool) else termstr.TermStr(tool.__name__, fg_color=termstr.Color.red) + " (not available)") @@ -1134,9 +1140,6 @@ def print_tool_info(): extensions = list(extensions_for_tool.get(tool, {"*"})) print("extensions:", ", ".join(extensions)) print("") - if pager_process is not None: - output_file.close() - pager_process.wait() def install_all_tools(): From ff1f2c87602d9a5b58d20a29a68dfb5405b6d17e Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Tue, 10 Jun 2025 18:52:54 +1000 Subject: [PATCH 21/31] coding style: Can use the Popen context manager to close and wait --- eris/__main__.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/eris/__main__.py b/eris/__main__.py index 32cc11a..06d78f4 100755 --- a/eris/__main__.py +++ b/eris/__main__.py @@ -1112,14 +1112,11 @@ def manage_cache(root_path): @contextlib.contextmanager def print_to_pager(pager_command=["less", "-RFEX"]): try: - pager_process = subprocess.Popen(pager_command, stdin=subprocess.PIPE, text=True) + with subprocess.Popen(pager_command, stdin=subprocess.PIPE, text=True) as pager_process: + with contextlib.redirect_stdout(pager_process.stdin): + yield except FileNotFoundError: yield - else: - with contextlib.redirect_stdout(pager_process.stdin): - yield - pager_process.stdin.close() - pager_process.wait() def print_tool_info(): From 403e056802966e855357fb7378e4897e43cda70a Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Sat, 14 Jun 2025 09:06:23 +1000 Subject: [PATCH 22/31] Update version to v2025.06.14 --- README.md | 4 ++-- eris/__init__.py | 2 +- fill3/fill3/__init__.py | 2 +- fill3/pyproject.toml | 2 +- lscolors/lscolors/__init__.py | 2 +- lscolors/pyproject.toml | 2 +- packaging/make-readme.py | 4 ++-- pyproject.toml | 8 ++++---- termstr/pyproject.toml | 2 +- termstr/termstr/__init__.py | 2 +- uv.lock | 8 ++++---- 11 files changed, 19 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 85c54a0..949bed0 100644 --- a/README.md +++ b/README.md @@ -12,11 +12,11 @@ Eris can be installed by pipx or [uv](https://docs.astral.sh/uv/getting-started/ To install with pipx: - pipx install git+https://gitlab.com/ahamilton/eris@v2025.06.09 + pipx install git+https://gitlab.com/ahamilton/eris@v2025.06.14 or to install with uv: - uv tool install git+https://gitlab.com/ahamilton/eris@v2025.06.09 + uv tool install git+https://gitlab.com/ahamilton/eris@v2025.06.14 Then use eris to install all the tools it uses: diff --git a/eris/__init__.py b/eris/__init__.py index dc26c70..9d3e284 100644 --- a/eris/__init__.py +++ b/eris/__init__.py @@ -1,3 +1,3 @@ -__version__ = "v2025.06.09" +__version__ = "v2025.06.14" diff --git a/fill3/fill3/__init__.py b/fill3/fill3/__init__.py index 09e8b96..aaa424b 100755 --- a/fill3/fill3/__init__.py +++ b/fill3/fill3/__init__.py @@ -15,7 +15,7 @@ import fill3.terminal as terminal import termstr -__version__ = "v2025.06.09" +__version__ = "v2025.06.14" ########################## diff --git a/fill3/pyproject.toml b/fill3/pyproject.toml index 428004d..a48b613 100644 --- a/fill3/pyproject.toml +++ b/fill3/pyproject.toml @@ -2,7 +2,7 @@ tool.uv.package = true [project] name = "fill3" -version = "v2025.06.09" +version = "v2025.06.14" description = "Fill3 provides basic widgets for a tui." authors = [ { name = "Andrew Hamilton", email = "and_hamilton@yahoo.com" }, diff --git a/lscolors/lscolors/__init__.py b/lscolors/lscolors/__init__.py index 5d583dd..992fcfb 100644 --- a/lscolors/lscolors/__init__.py +++ b/lscolors/lscolors/__init__.py @@ -15,7 +15,7 @@ import lscolors import termstr -__version__ = "v2025.06.09" +__version__ = "v2025.06.14" FILE_KEY = "fi" diff --git a/lscolors/pyproject.toml b/lscolors/pyproject.toml index e727251..1095437 100644 --- a/lscolors/pyproject.toml +++ b/lscolors/pyproject.toml @@ -7,7 +7,7 @@ allow-direct-references = true [project] name = "lscolors" -version = "v2025.06.09" +version = "v2025.06.14" description = "Give coloring for file types as in the ls command." authors = [ { name = "Andrew Hamilton", email = "and_hamilton@yahoo.com" }, diff --git a/packaging/make-readme.py b/packaging/make-readme.py index 69a1872..17cd51c 100755 --- a/packaging/make-readme.py +++ b/packaging/make-readme.py @@ -28,11 +28,11 @@ Eris can be installed by pipx or [uv](https://docs.astral.sh/uv/getting-started/ To install with pipx: - pipx install git+https://gitlab.com/ahamilton/eris@v2025.06.09 + pipx install git+https://gitlab.com/ahamilton/eris@v2025.06.14 or to install with uv: - uv tool install git+https://gitlab.com/ahamilton/eris@v2025.06.09 + uv tool install git+https://gitlab.com/ahamilton/eris@v2025.06.14 Then use eris to install all the tools it uses: diff --git a/pyproject.toml b/pyproject.toml index 59e8b9b..f521003 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ tool.uv.package = true [project] name = "eris" -version = "v2025.06.09" +version = "v2025.06.14" description = "Eris maintains an up-to-date set of reports for every file in a codebase." readme = "README.md" authors = [ @@ -11,13 +11,13 @@ authors = [ requires-python = ">=3.11" dependencies = [ "docopt-ng==0.9.0", - "fill3 @ git+https://gitlab.com/ahamilton/eris@v2025.06.09#subdirectory=fill3", - "lscolors @ git+https://gitlab.com/ahamilton/eris@v2025.06.09#subdirectory=lscolors", + "fill3 @ git+https://gitlab.com/ahamilton/eris@v2025.06.14#subdirectory=fill3", + "lscolors @ git+https://gitlab.com/ahamilton/eris@v2025.06.14#subdirectory=lscolors", "pexpect==4.9.0", "pillow==11.2.1", "pygments==2.19.1", "pyinotify-elephant-fork==0.0.1", - "termstr @ git+https://gitlab.com/ahamilton/eris@v2025.06.09#subdirectory=termstr", + "termstr @ git+https://gitlab.com/ahamilton/eris@v2025.06.14#subdirectory=termstr", ] [tool.uv.sources] diff --git a/termstr/pyproject.toml b/termstr/pyproject.toml index 4f50147..8b8d999 100644 --- a/termstr/pyproject.toml +++ b/termstr/pyproject.toml @@ -2,7 +2,7 @@ tool.uv.package = true [project] name = "termstr" -version = "v2025.06.09" +version = "v2025.06.14" description = "Termstr provides strings with extra terminal styling." authors = [ { name = "Andrew Hamilton", email = "and_hamilton@yahoo.com" }, diff --git a/termstr/termstr/__init__.py b/termstr/termstr/__init__.py index e730338..c1300bd 100644 --- a/termstr/termstr/__init__.py +++ b/termstr/termstr/__init__.py @@ -10,7 +10,7 @@ import weakref import cwcwidth -__version__ = "v2025.06.09" +__version__ = "v2025.06.14" ESC = "\x1b" diff --git a/uv.lock b/uv.lock index 32b2d33..c1536e6 100644 --- a/uv.lock +++ b/uv.lock @@ -27,7 +27,7 @@ wheels = [ [[package]] name = "eris" -version = "2025.6.9" +version = "2025.6.14" source = { editable = "." } dependencies = [ { name = "docopt-ng" }, @@ -54,7 +54,7 @@ requires-dist = [ [[package]] name = "fill3" -version = "2025.6.9" +version = "2025.6.14" source = { editable = "fill3" } dependencies = [ { name = "termstr" }, @@ -65,7 +65,7 @@ requires-dist = [{ name = "termstr", editable = "termstr" }] [[package]] name = "lscolors" -version = "2025.6.9" +version = "2025.6.14" source = { editable = "lscolors" } dependencies = [ { name = "termstr" }, @@ -171,7 +171,7 @@ sdist = { url = "https://files.pythonhosted.org/packages/d6/b4/b44fccc7040b01449 [[package]] name = "termstr" -version = "2025.6.9" +version = "2025.6.14" source = { editable = "termstr" } dependencies = [ { name = "cwcwidth" }, From 99ed8efc43c944394f520972d3991467bf75ab42 Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Sat, 14 Jun 2025 11:29:15 +1000 Subject: [PATCH 23/31] Fix incorrect extension when listing tools --- eris/__main__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eris/__main__.py b/eris/__main__.py index 06d78f4..c46c9ae 100755 --- a/eris/__main__.py +++ b/eris/__main__.py @@ -1129,12 +1129,12 @@ def print_tool_info(): for tool in sorted(tools.tools_all(), key=lambda t: t.__name__): print(termstr.TermStr(tool.__name__, is_bold=True) if tools.is_tool_available(tool) else termstr.TermStr(tool.__name__, fg_color=termstr.Color.red) + " (not available)") + extensions = list(extensions_for_tool.get(tool, {"*"})) if hasattr(tool, "command"): print(f"command: {tool.command} foo.{extensions[0]}") else: print("function:", "eris.tools." + tool.__name__) print("url:", tool.url) - extensions = list(extensions_for_tool.get(tool, {"*"})) print("extensions:", ", ".join(extensions)) print("") From 754143b395bbf35918a2808998e851b36bce5c4c Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Sat, 21 Jun 2025 14:41:06 +1000 Subject: [PATCH 24/31] Add a patch command - Make it easy to apply the patches some tools produce. --- eris/__init__.py | 2 -- eris/__main__.py | 18 ++++++++++++++---- eris/tools.py | 3 ++- eris/tools.toml | 2 ++ 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/eris/__init__.py b/eris/__init__.py index 9d3e284..60fc7e5 100644 --- a/eris/__init__.py +++ b/eris/__init__.py @@ -1,3 +1 @@ - - __version__ = "v2025.06.14" diff --git a/eris/__main__.py b/eris/__main__.py index c46c9ae..21e7de7 100755 --- a/eris/__main__.py +++ b/eris/__main__.py @@ -88,6 +88,7 @@ KEYS_DOC = """Keys: R - Refresh all reports of the current tool. f - Resize the focused pane to the full screen. (toggle) o - Open the current file with xdg-open. + p - Patch the current file. (When viewing a patch from a tool) """ @@ -786,6 +787,15 @@ class Screen: in_green(f" at line {line_num}…")]) subprocess.Popen(f"{self.editor_command} +{line_num} {path}", shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + def patch_file(self): + result = self._summary.get_selection() + if hasattr(result.tool, "patch_command") and result.tool.patch_command is not None: + path = result.path + path_colored = lscolors.path_colored(path) + self._log.log_message([in_green("Patching file: "), path_colored]) + subprocess.run(f"{result.tool.patch_command} {path} | patch -p0", shell=True, + stdout=subprocess.PIPE, stderr=subprocess.PIPE) + subprocess.run(["touch", path]) def toggle_status_style(self): self._summary.toggle_status_style(self._log) @@ -915,7 +925,7 @@ class Screen: tools.STATUS_TO_TERMSTR[widget.status] + divider + "line " + str(y+1)) _STATUS_BAR = highlight_chars(" *help *quit *t*a*b:focus *turn *log *edit *next *sort" - " *refresh *fullscreen *open", Log._GREEN_STYLE) + " *refresh *fullscreen *open *patch", Log._GREEN_STYLE) @functools.cache def _get_partial_bar_chars(self, bar_transparency): @@ -963,9 +973,9 @@ class Screen: terminal.RIGHT: cursor_right, terminal.PAGE_DOWN: cursor_page_down, terminal.PAGE_UP: cursor_page_up, "s": toggle_order, terminal.HOME: cursor_home, terminal.END: cursor_end, "n": move_to_next_issue, "N": move_to_next_issue_of_tool, - "e": edit_file, "q": quit_, terminal.ESC: quit_, terminal.CTRL_C: quit_, - "r": refresh, "R": refresh_tool, "\t": toggle_focus, "f": toggle_fullscreen, - "o": xdg_open} + "e": edit_file, "p": patch_file, "q": quit_, terminal.ESC: quit_, + terminal.CTRL_C: quit_, "r": refresh, "R": refresh_tool, "\t": toggle_focus, + "f": toggle_fullscreen, "o": xdg_open} def setup_inotify(root_path, loop, on_filesystem_event, exclude_filter): diff --git a/eris/tools.py b/eris/tools.py index a292637..1daa6f4 100755 --- a/eris/tools.py +++ b/eris/tools.py @@ -437,7 +437,7 @@ def git_log(path): def make_tool_function(dependencies, command, url=None, error_status=None, - has_color=False, timeout=None): + has_color=False, timeout=None, patch_command=None): if url is None: url = dependencies[0] command_parts = command.split() @@ -448,6 +448,7 @@ def make_tool_function(dependencies, command, url=None, error_status=None, def func(path): return _run_command(command_parts + [path], error_status, has_color, timeout) func.command = command + func.patch_command = patch_command return func diff --git a/eris/tools.toml b/eris/tools.toml index 9bf91d9..0f61767 100644 --- a/eris/tools.toml +++ b/eris/tools.toml @@ -96,12 +96,14 @@ tools_for_extensions = [ dependencies = ["black"] url = "https://github.com/psf/black" command = "black --check --diff --color" + patch_command = "black --diff" has_color = true [isort] dependencies = ["python3-isort", "python3-colorama"] url = "https://pycqa.github.io/isort/" command = "/usr/bin/python3 -m isort --check-only --diff --color" + patch_command = "/usr/bin/python3 -m isort --diff" has_color = true [perl_syntax] From ac7c7010df5c3c41e81e0650eaf6fc63a98ed486 Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Sat, 21 Jun 2025 14:43:57 +1000 Subject: [PATCH 25/31] Update version to v2025.06.21 --- README.md | 4 ++-- eris/__init__.py | 2 +- fill3/fill3/__init__.py | 2 +- fill3/pyproject.toml | 2 +- lscolors/lscolors/__init__.py | 2 +- lscolors/pyproject.toml | 2 +- packaging/make-readme.py | 4 ++-- pyproject.toml | 8 ++++---- termstr/pyproject.toml | 2 +- termstr/termstr/__init__.py | 2 +- uv.lock | 8 ++++---- 11 files changed, 19 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 949bed0..d370231 100644 --- a/README.md +++ b/README.md @@ -12,11 +12,11 @@ Eris can be installed by pipx or [uv](https://docs.astral.sh/uv/getting-started/ To install with pipx: - pipx install git+https://gitlab.com/ahamilton/eris@v2025.06.14 + pipx install git+https://gitlab.com/ahamilton/eris@v2025.06.21 or to install with uv: - uv tool install git+https://gitlab.com/ahamilton/eris@v2025.06.14 + uv tool install git+https://gitlab.com/ahamilton/eris@v2025.06.21 Then use eris to install all the tools it uses: diff --git a/eris/__init__.py b/eris/__init__.py index 60fc7e5..28fc638 100644 --- a/eris/__init__.py +++ b/eris/__init__.py @@ -1 +1 @@ -__version__ = "v2025.06.14" +__version__ = "v2025.06.21" diff --git a/fill3/fill3/__init__.py b/fill3/fill3/__init__.py index aaa424b..b29c624 100755 --- a/fill3/fill3/__init__.py +++ b/fill3/fill3/__init__.py @@ -15,7 +15,7 @@ import fill3.terminal as terminal import termstr -__version__ = "v2025.06.14" +__version__ = "v2025.06.21" ########################## diff --git a/fill3/pyproject.toml b/fill3/pyproject.toml index a48b613..ba2a6ed 100644 --- a/fill3/pyproject.toml +++ b/fill3/pyproject.toml @@ -2,7 +2,7 @@ tool.uv.package = true [project] name = "fill3" -version = "v2025.06.14" +version = "v2025.06.21" description = "Fill3 provides basic widgets for a tui." authors = [ { name = "Andrew Hamilton", email = "and_hamilton@yahoo.com" }, diff --git a/lscolors/lscolors/__init__.py b/lscolors/lscolors/__init__.py index 992fcfb..3fbef6a 100644 --- a/lscolors/lscolors/__init__.py +++ b/lscolors/lscolors/__init__.py @@ -15,7 +15,7 @@ import lscolors import termstr -__version__ = "v2025.06.14" +__version__ = "v2025.06.21" FILE_KEY = "fi" diff --git a/lscolors/pyproject.toml b/lscolors/pyproject.toml index 1095437..676e8a7 100644 --- a/lscolors/pyproject.toml +++ b/lscolors/pyproject.toml @@ -7,7 +7,7 @@ allow-direct-references = true [project] name = "lscolors" -version = "v2025.06.14" +version = "v2025.06.21" description = "Give coloring for file types as in the ls command." authors = [ { name = "Andrew Hamilton", email = "and_hamilton@yahoo.com" }, diff --git a/packaging/make-readme.py b/packaging/make-readme.py index 17cd51c..597f826 100755 --- a/packaging/make-readme.py +++ b/packaging/make-readme.py @@ -28,11 +28,11 @@ Eris can be installed by pipx or [uv](https://docs.astral.sh/uv/getting-started/ To install with pipx: - pipx install git+https://gitlab.com/ahamilton/eris@v2025.06.14 + pipx install git+https://gitlab.com/ahamilton/eris@v2025.06.21 or to install with uv: - uv tool install git+https://gitlab.com/ahamilton/eris@v2025.06.14 + uv tool install git+https://gitlab.com/ahamilton/eris@v2025.06.21 Then use eris to install all the tools it uses: diff --git a/pyproject.toml b/pyproject.toml index f521003..d3731e8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ tool.uv.package = true [project] name = "eris" -version = "v2025.06.14" +version = "v2025.06.21" description = "Eris maintains an up-to-date set of reports for every file in a codebase." readme = "README.md" authors = [ @@ -11,13 +11,13 @@ authors = [ requires-python = ">=3.11" dependencies = [ "docopt-ng==0.9.0", - "fill3 @ git+https://gitlab.com/ahamilton/eris@v2025.06.14#subdirectory=fill3", - "lscolors @ git+https://gitlab.com/ahamilton/eris@v2025.06.14#subdirectory=lscolors", + "fill3 @ git+https://gitlab.com/ahamilton/eris@v2025.06.21#subdirectory=fill3", + "lscolors @ git+https://gitlab.com/ahamilton/eris@v2025.06.21#subdirectory=lscolors", "pexpect==4.9.0", "pillow==11.2.1", "pygments==2.19.1", "pyinotify-elephant-fork==0.0.1", - "termstr @ git+https://gitlab.com/ahamilton/eris@v2025.06.14#subdirectory=termstr", + "termstr @ git+https://gitlab.com/ahamilton/eris@v2025.06.21#subdirectory=termstr", ] [tool.uv.sources] diff --git a/termstr/pyproject.toml b/termstr/pyproject.toml index 8b8d999..01157fb 100644 --- a/termstr/pyproject.toml +++ b/termstr/pyproject.toml @@ -2,7 +2,7 @@ tool.uv.package = true [project] name = "termstr" -version = "v2025.06.14" +version = "v2025.06.21" description = "Termstr provides strings with extra terminal styling." authors = [ { name = "Andrew Hamilton", email = "and_hamilton@yahoo.com" }, diff --git a/termstr/termstr/__init__.py b/termstr/termstr/__init__.py index c1300bd..bae5cc7 100644 --- a/termstr/termstr/__init__.py +++ b/termstr/termstr/__init__.py @@ -10,7 +10,7 @@ import weakref import cwcwidth -__version__ = "v2025.06.14" +__version__ = "v2025.06.21" ESC = "\x1b" diff --git a/uv.lock b/uv.lock index c1536e6..fac5b3e 100644 --- a/uv.lock +++ b/uv.lock @@ -27,7 +27,7 @@ wheels = [ [[package]] name = "eris" -version = "2025.6.14" +version = "2025.6.21" source = { editable = "." } dependencies = [ { name = "docopt-ng" }, @@ -54,7 +54,7 @@ requires-dist = [ [[package]] name = "fill3" -version = "2025.6.14" +version = "2025.6.21" source = { editable = "fill3" } dependencies = [ { name = "termstr" }, @@ -65,7 +65,7 @@ requires-dist = [{ name = "termstr", editable = "termstr" }] [[package]] name = "lscolors" -version = "2025.6.14" +version = "2025.6.21" source = { editable = "lscolors" } dependencies = [ { name = "termstr" }, @@ -171,7 +171,7 @@ sdist = { url = "https://files.pythonhosted.org/packages/d6/b4/b44fccc7040b01449 [[package]] name = "termstr" -version = "2025.6.14" +version = "2025.6.21" source = { editable = "termstr" } dependencies = [ { name = "cwcwidth" }, From a8f3261ab872e7a8c2e5cd890dbf1b44a1dc7e07 Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Tue, 24 Jun 2025 18:33:01 +1000 Subject: [PATCH 26/31] tools: Fix isort - Isort's has patches containing absolute paths that don't apply. - Let isort apply the patch itself. - The patch_command can either do the patch or return a patch. --- eris/__main__.py | 2 +- eris/tools.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eris/__main__.py b/eris/__main__.py index 21e7de7..8332567 100755 --- a/eris/__main__.py +++ b/eris/__main__.py @@ -794,7 +794,7 @@ class Screen: path_colored = lscolors.path_colored(path) self._log.log_message([in_green("Patching file: "), path_colored]) subprocess.run(f"{result.tool.patch_command} {path} | patch -p0", shell=True, - stdout=subprocess.PIPE, stderr=subprocess.PIPE) + capture_output=True) subprocess.run(["touch", path]) def toggle_status_style(self): diff --git a/eris/tools.toml b/eris/tools.toml index 0f61767..546d7ed 100644 --- a/eris/tools.toml +++ b/eris/tools.toml @@ -103,7 +103,7 @@ tools_for_extensions = [ dependencies = ["python3-isort", "python3-colorama"] url = "https://pycqa.github.io/isort/" command = "/usr/bin/python3 -m isort --check-only --diff --color" - patch_command = "/usr/bin/python3 -m isort --diff" + patch_command = "/usr/bin/python3 -m isort --overwrite-in-place" has_color = true [perl_syntax] From 906b0510bb077187a438c041224a18db8c384b36 Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Tue, 24 Jun 2025 22:10:46 +1000 Subject: [PATCH 27/31] Add patch_command to the tool summary --- eris/__main__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eris/__main__.py b/eris/__main__.py index 8332567..0474f98 100755 --- a/eris/__main__.py +++ b/eris/__main__.py @@ -1144,6 +1144,8 @@ def print_tool_info(): print(f"command: {tool.command} foo.{extensions[0]}") else: print("function:", "eris.tools." + tool.__name__) + if hasattr(tool, "patch_command") and tool.patch_command is not None: + print(f"patch command: {tool.patch_command} foo.{extensions[0]}") print("url:", tool.url) print("extensions:", ", ".join(extensions)) print("") From 267a100b095fb29bbf92d4ef4c63cab191e88a5e Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Fri, 27 Jun 2025 23:02:57 +1000 Subject: [PATCH 28/31] tools: Add patch command to "git diff" - May as well let the changes be easily removed. --- eris/tools.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/eris/tools.toml b/eris/tools.toml index 546d7ed..a62aed8 100644 --- a/eris/tools.toml +++ b/eris/tools.toml @@ -128,6 +128,7 @@ tools_for_extensions = [ dependencies = ["git"] url = "https://git-scm.com/docs/git-diff" command = "git diff --exit-code" + patch_command = "git checkout" has_color = true [git_blame] From 327852af40bf1444fc243ca9246b3b150609a257 Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Fri, 27 Jun 2025 23:18:17 +1000 Subject: [PATCH 29/31] tools: Let rubocop do autocorrect patches --- eris/tools.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/eris/tools.toml b/eris/tools.toml index a62aed8..7d4306e 100644 --- a/eris/tools.toml +++ b/eris/tools.toml @@ -256,6 +256,7 @@ tools_for_extensions = [ dependencies = ["rubocop"] url = "https://rubocop.org/" command = "rubocop --color --fail-level autocorrect --display-style-guide" + patch_command = "rubocop --autocorrect" has_color = true [rustfmt] From 699f808951e39fa1326746b192d28f0cb7fe7d93 Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Fri, 11 Jul 2025 23:03:17 +1000 Subject: [PATCH 30/31] packaging: Just depend on ruby instead of ruby3.1 - Let debian bookworm and trixie both work. - Other distros are using ruby. --- eris/__main__.py | 11 +++++------ eris/tools.toml | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/eris/__main__.py b/eris/__main__.py index 0474f98..2190c89 100755 --- a/eris/__main__.py +++ b/eris/__main__.py @@ -1157,8 +1157,7 @@ def install_all_tools(): install_command = ["apt", "-y", "install"] # debian / ubuntu if "ID=fedora\n" in os_release_lines: tools_.remove("lua-check") - renames = {"lua5.3": "lua", "python3-bandit": "bandit", "ruby3.1": "ruby", - "xz-utils": "xz"} + renames = {"lua5.3": "lua", "python3-bandit": "bandit", "xz-utils": "xz"} tools_ = [renames.get(tool, tool) for tool in tools_] install_command = ["dnf", "-y", "install"] elif "ID=arch\n" in os_release_lines: @@ -1166,8 +1165,8 @@ def install_all_tools(): tools_.remove("python3-pdfminer") # pdf2txt is not in arch tools_.remove("perl-doc") # perldoc is in perl but not in the path tools_.remove("7zip") - renames = {"genisoimage": "cdrkit", "lua5.3": "lua", "ruby3.1": "ruby", "xz-utils": "xz", - "g++": "gcc", "golang-go": "go", "lua-check": "luacheck", "php-cli": "php", + renames = {"genisoimage": "cdrkit", "lua5.3": "lua", "xz-utils": "xz", "g++": "gcc", + "golang-go": "go", "lua-check": "luacheck", "php-cli": "php", "pylint": "python-pylint", "python3-bandit": "bandit", "python3-mypy": "mypy"} tools_ = [renames.get(tool, tool) for tool in tools_] tools_ = ["python-" + tool[len("python3-"):] if tool.startswith("python3-") else tool @@ -1176,8 +1175,8 @@ def install_all_tools(): elif "ID=alpine\n" in os_release_lines: tools_.remove("python3-bandit") tools_.remove("wabt") - renames = {"genisoimage": "cdrkit", "lua5.3": "lua", "ruby3.1": "ruby", "xz-utils": "xz", - "g++": "gcc", "golang-go": "go", "lua-check": "luacheck", "php-cli": "php", + renames = {"genisoimage": "cdrkit", "lua5.3": "lua", "xz-utils": "xz", "g++": "gcc", + "golang-go": "go", "lua-check": "luacheck", "php-cli": "php", "pylint": "py3-pylint", "tidy": "tidyhtml"} tools_ = [renames.get(tool, tool) for tool in tools_] tools_ = ["py3-" + tool[len("python3-"):] if tool.startswith("python3-") else tool diff --git a/eris/tools.toml b/eris/tools.toml index 7d4306e..06b624d 100644 --- a/eris/tools.toml +++ b/eris/tools.toml @@ -248,7 +248,7 @@ tools_for_extensions = [ command = "cppcheck --error-exitcode=1" [ruby_syntax] - dependencies = ["ruby3.1"] + dependencies = ["ruby"] url = "http://www.ruby-lang.org/" command = "ruby -c" From 9e24f7cb85f853e69f20d9d43e80e3fd47ff7d27 Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Fri, 11 Jul 2025 23:05:37 +1000 Subject: [PATCH 31/31] Update version to v2025.07.11 --- README.md | 4 ++-- eris/__init__.py | 2 +- fill3/fill3/__init__.py | 2 +- fill3/pyproject.toml | 2 +- lscolors/lscolors/__init__.py | 2 +- lscolors/pyproject.toml | 2 +- packaging/make-readme.py | 4 ++-- pyproject.toml | 8 ++++---- termstr/pyproject.toml | 2 +- termstr/termstr/__init__.py | 2 +- uv.lock | 8 ++++---- 11 files changed, 19 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index d370231..af57efd 100644 --- a/README.md +++ b/README.md @@ -12,11 +12,11 @@ Eris can be installed by pipx or [uv](https://docs.astral.sh/uv/getting-started/ To install with pipx: - pipx install git+https://gitlab.com/ahamilton/eris@v2025.06.21 + pipx install git+https://gitlab.com/ahamilton/eris@v2025.07.11 or to install with uv: - uv tool install git+https://gitlab.com/ahamilton/eris@v2025.06.21 + uv tool install git+https://gitlab.com/ahamilton/eris@v2025.07.11 Then use eris to install all the tools it uses: diff --git a/eris/__init__.py b/eris/__init__.py index 28fc638..75276cc 100644 --- a/eris/__init__.py +++ b/eris/__init__.py @@ -1 +1 @@ -__version__ = "v2025.06.21" +__version__ = "v2025.07.11" diff --git a/fill3/fill3/__init__.py b/fill3/fill3/__init__.py index b29c624..3452145 100755 --- a/fill3/fill3/__init__.py +++ b/fill3/fill3/__init__.py @@ -15,7 +15,7 @@ import fill3.terminal as terminal import termstr -__version__ = "v2025.06.21" +__version__ = "v2025.07.11" ########################## diff --git a/fill3/pyproject.toml b/fill3/pyproject.toml index ba2a6ed..f792d5d 100644 --- a/fill3/pyproject.toml +++ b/fill3/pyproject.toml @@ -2,7 +2,7 @@ tool.uv.package = true [project] name = "fill3" -version = "v2025.06.21" +version = "v2025.07.11" description = "Fill3 provides basic widgets for a tui." authors = [ { name = "Andrew Hamilton", email = "and_hamilton@yahoo.com" }, diff --git a/lscolors/lscolors/__init__.py b/lscolors/lscolors/__init__.py index 3fbef6a..4c9785c 100644 --- a/lscolors/lscolors/__init__.py +++ b/lscolors/lscolors/__init__.py @@ -15,7 +15,7 @@ import lscolors import termstr -__version__ = "v2025.06.21" +__version__ = "v2025.07.11" FILE_KEY = "fi" diff --git a/lscolors/pyproject.toml b/lscolors/pyproject.toml index 676e8a7..86cd666 100644 --- a/lscolors/pyproject.toml +++ b/lscolors/pyproject.toml @@ -7,7 +7,7 @@ allow-direct-references = true [project] name = "lscolors" -version = "v2025.06.21" +version = "v2025.07.11" description = "Give coloring for file types as in the ls command." authors = [ { name = "Andrew Hamilton", email = "and_hamilton@yahoo.com" }, diff --git a/packaging/make-readme.py b/packaging/make-readme.py index 597f826..ba95c19 100755 --- a/packaging/make-readme.py +++ b/packaging/make-readme.py @@ -28,11 +28,11 @@ Eris can be installed by pipx or [uv](https://docs.astral.sh/uv/getting-started/ To install with pipx: - pipx install git+https://gitlab.com/ahamilton/eris@v2025.06.21 + pipx install git+https://gitlab.com/ahamilton/eris@v2025.07.11 or to install with uv: - uv tool install git+https://gitlab.com/ahamilton/eris@v2025.06.21 + uv tool install git+https://gitlab.com/ahamilton/eris@v2025.07.11 Then use eris to install all the tools it uses: diff --git a/pyproject.toml b/pyproject.toml index d3731e8..b0156f5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ tool.uv.package = true [project] name = "eris" -version = "v2025.06.21" +version = "v2025.07.11" description = "Eris maintains an up-to-date set of reports for every file in a codebase." readme = "README.md" authors = [ @@ -11,13 +11,13 @@ authors = [ requires-python = ">=3.11" dependencies = [ "docopt-ng==0.9.0", - "fill3 @ git+https://gitlab.com/ahamilton/eris@v2025.06.21#subdirectory=fill3", - "lscolors @ git+https://gitlab.com/ahamilton/eris@v2025.06.21#subdirectory=lscolors", + "fill3 @ git+https://gitlab.com/ahamilton/eris@v2025.07.11#subdirectory=fill3", + "lscolors @ git+https://gitlab.com/ahamilton/eris@v2025.07.11#subdirectory=lscolors", "pexpect==4.9.0", "pillow==11.2.1", "pygments==2.19.1", "pyinotify-elephant-fork==0.0.1", - "termstr @ git+https://gitlab.com/ahamilton/eris@v2025.06.21#subdirectory=termstr", + "termstr @ git+https://gitlab.com/ahamilton/eris@v2025.07.11#subdirectory=termstr", ] [tool.uv.sources] diff --git a/termstr/pyproject.toml b/termstr/pyproject.toml index 01157fb..c48307f 100644 --- a/termstr/pyproject.toml +++ b/termstr/pyproject.toml @@ -2,7 +2,7 @@ tool.uv.package = true [project] name = "termstr" -version = "v2025.06.21" +version = "v2025.07.11" description = "Termstr provides strings with extra terminal styling." authors = [ { name = "Andrew Hamilton", email = "and_hamilton@yahoo.com" }, diff --git a/termstr/termstr/__init__.py b/termstr/termstr/__init__.py index bae5cc7..4faf29e 100644 --- a/termstr/termstr/__init__.py +++ b/termstr/termstr/__init__.py @@ -10,7 +10,7 @@ import weakref import cwcwidth -__version__ = "v2025.06.21" +__version__ = "v2025.07.11" ESC = "\x1b" diff --git a/uv.lock b/uv.lock index fac5b3e..d548f02 100644 --- a/uv.lock +++ b/uv.lock @@ -27,7 +27,7 @@ wheels = [ [[package]] name = "eris" -version = "2025.6.21" +version = "2025.7.11" source = { editable = "." } dependencies = [ { name = "docopt-ng" }, @@ -54,7 +54,7 @@ requires-dist = [ [[package]] name = "fill3" -version = "2025.6.21" +version = "2025.7.11" source = { editable = "fill3" } dependencies = [ { name = "termstr" }, @@ -65,7 +65,7 @@ requires-dist = [{ name = "termstr", editable = "termstr" }] [[package]] name = "lscolors" -version = "2025.6.21" +version = "2025.7.11" source = { editable = "lscolors" } dependencies = [ { name = "termstr" }, @@ -171,7 +171,7 @@ sdist = { url = "https://files.pythonhosted.org/packages/d6/b4/b44fccc7040b01449 [[package]] name = "termstr" -version = "2025.6.21" +version = "2025.7.11" source = { editable = "termstr" } dependencies = [ { name = "cwcwidth" },