From cb4757491cbb2572e1b309a7e11d0c9fd8a095dd Mon Sep 17 00:00:00 2001 From: Daniele Nicolodi Date: Thu, 12 Jun 2025 22:41:35 +0200 Subject: [PATCH 1/4] pyproject: Use uniform quote characters --- pyproject.toml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 0ae3141..4082ba0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,16 +28,16 @@ classifiers = [ 'Topic :: Office/Business :: Financial :: Accounting', 'Topic :: Text Processing :: General', ] -requires-python = ">=3.7" +requires-python = '>=3.7' dependencies = [ - "beancount>=2.3.5", + 'beancount >=2.3.5', 'beautifulsoup4', 'chardet', 'click >8.0', - "deprecation>=2.1.0", # Note: 3.13 provides warnings.deprecated(). + 'deprecation >=2.1.0', # Python 3.13 provides warnings.deprecated(). 'lxml', - "petl", - "pytest", + 'petl', + 'pytest', 'python-magic >=0.4.12; sys_platform != "win32"', ] From b1b3e26abac10c944683fe065a2beee39a552013 Mon Sep 17 00:00:00 2001 From: Daniele Nicolodi Date: Thu, 12 Jun 2025 23:03:36 +0200 Subject: [PATCH 2/4] pyproject: Move petl to an optional dependency --- pyproject.toml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4082ba0..bc60825 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,11 +36,15 @@ dependencies = [ 'click >8.0', 'deprecation >=2.1.0', # Python 3.13 provides warnings.deprecated(). 'lxml', - 'petl', 'pytest', 'python-magic >=0.4.12; sys_platform != "win32"', ] +[project.optional-dependencies] +petl = [ + 'petl', +] + [project.urls] homepage = 'https://github.com/beancount/beangulp' issues = 'https://github.com/beancount/beangulp/issues' From c5b6ce5c701edeb9a05d4f983ee616f1d0be4fc4 Mon Sep 17 00:00:00 2001 From: Daniele Nicolodi Date: Thu, 12 Jun 2025 23:04:59 +0200 Subject: [PATCH 3/4] pyproject: Move pytest to a dependency group --- pyproject.toml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index bc60825..9595973 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,7 +36,6 @@ dependencies = [ 'click >8.0', 'deprecation >=2.1.0', # Python 3.13 provides warnings.deprecated(). 'lxml', - 'pytest', 'python-magic >=0.4.12; sys_platform != "win32"', ] @@ -49,6 +48,11 @@ petl = [ homepage = 'https://github.com/beancount/beangulp' issues = 'https://github.com/beancount/beangulp/issues' +[dependency-groups] +test = [ + 'pytest', +] + [tool.setuptools.packages] find = {} From 27d963cec3ac7eb2ef50f5bf6b99c819b3aeb5e7 Mon Sep 17 00:00:00 2001 From: Daniele Nicolodi Date: Thu, 12 Jun 2025 23:27:59 +0200 Subject: [PATCH 4/4] tests: Adapt to click version 8.2.0 and later This version of click changes the exit code from 0 to 2 when the help is shown if no argument is passed to a command group. --- beangulp/tests/testing.rst | 2 -- 1 file changed, 2 deletions(-) diff --git a/beangulp/tests/testing.rst b/beangulp/tests/testing.rst index 180ab11..fab6354 100644 --- a/beangulp/tests/testing.rst +++ b/beangulp/tests/testing.rst @@ -27,8 +27,6 @@ Tests Check the basics: >>> r = run() - >>> r.exit_code - 0 >>> print(r.output) Usage: beangulp [OPTIONS] COMMAND [ARGS]...