scripthelper 24.1__tar.gz → 25.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. {scripthelper-24.1 → scripthelper-25.1}/.gitignore +5 -1
  2. {scripthelper-24.1 → scripthelper-25.1}/CHANGELOG.md +8 -0
  3. {scripthelper-24.1 → scripthelper-25.1}/PKG-INFO +4 -8
  4. scripthelper-25.1/justfile +51 -0
  5. {scripthelper-24.1 → scripthelper-25.1}/pyproject.toml +14 -5
  6. {scripthelper-24.1 → scripthelper-25.1}/src/scripthelper/__init__.py +1 -0
  7. {scripthelper-24.1 → scripthelper-25.1}/test_examples.py +0 -22
  8. scripthelper-25.1/venv/.gitignore +1 -0
  9. scripthelper-25.1/venv/.tox-info.json +6 -0
  10. scripthelper-25.1/venv/CACHEDIR.TAG +1 -0
  11. scripthelper-25.1/venv/Scripts/python.exe +0 -0
  12. scripthelper-25.1/venv/Scripts/pythonw.exe +0 -0
  13. scripthelper-24.1/justfile +0 -65
  14. {scripthelper-24.1 → scripthelper-25.1}/LICENSE +0 -0
  15. {scripthelper-24.1 → scripthelper-25.1}/README.compiled.md +0 -0
  16. {scripthelper-24.1 → scripthelper-25.1}/README.md +0 -0
  17. {scripthelper-24.1 → scripthelper-25.1}/compile-readme.py +0 -0
  18. {scripthelper-24.1 → scripthelper-25.1}/example1.py +0 -0
  19. {scripthelper-24.1 → scripthelper-25.1}/example10.py +0 -0
  20. {scripthelper-24.1 → scripthelper-25.1}/example2.py +0 -0
  21. {scripthelper-24.1 → scripthelper-25.1}/example2b.py +0 -0
  22. {scripthelper-24.1 → scripthelper-25.1}/example3.py +0 -0
  23. {scripthelper-24.1 → scripthelper-25.1}/example4.py +0 -0
  24. {scripthelper-24.1 → scripthelper-25.1}/example4module.py +0 -0
  25. {scripthelper-24.1 → scripthelper-25.1}/example5.py +0 -0
  26. {scripthelper-24.1 → scripthelper-25.1}/example6.py +0 -0
  27. {scripthelper-24.1 → scripthelper-25.1}/example7.py +0 -0
  28. {scripthelper-24.1 → scripthelper-25.1}/example8.py +0 -0
  29. {scripthelper-24.1 → scripthelper-25.1}/example9.py +0 -0
  30. {scripthelper-24.1 → scripthelper-25.1}/mypy.ini +0 -0
  31. {scripthelper-24.1 → scripthelper-25.1}/src/scripthelper/py.typed +0 -0
@@ -1,4 +1,8 @@
1
- /.3.*.venv
1
+ /.tox/
2
+ /.venv/
3
+
4
+ # Always test with the latest version
5
+ uv.lock
2
6
 
3
7
  __pycache__
4
8
  .vscode
@@ -1,3 +1,11 @@
1
+ ## 25.1
2
+
3
+ - Add Python 3.14 support
4
+
5
+ ## 24.2
6
+
7
+ - Remove Python 3.8 support
8
+
1
9
  ## 24.1
2
10
 
3
11
  - Add Python 3.13 support
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: scripthelper
3
- Version: 24.1
3
+ Version: 25.1
4
4
  Summary: Helper module for creating simple Python scripts
5
5
  Project-URL: Homepage, https://github.com/presidento/scripthelper
6
6
  Project-URL: Changelog, https://github.com/presidento/scripthelper/blob/main/CHANGELOG.md
@@ -12,24 +12,20 @@ Classifier: Intended Audience :: Developers
12
12
  Classifier: Intended Audience :: System Administrators
13
13
  Classifier: License :: OSI Approved :: MIT License
14
14
  Classifier: Operating System :: OS Independent
15
- Classifier: Programming Language :: Python :: 3.8
16
15
  Classifier: Programming Language :: Python :: 3.9
17
16
  Classifier: Programming Language :: Python :: 3.10
18
17
  Classifier: Programming Language :: Python :: 3.11
19
18
  Classifier: Programming Language :: Python :: 3.12
20
19
  Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Programming Language :: Python :: 3.14
21
21
  Classifier: Topic :: Utilities
22
22
  Classifier: Typing :: Typed
23
+ Requires-Python: >=3.9
23
24
  Requires-Dist: coloredlogs>=10.0
24
25
  Requires-Dist: persistedstate>=23.6
25
26
  Requires-Dist: prettyprinter>=0.18.0
26
27
  Requires-Dist: stackprinter>=0.2.10
27
28
  Requires-Dist: tqdm>=4.31.1
28
- Provides-Extra: dev
29
- Requires-Dist: black; extra == 'dev'
30
- Requires-Dist: build; extra == 'dev'
31
- Requires-Dist: mypy; extra == 'dev'
32
- Requires-Dist: twine; extra == 'dev'
33
29
  Description-Content-Type: text/markdown
34
30
 
35
31
  # scripthelper
@@ -0,0 +1,51 @@
1
+ set shell := ["nu", "-c"]
2
+
3
+ # Bootstrap with all supported Python versions
4
+ bootstrap:
5
+ touch README.compiled.md
6
+ uv lock --upgrade
7
+ uv sync --all-groups
8
+ uv run tox run --notest
9
+
10
+ # Compile README.md
11
+ compile-readme:
12
+ just py compile-readme.py
13
+
14
+ # Run python command with the default Python version
15
+ py *ARGS:
16
+ uv run python -X dev {{ ARGS }}
17
+
18
+ # Run every check against source code
19
+ check: check-format mypy test-all
20
+
21
+ # Check source code formatting in case I forgot to format them
22
+ check-format:
23
+ just py -m black --check src *.py
24
+
25
+ # Format source code with black
26
+ format:
27
+ just py -m black src *.py
28
+
29
+ # Check static typing
30
+ mypy:
31
+ just py -m mypy src *.py
32
+
33
+ # Test with all supported Python versions
34
+ test-all:
35
+ uv run tox run
36
+
37
+ # Run the tests default Python version
38
+ test *ARGS:
39
+ just py test_examples.py {{ ARGS }}
40
+
41
+ # Remove compiled assets
42
+ clean:
43
+ rm build dist scripthelper.egg-info --force --recursive --verbose
44
+
45
+ # Build the whole project, create a release
46
+ build: clean bootstrap check compile-readme
47
+ uv build
48
+
49
+ # Upload the release to PyPi
50
+ upload:
51
+ uv upload
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "scripthelper"
3
- version = "24.1"
3
+ version = "25.1"
4
4
  description = "Helper module for creating simple Python scripts"
5
5
  readme = "README.compiled.md"
6
6
  license = {text = "MIT License"}
@@ -10,15 +10,17 @@ classifiers = [
10
10
  "Intended Audience :: System Administrators",
11
11
  "License :: OSI Approved :: MIT License",
12
12
  "Operating System :: OS Independent",
13
- "Programming Language :: Python :: 3.8",
14
13
  "Programming Language :: Python :: 3.9",
15
14
  "Programming Language :: Python :: 3.10",
16
15
  "Programming Language :: Python :: 3.11",
17
16
  "Programming Language :: Python :: 3.12",
18
17
  "Programming Language :: Python :: 3.13",
18
+ "Programming Language :: Python :: 3.14",
19
19
  "Topic :: Utilities",
20
20
  "Typing :: Typed",
21
21
  ]
22
+ requires-python = ">=3.9"
23
+
22
24
  dependencies = [
23
25
  "tqdm >= 4.31.1",
24
26
  "coloredlogs >= 10.0",
@@ -27,14 +29,21 @@ dependencies = [
27
29
  "persistedstate >= 23.6",
28
30
  ]
29
31
 
30
- [project.optional-dependencies]
32
+ [dependency-groups]
31
33
  dev = [
32
34
  "black",
33
- "build",
34
35
  "mypy",
35
- "twine",
36
+ "tox-uv>=1.25",
37
+ "tox",
38
+ "uv",
36
39
  ]
37
40
 
41
+ [tool.tox]
42
+ env_list = ["py314", "py313", "py312", "py311", "py310", "py39"]
43
+
44
+ [tool.tox.env_run_base]
45
+ commands = [["python", "test_examples.py"]]
46
+
38
47
 
39
48
  [[project.authors]]
40
49
  name = "Máté Farkas"
@@ -5,6 +5,7 @@ one file, and you can start working immediately.
5
5
 
6
6
  The output will be colored with support of multiple
7
7
  log levels, easy-to-add command line arguments, etc."""
8
+
8
9
  import argparse
9
10
  import inspect
10
11
  import logging
@@ -126,11 +126,6 @@ class TestExamples(unittest.TestCase):
126
126
  DEBUG example1 debug message
127
127
  """
128
128
  ).strip()
129
- expected = self.change_namespace_for_python_lte_38(
130
- expected,
131
- "DEBUG example1 Arguments: Namespace(colors=None, disable_traceback_variables=False, quiet=None, verbose=2)",
132
- )
133
-
134
129
  self.assert_output("example1.py -vv", expected)
135
130
 
136
131
  def test_example1_with_3_verbose(self):
@@ -146,11 +141,6 @@ class TestExamples(unittest.TestCase):
146
141
  SPAM example1 spam message
147
142
  """
148
143
  ).strip()
149
- expected = self.change_namespace_for_python_lte_38(
150
- expected,
151
- "DEBUG example1 Arguments: Namespace(colors=None, disable_traceback_variables=False, quiet=None, verbose=3)",
152
- )
153
-
154
144
  self.assert_output("example1.py -vvv", expected)
155
145
 
156
146
  def test_example1_with_3_long_verbose(self):
@@ -166,10 +156,6 @@ class TestExamples(unittest.TestCase):
166
156
  SPAM example1 spam message
167
157
  """
168
158
  ).strip()
169
- expected = self.change_namespace_for_python_lte_38(
170
- expected,
171
- "DEBUG example1 Arguments: Namespace(colors=None, disable_traceback_variables=False, quiet=None, verbose=3)",
172
- )
173
159
  self.assert_output("example1.py --verbose --verbose --verbose", expected)
174
160
 
175
161
  def test_example2_without_arguments(self):
@@ -304,14 +290,6 @@ class TestExamples(unittest.TestCase):
304
290
  ),
305
291
  )
306
292
 
307
- @staticmethod
308
- def change_namespace_for_python_lte_38(original, replacement):
309
- if sys.version_info.minor <= 8:
310
- lines = original.splitlines()
311
- lines[0] = replacement
312
- return "\n".join(lines)
313
- return original
314
-
315
293
  def test_example10(self):
316
294
  self.assert_output("example10.py", "WARNING example10 Item #12 has some errors")
317
295
 
@@ -0,0 +1 @@
1
+ *
@@ -0,0 +1,6 @@
1
+ {
2
+ "ToxEnv": {
3
+ "name": "py",
4
+ "type": "UvVenvRunner"
5
+ }
6
+ }
@@ -0,0 +1 @@
1
+ Signature: 8a477f597d28d172789f06886806bc55
@@ -1,65 +0,0 @@
1
- set shell := ["nu", "-c"]
2
-
3
- DEFAULT_VERSION := "3.8"
4
- SUPPORTED_VERSIONS := "['3.8' '3.9' '3.10' '3.11' '3.12' '3.13']"
5
- PYTHON_EXECUTABLE := if os_family() == "windows" { "Scripts/python.exe" } else { "bin/python3" }
6
- SYSTEM_PYTHON_PREFIX := if os_family() == "windows" { "py -" } else { "python" }
7
-
8
- # Bootstrap with all supported Python versions
9
- bootstrap:
10
- touch README.compiled.md
11
- for version in {{ SUPPORTED_VERSIONS }} { just bootstrap-with $version }
12
- just py -m pip install .[dev] --quiet --upgrade --upgrade-strategy eager
13
-
14
- # Set up Python environment with specified Python version
15
- bootstrap-with VERSION:
16
- if not (".{{ VERSION }}.{{ os() }}.venv" | path exists) { {{ SYSTEM_PYTHON_PREFIX }}{{ VERSION }} -m venv .{{ VERSION }}.{{ os() }}.venv }
17
- just python {{ VERSION }} -m pip install pip --quiet --upgrade
18
- just python {{ VERSION }} -m pip install -e . --upgrade --upgrade-strategy eager
19
-
20
- # Compile README.md
21
- compile-readme:
22
- just py compile-readme.py
23
-
24
- # Run a specific Python interpreter
25
- python VERSION *ARGS:
26
- @^".{{ VERSION }}.{{ os() }}.venv/{{ PYTHON_EXECUTABLE }}" -X dev {{ ARGS }}
27
-
28
- # Run python command with the default Python version
29
- py *ARGS:
30
- @just python {{DEFAULT_VERSION }} {{ ARGS }}
31
-
32
- # Run every check against source code
33
- check: check-format mypy test
34
-
35
- # Check source code formatting in case I forgot to format them
36
- check-format:
37
- just py -m black --check src *.py
38
-
39
- # Format source code with black
40
- format:
41
- just py -m black src *.py
42
-
43
- # Check static typing
44
- mypy:
45
- just py -m mypy src *.py
46
-
47
- # Test with all supported Python versions
48
- test:
49
- for version in {{ SUPPORTED_VERSIONS }} { just test-with $version }
50
-
51
- # Run the tests with specified Python version
52
- test-with VERSION *ARGS:
53
- just python {{ VERSION }} test_examples.py {{ ARGS }}
54
-
55
- # Remove compiled assets
56
- clean:
57
- rm build dist scripthelper.egg-info --force --recursive --verbose
58
-
59
- # Build the whole project, create a release
60
- build: clean bootstrap check compile-readme
61
- just py -m build
62
-
63
- # Upload the release to PyPi
64
- upload:
65
- just py -m twine upload dist/*
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes