hunterMakesPy 0.1.1__py3-none-any.whl → 0.2.0__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.
- hunterMakesPy/__init__.py +8 -5
- hunterMakesPy/_theSSOT.py +3 -39
- hunterMakesPy/coping.py +82 -6
- hunterMakesPy/dataStructures.py +129 -126
- hunterMakesPy/parseParameters.py +29 -29
- hunterMakesPy/pytestForYourUse.py +5 -322
- hunterMakesPy/tests/__init__.py +5 -0
- {tests → hunterMakesPy/tests}/conftest.py +1 -2
- hunterMakesPy/tests/test_coping.py +216 -0
- {tests → hunterMakesPy/tests}/test_dataStructures.py +124 -118
- {tests → hunterMakesPy/tests}/test_filesystemToolkit.py +5 -2
- hunterMakesPy/tests/test_parseParameters.py +339 -0
- {huntermakespy-0.1.1.dist-info → huntermakespy-0.2.0.dist-info}/METADATA +12 -12
- huntermakespy-0.2.0.dist-info/RECORD +20 -0
- {huntermakespy-0.1.1.dist-info → huntermakespy-0.2.0.dist-info}/top_level.txt +0 -1
- huntermakespy-0.1.1.dist-info/RECORD +0 -20
- tests/__init__.py +0 -0
- tests/test_coping.py +0 -56
- tests/test_parseParameters.py +0 -21
- {huntermakespy-0.1.1.dist-info → huntermakespy-0.2.0.dist-info}/WHEEL +0 -0
- {huntermakespy-0.1.1.dist-info → huntermakespy-0.2.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hunterMakesPy
|
|
3
|
-
Version: 0.
|
|
4
|
-
Summary:
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Easy Python functions making making functional Python functions easier.
|
|
5
5
|
Author-email: Hunter Hogan <HunterHogan@pm.me>
|
|
6
6
|
License: CC-BY-NC-4.0
|
|
7
7
|
Project-URL: Donate, https://www.patreon.com/integrated
|
|
8
8
|
Project-URL: Homepage, https://github.com/hunterhogan/
|
|
9
9
|
Project-URL: Issues, https://github.com/hunterhogan/
|
|
10
10
|
Project-URL: Repository, https://github.com/hunterhogan/
|
|
11
|
-
Keywords: defensive programming,
|
|
11
|
+
Keywords: attribute loading,concurrency limit,configuration,defensive programming,dictionary merging,directory creation,dynamic import,error propagation,file system utilities,input validation,integer parsing,module loading,nested data structures,package settings,parameter validation,pytest,string extraction,test utilities
|
|
12
12
|
Classifier: Development Status :: 4 - Beta
|
|
13
13
|
Classifier: Environment :: Console
|
|
14
14
|
Classifier: Framework :: Pytest
|
|
@@ -17,31 +17,31 @@ Classifier: Intended Audience :: End Users/Desktop
|
|
|
17
17
|
Classifier: Intended Audience :: Other Audience
|
|
18
18
|
Classifier: Natural Language :: English
|
|
19
19
|
Classifier: Operating System :: OS Independent
|
|
20
|
-
Classifier: Programming Language :: Python
|
|
20
|
+
Classifier: Programming Language :: Python
|
|
21
|
+
Classifier: Programming Language :: Python :: 3
|
|
21
22
|
Classifier: Programming Language :: Python :: 3.11
|
|
22
23
|
Classifier: Programming Language :: Python :: 3.12
|
|
23
24
|
Classifier: Programming Language :: Python :: 3.13
|
|
24
|
-
Classifier: Programming Language :: Python :: 3
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
25
26
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
26
|
-
Classifier: Programming Language :: Python
|
|
27
27
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
28
28
|
Classifier: Topic :: Utilities
|
|
29
29
|
Classifier: Typing :: Typed
|
|
30
|
-
Requires-Python: >=3.
|
|
30
|
+
Requires-Python: >=3.11
|
|
31
31
|
Description-Content-Type: text/markdown
|
|
32
32
|
License-File: LICENSE
|
|
33
33
|
Requires-Dist: charset_normalizer
|
|
34
34
|
Requires-Dist: more_itertools
|
|
35
35
|
Requires-Dist: numpy
|
|
36
|
-
Requires-Dist: python_minifier
|
|
37
|
-
|
|
36
|
+
Requires-Dist: python_minifier; python_version < "3.14"
|
|
37
|
+
Provides-Extra: development
|
|
38
|
+
Requires-Dist: mypy; extra == "development"
|
|
39
|
+
Requires-Dist: pyupgrade; extra == "development"
|
|
40
|
+
Requires-Dist: setuptools-scm; extra == "development"
|
|
38
41
|
Provides-Extra: testing
|
|
39
|
-
Requires-Dist: mypy; extra == "testing"
|
|
40
42
|
Requires-Dist: pytest; extra == "testing"
|
|
41
43
|
Requires-Dist: pytest-cov; extra == "testing"
|
|
42
44
|
Requires-Dist: pytest-xdist; extra == "testing"
|
|
43
|
-
Requires-Dist: pyupgrade; extra == "testing"
|
|
44
|
-
Requires-Dist: setuptools-scm; extra == "testing"
|
|
45
45
|
Dynamic: license-file
|
|
46
46
|
|
|
47
47
|
# hunterMakesPy
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
hunterMakesPy/__init__.py,sha256=bVF1F2Mdo5AOiioEfxKvNrnsa3vCFI16eMK7Oy5O5TU,1450
|
|
2
|
+
hunterMakesPy/_theSSOT.py,sha256=lkLOG3oTIWNKD_ULX55chlUGNqCHgqVIrBvolvK1vbQ,153
|
|
3
|
+
hunterMakesPy/coping.py,sha256=covqNFAwkF9gjafrlAvMdtCO8haFsESQBhO-7s68qSg,5581
|
|
4
|
+
hunterMakesPy/dataStructures.py,sha256=CFyGjmAOoN2MoEPwWwWdwKNXmOXX8kCS3ttMOa2Rsx0,11379
|
|
5
|
+
hunterMakesPy/filesystemToolkit.py,sha256=vDYS0Rc1aP7ETLXHKoO3TfOpuwJQFQW2ybwtJNiIIo4,4305
|
|
6
|
+
hunterMakesPy/parseParameters.py,sha256=DXpyATx7trGBg_8jlO5dXGfLcG8vg_lU3R1sq1rRFOQ,11644
|
|
7
|
+
hunterMakesPy/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
|
+
hunterMakesPy/pytestForYourUse.py,sha256=GiN1C1gTTM0ZunRPEMnrKlLQLMdH0wF_ZGr_RPgRjjA,500
|
|
9
|
+
hunterMakesPy/theTypes.py,sha256=C2d0uLn1VIx6_2CK41it3IP7iplSQqe51tzWc-RT320,306
|
|
10
|
+
hunterMakesPy/tests/__init__.py,sha256=C_FzfKDi_VrGVxlenWHyOYtKShAKlt3KW14jeRx1mQI,224
|
|
11
|
+
hunterMakesPy/tests/conftest.py,sha256=K-XAGvYp6CZVCox5G5DvFA9Qk7X-oBl1BccmOXVn0BI,1645
|
|
12
|
+
hunterMakesPy/tests/test_coping.py,sha256=mH89TUAL6fJanBLlhdVlCNNQqm5OpdcQMP_p5W2JJwo,9860
|
|
13
|
+
hunterMakesPy/tests/test_dataStructures.py,sha256=O4aqzSKg7KfWWVhIewOH0Y8Zj28PbFCb4XX3xhwuFQA,16605
|
|
14
|
+
hunterMakesPy/tests/test_filesystemToolkit.py,sha256=HmRKHXAvGz12YAI-FT9tz42CDNK6p5NcZEVPLzdfetE,2460
|
|
15
|
+
hunterMakesPy/tests/test_parseParameters.py,sha256=80npsoWcCackjxvoW2dMXMpHeale7fuRXyXp78MibLs,14037
|
|
16
|
+
huntermakespy-0.2.0.dist-info/licenses/LICENSE,sha256=NxH5Y8BdC-gNU-WSMwim3uMbID2iNDXJz7fHtuTdXhk,19346
|
|
17
|
+
huntermakespy-0.2.0.dist-info/METADATA,sha256=FnWnf_rjZ_-uC3s1j4rUeLmOYc4B1s6j8TOJJcn3QlY,6631
|
|
18
|
+
huntermakespy-0.2.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
19
|
+
huntermakespy-0.2.0.dist-info/top_level.txt,sha256=Uh4bj8EDTdsRpqY1VlK_his_B4HDfZ6Tqrwhoj75P_w,14
|
|
20
|
+
huntermakespy-0.2.0.dist-info/RECORD,,
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
hunterMakesPy/__init__.py,sha256=90V3O282uru782TM8AI0X_EEjJD1cCO1K6or3uClZ0E,1319
|
|
2
|
-
hunterMakesPy/_theSSOT.py,sha256=BnS7RNz1Lhh2-jL2CjJZlzYGVdi0fB5zSmDRd_QSj7Y,1647
|
|
3
|
-
hunterMakesPy/coping.py,sha256=AXa3KgAAO0L3KFNUoor8Tjuw7lDGQ2ZIsKUCDV4wR2Y,2529
|
|
4
|
-
hunterMakesPy/dataStructures.py,sha256=EYydZeU0eL8SIb3sMnpKdzfB0dhX0gJzqgW2fSy5dg0,11246
|
|
5
|
-
hunterMakesPy/filesystemToolkit.py,sha256=vDYS0Rc1aP7ETLXHKoO3TfOpuwJQFQW2ybwtJNiIIo4,4305
|
|
6
|
-
hunterMakesPy/parseParameters.py,sha256=plrJ4xR1FQnQR9j-oeMAwB2H9r_8QD8OALnw0OH8Kt0,11947
|
|
7
|
-
hunterMakesPy/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
|
-
hunterMakesPy/pytestForYourUse.py,sha256=21BI8TXyinf8rMmS6dTsuRMBOOFTcyoG_gD__Gz_e7Q,13288
|
|
9
|
-
hunterMakesPy/theTypes.py,sha256=C2d0uLn1VIx6_2CK41it3IP7iplSQqe51tzWc-RT320,306
|
|
10
|
-
huntermakespy-0.1.1.dist-info/licenses/LICENSE,sha256=NxH5Y8BdC-gNU-WSMwim3uMbID2iNDXJz7fHtuTdXhk,19346
|
|
11
|
-
tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
12
|
-
tests/conftest.py,sha256=MkNc4Ar6yYrnAok4t1NWsgyOYFDiGo1qwXHyp8ChJf4,1672
|
|
13
|
-
tests/test_coping.py,sha256=c_rBHU0uoK2CKZhJSWtp7PPnHgdjNtdQEbWpc4P0VkE,2282
|
|
14
|
-
tests/test_dataStructures.py,sha256=VhM3VzG1l8l3Iz1q9sQjpNBQTWSrl4zWbnefsGTccos,16406
|
|
15
|
-
tests/test_filesystemToolkit.py,sha256=jk6Ke0fW6dlHIVyvA1lh7o7_I7DVZr6uMO3s_i43isQ,2445
|
|
16
|
-
tests/test_parseParameters.py,sha256=bHD-O-OyWWwPOx3zvS53pSNPDm3LbFS05N5JcfNCLG4,1137
|
|
17
|
-
huntermakespy-0.1.1.dist-info/METADATA,sha256=tAOMlagVr8VZzK3j8aJ5u1oKQQfDj96Kp0hhkPh5Ur8,6847
|
|
18
|
-
huntermakespy-0.1.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
19
|
-
huntermakespy-0.1.1.dist-info/top_level.txt,sha256=dUy7z3LNO6aqNjPD81tZjE5N9HO70a14Y9lAWjWC2gA,20
|
|
20
|
-
huntermakespy-0.1.1.dist-info/RECORD,,
|
tests/__init__.py
DELETED
|
File without changes
|
tests/test_coping.py
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
from hunterMakesPy import raiseIfNone
|
|
2
|
-
from tests.conftest import uniformTestFailureMessage
|
|
3
|
-
import pytest
|
|
4
|
-
|
|
5
|
-
@pytest.mark.parametrize(
|
|
6
|
-
"returnTarget, expected",
|
|
7
|
-
[
|
|
8
|
-
(13, 13),
|
|
9
|
-
(17, 17),
|
|
10
|
-
("fibonacci", "fibonacci"),
|
|
11
|
-
("prime", "prime"),
|
|
12
|
-
([], []),
|
|
13
|
-
({}, {}),
|
|
14
|
-
(False, False),
|
|
15
|
-
(0, 0),
|
|
16
|
-
]
|
|
17
|
-
)
|
|
18
|
-
def testRaiseIfNoneReturnsNonNoneValues(returnTarget: object, expected: object) -> None:
|
|
19
|
-
actual = raiseIfNone(returnTarget)
|
|
20
|
-
assert actual == expected, uniformTestFailureMessage(expected, actual, "testRaiseIfNoneReturnsNonNoneValues", returnTarget)
|
|
21
|
-
assert actual is returnTarget, uniformTestFailureMessage(returnTarget, actual, "testRaiseIfNoneReturnsNonNoneValues identity check", returnTarget)
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
def testRaiseIfNoneRaisesValueErrorWhenGivenNone() -> None:
|
|
25
|
-
with pytest.raises(ValueError, match="A function unexpectedly returned `None`. Hint: look at the traceback immediately before `raiseIfNone`."):
|
|
26
|
-
raiseIfNone(None)
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
@pytest.mark.parametrize(
|
|
30
|
-
"customMessage",
|
|
31
|
-
[
|
|
32
|
-
"Configuration must include 'host' setting",
|
|
33
|
-
"Database connection failed",
|
|
34
|
-
"User input is required",
|
|
35
|
-
"Network request returned empty response",
|
|
36
|
-
]
|
|
37
|
-
)
|
|
38
|
-
def testRaiseIfNoneRaisesValueErrorWithCustomMessage(customMessage: str) -> None:
|
|
39
|
-
with pytest.raises(ValueError, match=customMessage):
|
|
40
|
-
raiseIfNone(None, customMessage)
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
def testRaiseIfNoneWithEmptyStringMessage() -> None:
|
|
44
|
-
with pytest.raises(ValueError, match="A function unexpectedly returned `None`. Hint: look at the traceback immediately before `raiseIfNone`."):
|
|
45
|
-
raiseIfNone(None, "")
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
def testRaiseIfNonePreservesTypeAnnotations() -> None:
|
|
49
|
-
integerValue: int = raiseIfNone(23)
|
|
50
|
-
assert isinstance(integerValue, int), uniformTestFailureMessage(int, type(integerValue), "testRaiseIfNonePreservesTypeAnnotations", integerValue)
|
|
51
|
-
|
|
52
|
-
stringValue: str = raiseIfNone("cardinal")
|
|
53
|
-
assert isinstance(stringValue, str), uniformTestFailureMessage(str, type(stringValue), "testRaiseIfNonePreservesTypeAnnotations", stringValue)
|
|
54
|
-
|
|
55
|
-
listValue: list[int] = raiseIfNone([29, 31])
|
|
56
|
-
assert isinstance(listValue, list), uniformTestFailureMessage(list, type(listValue), "testRaiseIfNonePreservesTypeAnnotations", listValue)
|
tests/test_parseParameters.py
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# pyright: standard
|
|
2
|
-
from collections.abc import Callable
|
|
3
|
-
from hunterMakesPy.pytestForYourUse import (
|
|
4
|
-
PytestFor_defineConcurrencyLimit, PytestFor_intInnit, PytestFor_oopsieKwargsie)
|
|
5
|
-
from typing import ParamSpec, TypeVar
|
|
6
|
-
import pytest
|
|
7
|
-
|
|
8
|
-
parameters = ParamSpec('parameters')
|
|
9
|
-
returnType = TypeVar('returnType')
|
|
10
|
-
|
|
11
|
-
@pytest.mark.parametrize("nameOfTest,aPytest", PytestFor_defineConcurrencyLimit())
|
|
12
|
-
def testConcurrencyLimit(nameOfTest: str, aPytest: Callable[parameters, returnType], *arguments: parameters.args, **keywordArguments: parameters.kwargs) -> None:
|
|
13
|
-
aPytest(*arguments, **keywordArguments)
|
|
14
|
-
|
|
15
|
-
@pytest.mark.parametrize("nameOfTest,aPytest", PytestFor_intInnit())
|
|
16
|
-
def testIntInnit(nameOfTest: str, aPytest: Callable[parameters, returnType], *arguments: parameters.args, **keywordArguments: parameters.kwargs) -> None:
|
|
17
|
-
aPytest(*arguments, **keywordArguments)
|
|
18
|
-
|
|
19
|
-
@pytest.mark.parametrize("nameOfTest,aPytest", PytestFor_oopsieKwargsie())
|
|
20
|
-
def testOopsieKwargsie(nameOfTest: str, aPytest: Callable[parameters, returnType], *arguments: parameters.args, **keywordArguments: parameters.kwargs) -> None:
|
|
21
|
-
aPytest(*arguments, **keywordArguments)
|
|
File without changes
|
|
File without changes
|