nmk-python 1.10.1__py3-none-any.whl → 1.10.3__py3-none-any.whl
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.
- nmk_python/build.yml +2 -2
- nmk_python/ruff.yml +80 -82
- nmk_python/tests.py +6 -2
- {nmk_python-1.10.1.dist-info → nmk_python-1.10.3.dist-info}/METADATA +3 -2
- {nmk_python-1.10.1.dist-info → nmk_python-1.10.3.dist-info}/RECORD +9 -9
- {nmk_python-1.10.1.dist-info → nmk_python-1.10.3.dist-info}/WHEEL +1 -1
- {nmk_python-1.10.1.dist-info → nmk_python-1.10.3.dist-info}/entry_points.txt +0 -0
- {nmk_python-1.10.1.dist-info → nmk_python-1.10.3.dist-info}/licenses/LICENSE +0 -0
- {nmk_python-1.10.1.dist-info → nmk_python-1.10.3.dist-info}/top_level.txt +0 -0
nmk_python/build.yml
CHANGED
|
@@ -117,7 +117,7 @@ tasks:
|
|
|
117
117
|
- py.project
|
|
118
118
|
- py.format
|
|
119
119
|
- py.analyze
|
|
120
|
-
appendToDeps: build
|
|
120
|
+
appendToDeps: build.compile
|
|
121
121
|
if: ${pythonSrcFiles} # Only if python source files are found
|
|
122
122
|
output:
|
|
123
123
|
- ${pythonEditableStamp}
|
|
@@ -131,7 +131,7 @@ tasks:
|
|
|
131
131
|
emoji: ":snake:.:link:"
|
|
132
132
|
deps:
|
|
133
133
|
- py.editable
|
|
134
|
-
appendToDeps: build
|
|
134
|
+
appendToDeps: build.compile
|
|
135
135
|
if: ${pythonSrcFiles} # Only if python source files are found
|
|
136
136
|
output:
|
|
137
137
|
- ${pythonDepsMetadata}
|
nmk_python/ruff.yml
CHANGED
|
@@ -1,93 +1,91 @@
|
|
|
1
1
|
config:
|
|
2
|
+
# Max line length
|
|
3
|
+
pythonLineLength: 160
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
+
# Add project file fragment for ruff config
|
|
6
|
+
pythonProjectFileFragments:
|
|
7
|
+
- ${BASEDIR}/templates/ruff.toml.jinja
|
|
5
8
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
# Stamp files for ruff execution
|
|
10
|
+
pythonRuffFormatStamp: ${outputDir}/.ruff-format
|
|
11
|
+
pythonRuffFixStamp: ${outputDir}/.ruff-fix
|
|
12
|
+
pythonRuffCheckStamp: ${outputDir}/.ruff-check
|
|
9
13
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
+
# Extra arguments for ruff command lines
|
|
15
|
+
pythonRuffCommonExtraArgs: ""
|
|
16
|
+
pythonRuffFormatExtraArgs: ""
|
|
17
|
+
pythonRuffFixExtraArgs: ""
|
|
18
|
+
pythonRuffCheckExtraArgs: ""
|
|
14
19
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
+
# Auto-fix rules
|
|
21
|
+
pythonAutoFixRules: ["I"] # Default: only fix imports
|
|
22
|
+
pythonAutoFixJoinedRules:
|
|
23
|
+
__resolver__: nmk_python.ruff.JoinedRulesResolver
|
|
24
|
+
params:
|
|
25
|
+
rules:
|
|
26
|
+
- ${pythonAutoFixRules}
|
|
20
27
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
params:
|
|
26
|
-
rules:
|
|
27
|
-
- ${pythonAutoFixRules}
|
|
28
|
+
# Ignored rules
|
|
29
|
+
pythonIgnoredRules:
|
|
30
|
+
- E203 # space before ":"; sometimes formatting with black introduces this kind of space in slice expressions
|
|
31
|
+
- E501 # line length; we're working with lines wider than the recommended 79 length
|
|
28
32
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
- E501 # line length; we're working with lines wider than the recommended 79 length
|
|
33
|
-
|
|
34
|
-
# Require VSCode specific extension for ruff analysis
|
|
35
|
-
vscodeExtensionsNames:
|
|
36
|
-
- charliermarsh.ruff
|
|
33
|
+
# Require VSCode specific extension for ruff analysis
|
|
34
|
+
vscodeExtensionsNames:
|
|
35
|
+
- charliermarsh.ruff
|
|
37
36
|
|
|
38
37
|
tasks:
|
|
38
|
+
# Python source code format with ruff
|
|
39
|
+
py.format:
|
|
40
|
+
description: Format python code
|
|
41
|
+
emoji: ":snake:.:lipstick:"
|
|
42
|
+
deps:
|
|
43
|
+
- out
|
|
44
|
+
- py.project
|
|
45
|
+
appendToDeps: build.preprocess
|
|
46
|
+
if: ${pythonSrcFiles} # Only if python source files are found
|
|
47
|
+
output:
|
|
48
|
+
- ${pythonRuffFormatStamp}
|
|
49
|
+
input:
|
|
50
|
+
- ${pythonProjectFile}
|
|
51
|
+
- ${pythonSrcFiles}
|
|
52
|
+
builder: nmk_python.ruff.RuffBuilder
|
|
53
|
+
params:
|
|
54
|
+
src_folders: ${pythonSrcFolders}
|
|
55
|
+
command: format ${pythonRuffCommonExtraArgs} ${pythonRuffFormatExtraArgs}
|
|
39
56
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
command: format ${pythonRuffCommonExtraArgs} ${pythonRuffFormatExtraArgs}
|
|
58
|
-
|
|
59
|
-
# Python source code fix with ruff
|
|
60
|
-
py.fix:
|
|
61
|
-
description: Fix python code
|
|
62
|
-
emoji: ":snake:.:wrench:"
|
|
63
|
-
deps:
|
|
64
|
-
- py.format
|
|
65
|
-
appendToDeps: build
|
|
66
|
-
if: ${pythonSrcFiles} # Only if python source files are found
|
|
67
|
-
output:
|
|
68
|
-
- ${pythonRuffFixStamp}
|
|
69
|
-
input:
|
|
70
|
-
- ${pythonProjectFile}
|
|
71
|
-
- ${pythonSrcFiles}
|
|
72
|
-
builder: nmk_python.ruff.RuffBuilder
|
|
73
|
-
params:
|
|
74
|
-
src_folders: ${pythonSrcFolders}
|
|
75
|
-
command: check --fix-only --select ${pythonAutoFixJoinedRules} ${pythonRuffCommonExtraArgs} ${pythonRuffFixExtraArgs}
|
|
57
|
+
# Python source code fix with ruff
|
|
58
|
+
py.fix:
|
|
59
|
+
description: Fix python code
|
|
60
|
+
emoji: ":snake:.:wrench:"
|
|
61
|
+
deps:
|
|
62
|
+
- py.format
|
|
63
|
+
appendToDeps: build.preprocess
|
|
64
|
+
if: ${pythonSrcFiles} # Only if python source files are found
|
|
65
|
+
output:
|
|
66
|
+
- ${pythonRuffFixStamp}
|
|
67
|
+
input:
|
|
68
|
+
- ${pythonProjectFile}
|
|
69
|
+
- ${pythonSrcFiles}
|
|
70
|
+
builder: nmk_python.ruff.RuffBuilder
|
|
71
|
+
params:
|
|
72
|
+
src_folders: ${pythonSrcFolders}
|
|
73
|
+
command: check --fix-only --select ${pythonAutoFixJoinedRules} ${pythonRuffCommonExtraArgs} ${pythonRuffFixExtraArgs}
|
|
76
74
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
75
|
+
# Python source code analysis with ruff
|
|
76
|
+
py.analyze:
|
|
77
|
+
description: Analyze python code
|
|
78
|
+
emoji: ":snake:.:eye: "
|
|
79
|
+
deps:
|
|
80
|
+
- py.fix
|
|
81
|
+
appendToDeps: build.preprocess
|
|
82
|
+
if: ${pythonSrcFiles} # Only if python source files are found
|
|
83
|
+
output:
|
|
84
|
+
- ${pythonRuffCheckStamp}
|
|
85
|
+
input:
|
|
86
|
+
- ${pythonProjectFile}
|
|
87
|
+
- ${pythonSrcFiles}
|
|
88
|
+
builder: nmk_python.ruff.RuffBuilder
|
|
89
|
+
params:
|
|
90
|
+
src_folders: ${pythonSrcFolders}
|
|
91
|
+
command: check ${pythonRuffCommonExtraArgs} ${pythonRuffCheckExtraArgs}
|
nmk_python/tests.py
CHANGED
|
@@ -34,13 +34,17 @@ class PytestBuilder(NmkTaskBuilder):
|
|
|
34
34
|
# Compute extra args
|
|
35
35
|
args: list[str] = []
|
|
36
36
|
for opt_k, opt_v in pytest_args.items():
|
|
37
|
+
# Prepare long/short option name
|
|
38
|
+
is_long_option = len(opt_k) > 1
|
|
39
|
+
opt_name = f"--{opt_k}" if is_long_option else f"-{opt_k}"
|
|
40
|
+
|
|
37
41
|
if isinstance(opt_v, bool):
|
|
38
42
|
if opt_v:
|
|
39
43
|
# Simple option
|
|
40
|
-
args.append(
|
|
44
|
+
args.append(opt_name)
|
|
41
45
|
else:
|
|
42
46
|
# Key + value
|
|
43
|
-
args.
|
|
47
|
+
args.extend([f"{opt_name}={opt_v}"] if is_long_option else [opt_name, str(opt_v)])
|
|
44
48
|
|
|
45
49
|
# Invoke pytest
|
|
46
50
|
all_args = [sys.executable, "-m", "pytest"] + args
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nmk-python
|
|
3
|
-
Version: 1.10.
|
|
3
|
+
Version: 1.10.3
|
|
4
4
|
Summary: Python plugin for nmk build system
|
|
5
5
|
Author: The dynod project
|
|
6
6
|
Maintainer: The dynod project
|
|
@@ -16,7 +16,8 @@ Classifier: Programming Language :: Python :: 3.14
|
|
|
16
16
|
Requires-Python: >=3.10
|
|
17
17
|
Description-Content-Type: text/markdown
|
|
18
18
|
License-File: LICENSE
|
|
19
|
-
Requires-Dist: nmk-base>=1.0
|
|
19
|
+
Requires-Dist: nmk-base>=1.5.0
|
|
20
|
+
Requires-Dist: nmk>=1.5.1
|
|
20
21
|
Requires-Dist: Jinja2
|
|
21
22
|
Requires-Dist: tomlkit
|
|
22
23
|
Requires-Dist: setuptools
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
nmk_python/__init__.py,sha256=EouCWXbAeObby1vOCx0Vx_WaGC2fEEFDMCen3JZt4TU,446
|
|
2
2
|
nmk_python/badges.yml,sha256=LzElZecCXKxdF-oPkvIwfnbQlOcAM_zUj6MelClmAug,749
|
|
3
3
|
nmk_python/build.py,sha256=K-ZPBSN0YgWQqS4Nz2tRg-y2zTFvcutDiNR7Ii1NrMY,12979
|
|
4
|
-
nmk_python/build.yml,sha256=
|
|
4
|
+
nmk_python/build.yml,sha256=kkaJV535tgcfDV65Pjxfh4HMexCS3muQ5oazFtqgYXI,5958
|
|
5
5
|
nmk_python/doc.yml,sha256=12amAlYylH7JAHaqBIOoEZ_LrXY_bPNKuHrrwUkIj8w,932
|
|
6
6
|
nmk_python/files.py,sha256=K6Y-XKXuf8jh4x333Qgj6G1MyB-BgZ5Kd2-XCZhsfR4,2000
|
|
7
7
|
nmk_python/files.yml,sha256=jlp87gW9rTASUnsy7id7VWanaMUMN_py82bMa2adniM,813
|
|
8
8
|
nmk_python/plugin.yml,sha256=hi7osXyIwpHgJAsww5mhOA6emxhzgitDF8cOsvyY29Y,1068
|
|
9
9
|
nmk_python/project.yml,sha256=wBnB6KOglRvIpw1UHuXTYmuE_2BYGBzGWwIEbA5NDv8,985
|
|
10
10
|
nmk_python/ruff.py,sha256=TBmn5nFflcFRvjj36JtJGJ-GYHOK6XfhK9Jp-2dO5_E,1557
|
|
11
|
-
nmk_python/ruff.yml,sha256=
|
|
12
|
-
nmk_python/tests.py,sha256=
|
|
11
|
+
nmk_python/ruff.yml,sha256=L3vSTLGI3ZP46D64VxenhF9Gz3lo5-J9cRwgKBrVl48,2732
|
|
12
|
+
nmk_python/tests.py,sha256=p2dl41eZW8cpUMOa2DXi3CN3iVQEnElC88Ke89PRyy8,1597
|
|
13
13
|
nmk_python/tests.yml,sha256=by_Ml1JXjgt1-J96AMp-6gwhISVFVylRZowUvaMkfpk,1636
|
|
14
14
|
nmk_python/version.py,sha256=fLpOWdujYwlJB7XhWaOGCTeg3gQaClk2YHoRkkW64dE,3109
|
|
15
15
|
nmk_python/version.yml,sha256=WpZyQ2mChmvA_6eVb_Yp6ZaFIkX6oINxWBhKgb8h4GE,833
|
|
@@ -30,9 +30,9 @@ nmk_python/templates/src/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
|
|
|
30
30
|
nmk_python/templates/src/__init__.py.jinja,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
31
31
|
nmk_python/templates/src/sample.py.jinja,sha256=OOTps7EjviwYFCIb5GpMHcidxhBY5NLQVlcFLqxuxNU,227
|
|
32
32
|
nmk_python/templates/src/test_sample.py.jinja,sha256=u-ShBoKDF3se9KvgQ1SzO4NwymjqNowwURF4Q1oR3wo,221
|
|
33
|
-
nmk_python-1.10.
|
|
34
|
-
nmk_python-1.10.
|
|
35
|
-
nmk_python-1.10.
|
|
36
|
-
nmk_python-1.10.
|
|
37
|
-
nmk_python-1.10.
|
|
38
|
-
nmk_python-1.10.
|
|
33
|
+
nmk_python-1.10.3.dist-info/licenses/LICENSE,sha256=PROo9EW7wP6jmSr_90OluItAsIB411b_CAqEBioMKpI,1074
|
|
34
|
+
nmk_python-1.10.3.dist-info/METADATA,sha256=4IagnIbEAXFlSZ2U0s1Qnmp9pMQDVwwQEkPcqQiM8mU,3175
|
|
35
|
+
nmk_python-1.10.3.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
|
|
36
|
+
nmk_python-1.10.3.dist-info/entry_points.txt,sha256=QLXIIXl6wODHDnVkh7KuiLv_XzfFtNfdWwpxyB675ak,88
|
|
37
|
+
nmk_python-1.10.3.dist-info/top_level.txt,sha256=MCb5w_hoOZ0kk3Dajxrd9Pz6lZ3pyuS6TQCRA3vddTo,11
|
|
38
|
+
nmk_python-1.10.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|