iker-python-common 1.0.59__tar.gz → 1.0.61__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.
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/PKG-INFO +1 -1
- iker_python_common-1.0.61/resources/unittest/shutils/dir.baz/file.bar.baz +16 -0
- iker_python_common-1.0.61/resources/unittest/shutils/dir.baz/file.foo.bar +16 -0
- iker_python_common-1.0.61/resources/unittest/shutils/dir.baz/file.foo.baz +16 -0
- iker_python_common-1.0.61/resources/unittest/shutils/dir.foo/dir.foo.bar/dir.foo.bar.baz/file.foo.bar.baz +16 -0
- iker_python_common-1.0.61/resources/unittest/shutils/dir.foo/dir.foo.bar/file.bar.baz +16 -0
- iker_python_common-1.0.61/resources/unittest/shutils/dir.foo/dir.foo.bar/file.foo.bar +16 -0
- iker_python_common-1.0.61/resources/unittest/shutils/dir.foo/dir.foo.bar/file.foo.baz +16 -0
- iker_python_common-1.0.61/resources/unittest/shutils/dir.foo/file.bar +16 -0
- iker_python_common-1.0.61/resources/unittest/shutils/dir.foo/file.baz +16 -0
- iker_python_common-1.0.61/resources/unittest/shutils/dir.foo/file.foo +16 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/src/iker/common/utils/funcutils.py +69 -1
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/src/iker/common/utils/jsonutils.py +97 -40
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/src/iker_python_common.egg-info/PKG-INFO +1 -1
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/test/iker_tests/common/utils/funcutils_test.py +40 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/test/iker_tests/common/utils/jsonutils_test.py +284 -1
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/test/iker_tests/common/utils/shutils_test.py +120 -120
- iker_python_common-1.0.59/resources/unittest/shutils/dir.baz/file.bar.baz +0 -0
- iker_python_common-1.0.59/resources/unittest/shutils/dir.baz/file.foo.bar +0 -0
- iker_python_common-1.0.59/resources/unittest/shutils/dir.baz/file.foo.baz +0 -0
- iker_python_common-1.0.59/resources/unittest/shutils/dir.foo/dir.foo.bar/dir.foo.bar.baz/file.foo.bar.baz +0 -0
- iker_python_common-1.0.59/resources/unittest/shutils/dir.foo/dir.foo.bar/file.bar.baz +0 -0
- iker_python_common-1.0.59/resources/unittest/shutils/dir.foo/dir.foo.bar/file.foo.bar +0 -0
- iker_python_common-1.0.59/resources/unittest/shutils/dir.foo/dir.foo.bar/file.foo.baz +0 -0
- iker_python_common-1.0.59/resources/unittest/shutils/dir.foo/file.bar +0 -0
- iker_python_common-1.0.59/resources/unittest/shutils/dir.foo/file.baz +0 -0
- iker_python_common-1.0.59/resources/unittest/shutils/dir.foo/file.foo +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/.editorconfig +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/.github/workflows/pr.yml +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/.github/workflows/push.yml +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/.gitignore +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/MANIFEST.in +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/README.md +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/VERSION +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/pyproject.toml +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/resources/unittest/config/config.cfg +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/resources/unittest/csv/data.csv +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/resources/unittest/csv/data.tsv +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/setup.cfg +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/setup.py +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/src/iker/common/__init__.py +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/src/iker/common/utils/__init__.py +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/src/iker/common/utils/argutils.py +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/src/iker/common/utils/config.py +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/src/iker/common/utils/csv.py +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/src/iker/common/utils/dbutils.py +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/src/iker/common/utils/dockerutils.py +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/src/iker/common/utils/dtutils.py +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/src/iker/common/utils/logger.py +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/src/iker/common/utils/numutils.py +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/src/iker/common/utils/randutils.py +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/src/iker/common/utils/retry.py +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/src/iker/common/utils/sequtils.py +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/src/iker/common/utils/shutils.py +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/src/iker/common/utils/span.py +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/src/iker/common/utils/strutils.py +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/src/iker/common/utils/testutils.py +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/src/iker/common/utils/typeutils.py +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/src/iker_python_common.egg-info/SOURCES.txt +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/src/iker_python_common.egg-info/dependency_links.txt +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/src/iker_python_common.egg-info/not-zip-safe +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/src/iker_python_common.egg-info/requires.txt +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/src/iker_python_common.egg-info/top_level.txt +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/test/iker_test.py +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/test/iker_tests/__init__.py +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/test/iker_tests/common/utils/argutils_test.py +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/test/iker_tests/common/utils/config_test.py +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/test/iker_tests/common/utils/csv_test.py +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/test/iker_tests/common/utils/dbutils_test.py +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/test/iker_tests/common/utils/dockerutils_test.py +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/test/iker_tests/common/utils/dtutils_test.py +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/test/iker_tests/common/utils/logger_test.py +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/test/iker_tests/common/utils/numutils_test.py +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/test/iker_tests/common/utils/randutils_test.py +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/test/iker_tests/common/utils/retry_test.py +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/test/iker_tests/common/utils/sequtils_test.py +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/test/iker_tests/common/utils/span_test.py +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/test/iker_tests/common/utils/strutils_test.py +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/test/iker_tests/common/utils/testutils_test.py +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/test/iker_tests/common/utils/typeutils_test.py +0 -0
- {iker_python_common-1.0.59 → iker_python_common-1.0.61}/test/iker_tests/docker_fixtures.py +0 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
a8a02100e9c056a268ab37eab24e779e48fede1876b84ed3c7ca8ab85deeaeca
|
|
2
|
+
79e97fdca8f0654e868cc8df06cf6b6cfe9d462c840711dbf42a8607919701a7
|
|
3
|
+
77c3748acb005e2f629a80b8040163365f37804d4b0e174ddb1ecf3a535397ec
|
|
4
|
+
0491153226b97cad16810e00e29af54141390b3778902ca5bf10636f0ceb4517
|
|
5
|
+
4c087fe45d4da13a4098a4d28429d4db44cffd5a1e74712e153528235ea4edae
|
|
6
|
+
a6e92325d196f396e47b2359de8b8f42616dac799c2f902fa65af403b1b5f4da
|
|
7
|
+
20ba5f1f9d22c9b872fe6fac9d1826fb8a25555dbc0c365e627c83413b33ec54
|
|
8
|
+
8c2d17b8fd807064690e467a504e62488f122816dfe6633c12e7e5c602731c1f
|
|
9
|
+
ea71cc5db9bc57291b342c7c57aca7efb0cdb4d483408e624e4784c46b5e6387
|
|
10
|
+
03a9459c9d51a456256496cd5c4b869e9a9938554deab6d00d35757690b0e8eb
|
|
11
|
+
1e3559627ab862dc5c2d484df8de62e5e688be5be6dc153fc6708c1204767c80
|
|
12
|
+
bb59ca780800c5ac88ba97d16df06d655f6378c8e4ed72b0e56035453bb29780
|
|
13
|
+
56d8c93fa7ac72d3609db5b950dac47da6e93c275f5138b32278ddde0c337ee6
|
|
14
|
+
ea69fa60b4b36a8cf4d474e434ace98326f08e7cc0d3875b49c83c250a596ce6
|
|
15
|
+
123607bc959c2db77828d2b42f1b05f53a4a8b7e6a74a496f85d23f7ec743cf5
|
|
16
|
+
6b9aa2ff76e89a810e8ff6371ddf3b72084a03296b75a590b47593d53dec3486
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
720d2bd3a25198a16f64ac3d4d1f8df7f557e9b35acc9d5581a8f3af82ce60ed
|
|
2
|
+
79528118740a4d2b64448d079323f4d60b1d388999952971fcb11433bfc7cf13
|
|
3
|
+
f854de5075f0f11bdf7e3169e9b0a4e8cf30debfca55074fb81e6ffd19610290
|
|
4
|
+
ac16db129fca95347325c4a28aceac1b41cca825e817aa15b69bde06305246c4
|
|
5
|
+
186f694795ff0205ce5394ee94158da39166dbb78013476e10044cabc4ae01e1
|
|
6
|
+
26f7b3fa2999bb6f0f43e3deec6f31dbdd3d012136e31993c346ba3f9228318d
|
|
7
|
+
9f6003a457daba22c887e7bacc384096318f9a1b51f7bf54fa73eccf9141e4a1
|
|
8
|
+
4e067207135567f319705905488a4dea20b4190072cc28749508b521467cfd9c
|
|
9
|
+
857e5f626be43bd9ee17d291bfdcbc1b9ec806f6a248c906d11dbeb9727fc540
|
|
10
|
+
9ca0c7711187895faea3d80434b02765bf9734e70d6996c0e85c8bb9cf43997a
|
|
11
|
+
ec3a8d2f8d1d2ad1b6b7df73d5fb0e70cee35e201c05fc601bf2e3646239504f
|
|
12
|
+
4081ca757b01665e5165768db772d1df533232e207352dc22f7dfc1dbbc5177f
|
|
13
|
+
2137c93ef01ea7020cd35c8d23c765618a7df1f68182cd2173b2ef78605b46ea
|
|
14
|
+
0d5f72293e7cfe60d72fd8679b6245ccf9c6a02cf6c3ed22ed8bd4e936cb8b51
|
|
15
|
+
0bad89c9fb578259d11a9a63e33a387bafbe2e77691b4a978e9ebbf0c1ebe9bd
|
|
16
|
+
3ed28d1e72df01fcaf3bec7684f4a4e98e9034a90752e3f56129041a24bf90c9
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
5e8cc51ab1aefd7a4e94d9694e520781035da2599e1bc9f8027bdce7ff38e071
|
|
2
|
+
42f3d72ba0ce14e7677cc82f032d83e067988de918be1939ec92fb5345eacea0
|
|
3
|
+
756c2890ee1ad7728a3a37a6152e70395a4175f0875df36c28db779b33a2465d
|
|
4
|
+
5b7ddc909a5222a3104c735aca5fbb9664eff539881df9758ba57ec29eac190e
|
|
5
|
+
38c2ad30436156b4097460462f886c2435aff974a890d8202450316ec1a4ccad
|
|
6
|
+
0adf70c9d2e17a07e3ba5d5de40e2a76b97007da009bf71b07c4f2369e27a340
|
|
7
|
+
053604687953985c938395d4e7a3ae51c4bbebb89c3fa8c62d77ce5b6fad6a74
|
|
8
|
+
88ab13123bbfe44bc0feddac059f8c71ecb2ad43972f45b74c90d48cf1a66b45
|
|
9
|
+
3ff068ee5fcab4e5de968a8effd4d51b051ab90f8998dc5ddaa35539ed31f822
|
|
10
|
+
b875296acfc49ce62e8a26d725a022116c1befc5ad154883d0a8071bf7704a57
|
|
11
|
+
b429b69be4616306dd65c5c4ebdef07a75aa51e9e272fed96175f17419a73e88
|
|
12
|
+
7a00211dc02e8c6f912d3823a4867841a0728495fa290066c843490e746a44ac
|
|
13
|
+
222d0a014c9d8a247e9ffd3386c188d402ed21c3037fad84a72d27e0d55d220a
|
|
14
|
+
c78d7bb8b44bd0c4952f2628670820d2063eab056d089aa5623f06c675eac41a
|
|
15
|
+
16ba9040e748ab4e36a5d66ec59c6a54448cc4e23c75462d2cf10e9443cdb23f
|
|
16
|
+
9ee130f144ae1964f85756b1af88c7971a909c37b42773fee5fa59beab8ae476
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
d4ea1f50310c6b388dc05225fb144edc2309fcc170578e03d21551d62f6c529b
|
|
2
|
+
d8697d566d84fbe32a6612c9ea7f29d9fbb9580fa94a227985a85127790ab1d5
|
|
3
|
+
56532a34324d071c42d022594b04541591082c1e01eeb7f3117a9b0b0b597dca
|
|
4
|
+
0b3a5a6dd4d29e749070632d0bb6efe21545d03a2a83a56be09263c61e7996b3
|
|
5
|
+
dfa9efd413d8b14bfe5ef2266a9bcc7bcb759366d83b52a47757c7eb3b83305a
|
|
6
|
+
4363131c70131bff160c87d485678a7625ffe84ddf8afe26081f6976bfd9e1de
|
|
7
|
+
4b08b08f541163376b1b6324e898f6e064895dfb577f27eb6da51cf72fdda1c1
|
|
8
|
+
2955bdafdb1e25911d18d46b299dc2d1bb758864b12b0f994e8edb7413989152
|
|
9
|
+
084b742162bd2be14cdec84a1c4d066777258ada62013614d0e35285c299ed20
|
|
10
|
+
3091bc434a9db50a33d3e40c517fb1eefa206fb4fd6a049541391d80f6d292ac
|
|
11
|
+
20aaf8f7c29a4dd3395da27a4d389edd3907c6e30808be383bc5b1836e18887b
|
|
12
|
+
721c980d5dc32db0af11bb834e7e1bebd7f1cf43fbd328cc2c06c71e6a629bd9
|
|
13
|
+
ce0ffb63bc50c92eb33f2e90412820d06ba87ffab6b99b6090a96cf25ec8400c
|
|
14
|
+
c5371b421e9037d5c2f9ec492cf50c624dc2b364a55f3532285d966f777957ed
|
|
15
|
+
773325da337c54ff631d578b56f961992cb199208a08e02ab0bd7e18acd9cddc
|
|
16
|
+
dfec79db0381280f712129945e2f1f1c1b6d8af4f97363d9786b71a4ec0ba3e7
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
21f8bb48cae63d93c007ce3c01867c05d98b6f54dcb1271dbfa868928dd908d1
|
|
2
|
+
f0a95b295397d5c5179ffb6db6768c78071468e03f3b28ae050f4ba71c1fb573
|
|
3
|
+
b8b32ffaff720fc59abb293e444668efd2cba500f9718b899992a4bedbda9ca2
|
|
4
|
+
564c5f8c6ffaeeacc11648f7081e313d220058b7bc4e224f4ae3665de61b3407
|
|
5
|
+
f1b494e6a9e51787e75551e5eab78b65267921dbac0612425cd56e6fb5160541
|
|
6
|
+
d00833db2ead9c2e0959f7d4df3d721eca01a5378c6b5be427427c9ccfddda3c
|
|
7
|
+
2345e4cde221e719df5a98c5cddcd226c1955eaaa381a790a9ed31bdccc31561
|
|
8
|
+
9079a1071adae4bb5d92a6b14fcc31f30295843eb05a76d097f83b3e5a91bdfd
|
|
9
|
+
08c0c7bdeb84b14aa61fa197ee2e1d3ca587380956f9d78e9cb54063328d1db2
|
|
10
|
+
dce9a86dee30cf11516a520e000f962a4285400cfb3534815b7ffaf570021ddb
|
|
11
|
+
558b83ae432c6d84c3ff41682cabcd009405a6eed44fad326b19b4449f12dc2f
|
|
12
|
+
994735e737cf223b5c35bf91ddf615f9ede92866861ebf00c5adc99f85e281be
|
|
13
|
+
3d2fb05abf258f7086df1adaa9b1153dcbd97421afddc1840f236146d4a061d6
|
|
14
|
+
9045c587beb27ec7e0bdccdb01c322943c6c3f41dc3e64b73c4ce087e6cdbf71
|
|
15
|
+
2bcde27e4a4c3c353de550dd05221b2739c076b11230fc1e28d7b4ea5781308a
|
|
16
|
+
1cd0ed94e53172dcad4350801b1bdb2a9eb1906661c803f62adce0b60a040918
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
da047c10deb537fc9054e886d0caca5ddbd92b50e4addb7aeb1671a59672082d
|
|
2
|
+
77084de68a0d90919280ec6783ab81766f492a88b1389252431f2583c0eefaf5
|
|
3
|
+
e6748050831576d0af305351847a746f4db843bd8b86dd16d376ebffd45af99e
|
|
4
|
+
33bf4bc21ce7f6325d16495742bb0387a872deb16944ec91d59cf3c2509ffa27
|
|
5
|
+
7f28f5bb1b8bcaf10419ee1b153ba5f10f45fd6ea033ce73a5e79c22398c6431
|
|
6
|
+
81de68c34767beb3a569dcfbd6da6299a23048734f9ef6f4b90c8a7f7f796a38
|
|
7
|
+
4aa0531b7c4ccabf176a62db435d2481a60cce01b8bc2b34c9d93200c105ba01
|
|
8
|
+
317300d8fe7fc932eddc2e92530979021a429daf17e3506f9e8d2c8317d21c7d
|
|
9
|
+
0ec23d1c56a22737be5a1f41741b1fa4e6c17964d262b53eb4a87bd8bda46f06
|
|
10
|
+
3b57ae7bddcc2ea032fdef3584f1784996005517d86852a1a8552694360ae4c3
|
|
11
|
+
adf1a0526704165a4ed38697b40bba6b934fa0c4fcd184554eee9b60dc5e6dc9
|
|
12
|
+
6a811e36305b8c5f6dd643b3475834eb4c01ef8eda4996d766652479c1064d9c
|
|
13
|
+
1cf2fc65c25841156b9b40d37137c1d8be316ae656263e5bb80c78a5bd99e50e
|
|
14
|
+
63298b9ebbd015a76dd4569cfed1c79d300fdec01b642301c05b43299114bd18
|
|
15
|
+
db0778ab7ce627f304206b0cb2b0084ea5de89a7e1076dbe003d311b293d3367
|
|
16
|
+
1cef389f7e94e5b4fdb49bf34049acbe1409c4542a8a2002c082bcbcf00c2228
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
edc463c935e9c4cf8cff3ad1e825ab90a63019daa233aebd248074556f219e77
|
|
2
|
+
e27cab488b83b915437a6d485b59d6902c5136a1da816515c463bc1dc1574b10
|
|
3
|
+
7f3df81ebebc9f14998395f6075c55d34cd17f5c8df18b59d036b52e007c5ecf
|
|
4
|
+
532bce7d2486aec458c94227c0564eebf18b726a67572c98efb812362e539798
|
|
5
|
+
a2dc7c9a3c2500d9b025a3c2f43ec0a540d0f8c9292a31876f3d8dc7a9bf4768
|
|
6
|
+
d1fee3fc1335a8f4e0ffd788ceca90991e0a08a01ab8bc8e59d4e0517a1ed239
|
|
7
|
+
6ea15f2d28cb31b9d163eb46431ea5600b779eda1843ebc8f640058382b8a96f
|
|
8
|
+
0007192199c1bd90af17b4fcab5997930e442b2f96a0d274a6c838c07508a2d0
|
|
9
|
+
4a06289b76f6ea0cf3207864fe727b06e44fffc4584f82c334b4f427471dedbb
|
|
10
|
+
8aadced49b1d8c565c55892e4fa8134295b41ce24da100d0884b2586f66a5a37
|
|
11
|
+
a241d8c926cbbb2c2edcf216c6fe4fb8c8510ddedf6a21720abf27f448b9acd3
|
|
12
|
+
f788780fd9290f471d03503a75442a53824a73d44c810b39eee7e9cb1d7f6b8b
|
|
13
|
+
3afe9173afd8541f243070250b07fc9188c30fae04fc6ca1ab10ceb45fafa39a
|
|
14
|
+
cc290a6a790d85371c05a13700e1cf59bec66e2707b94647983d4f0ef8dd8fb6
|
|
15
|
+
54caa6a8178c01d79a8dda3bf98cb3c9b1a2394e483bfa4451627beb4b79cb5e
|
|
16
|
+
a710a46c3fd1857352c15b9cf65dba498ea8de14e21db09d8a1c9db9ac8591ea
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
e03b7b0d2dd60cd95fe7da8340ef3ebc6ed61921c0eb78a622113fa92b741378
|
|
2
|
+
8cc77d74e7f266431bd5d938a3f595fddce4ff0bba40c73ad01162ce713c441d
|
|
3
|
+
c4e1e6b47236b80933fa20dd6d4036a72e961bdfee48fe1662a13f7c6d8e4d5b
|
|
4
|
+
88bd23e9985c981a15bdb5e9046f518df2fba2fc3dd31761e69d987055e48892
|
|
5
|
+
6a64664ab144a1404bbae297a13d376af4c36bd9b54fda06a18b5f5c1fe50d29
|
|
6
|
+
5b8a2faf3e8b4c84af5bfbeb00c2f0ff0d460fd85e95064025b41cfafe72a980
|
|
7
|
+
291ee31de42225c131ac95fdeae55c27e9eddd955465f015f3bcfb7344f6cdbc
|
|
8
|
+
9175db19869c296308cacd445bbe6cf86143a0f3507b107ffd92762aa315bd3d
|
|
9
|
+
0db30480b8f6b71562c00be807c0f79beab1cda8b460677e6cc228d69d0fc314
|
|
10
|
+
9168239614522f5935235834af42fbee5f05ad2211f59942a0a53e0c6629257c
|
|
11
|
+
3455fa92f90751bb8a42a826e4de9a2c829c24f7e15422b9b78724c2d4d0f46f
|
|
12
|
+
7bde7a79971d85d2834fcf5856c89360f1958415aa61cd4030db39a66209b5f2
|
|
13
|
+
fb47ac2282808dea1990d681a9e3f60f18b9c792fcc13b28d43d874c5ddf02c1
|
|
14
|
+
2255496fdcc29fc436edd156922bbd03e5222166e33596d74238fca8a57325a7
|
|
15
|
+
a2a5799e7d22f58030de160af13bab3a8b6f108c224324fec6140f955b99a0e1
|
|
16
|
+
6653ed7f620088a543073fbacb59b9caf046550a82b8c0bd9e9d5c3275e23b39
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
9beca0b569e100daa77bc0cae2f8274b8b0b55b035819d8b8d854661ebccb1ba
|
|
2
|
+
c05f336e81ff83a6ef099ea4a7b70dd7d6ea036568cab1304bd91d2d31d0bfe3
|
|
3
|
+
63032207106e4a1bf4b14c44b8988899af7d0dea5892ac7d5091942c99cbe1c8
|
|
4
|
+
940c24c7bdf89581810fe923469ce2b29eff0a74451e6e6520d3a4eb2a3bc09a
|
|
5
|
+
d787e660a5660e6875060f1dcae1182fd40f40bf447edd5cf58f91463739bee9
|
|
6
|
+
16f586fc70ff9b902f67c65b2d4860208d8c1acbdd476b90ca878eb7908f9e6c
|
|
7
|
+
272a8fe74f5a5a6bc7a7e552b4ab4828a9cdf056024ad7c1713a41795239d81d
|
|
8
|
+
51d6ed24dd74595ce9156a54fa7f7bd31007a37f4610b1e605d44f07f14edf93
|
|
9
|
+
0e249567e7a95e75b98e6beee50f19fe9a4050fe2288e94a8bd87bf9efd47710
|
|
10
|
+
fe042e8c3f8c9b5f86d891161bd5809f572f614edbb934a59fffea4c3cabb622
|
|
11
|
+
20c2bbc4795d97eb816c84f0ad34301d5b30591c8528f11d8d8913d5327d1fad
|
|
12
|
+
057a718799b4b651922530650f0da7136dcc4dd048647348db3af2bcd1d1fc1a
|
|
13
|
+
461f64b586fceb204c997223131fa130c1d74195cebdb01232188cf9ff68c4fd
|
|
14
|
+
64274b236d925d20b6e13942b0aef4446f828d10e36857692ba257a5768ca44d
|
|
15
|
+
cdcf261900d316a5ff7d75bf5660c7e1678bf6cda3334a175274090aac75614c
|
|
16
|
+
78e96c2fd083dd1f59941db04d9855a970e650b54d4c54b745af5fd323edf5d7
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
752cf8410dd84a5a1053536f4fe5416009bd4dd6f4db0311bdce88235d336b97
|
|
2
|
+
2484eb97d5ba977a0b7334aa73e04ca89e6b1d4d73513c94fc19194f23428031
|
|
3
|
+
a3e0e11e7512787b34eb8660072141f187a8771027d32d089a7416411982adce
|
|
4
|
+
b43298b903a704473b94f54efb47f3b6e56a6a269d4564e725dbe47457be7d09
|
|
5
|
+
906eff7e1d72e3684d34640f6017f16e46ffbee0d1c49f96119d5c83f578a6bf
|
|
6
|
+
c5bd3c9ad6ca34f3a61272efe101560b293a1e653fc2e95b00cb6a036216b393
|
|
7
|
+
73467c804507f63ddaa29f39de94588de2d0c06c2763a013129f5a662a0d9b5d
|
|
8
|
+
8fe6f436bbb92066671ab74ba509076be3ee4ca32074962e9eef9c5b34efe7f3
|
|
9
|
+
c0088c630e9b44e0a2c0164320d911be08c157d843d31e540e080fc62f542b34
|
|
10
|
+
c87a737c9f366ef260711a77534a85196e7b16ad6408076411b4e8261b73c0cd
|
|
11
|
+
0a5549819110866ef00e09e8da148bde5b2163475b048f5021698e95379b65d0
|
|
12
|
+
daca621db335a79aefe95374d2234d28484916990a0b8247e50982a4e5050708
|
|
13
|
+
b67c6cd33e79c8a73acc17072ead0915a25b6a5c42269ef142e90451073776fb
|
|
14
|
+
2d4e962d84a7917ba699adaa737eb5b4def9608928e2babe4eb0da1cf02d9c33
|
|
15
|
+
640cf148bafbf8fe3742ee0e1a68b58f2987379488c45a7980660cb1064e4865
|
|
16
|
+
959a2707348202fd7c20a53d303acd0c4babc35fe39adade5c186b7b31dcffff
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import functools
|
|
2
2
|
from collections.abc import Callable
|
|
3
|
-
from typing import Protocol
|
|
3
|
+
from typing import Any, Protocol
|
|
4
4
|
|
|
5
5
|
__all__ = [
|
|
6
|
+
"const",
|
|
7
|
+
"first",
|
|
8
|
+
"second",
|
|
9
|
+
"packed",
|
|
6
10
|
"identity",
|
|
7
11
|
"composable",
|
|
8
12
|
"singleton",
|
|
@@ -12,6 +16,70 @@ __all__ = [
|
|
|
12
16
|
]
|
|
13
17
|
|
|
14
18
|
|
|
19
|
+
def const[T](value: T) -> Callable[..., T]:
|
|
20
|
+
"""
|
|
21
|
+
Returns a function that always returns the specified ``value``, regardless of the input arguments.
|
|
22
|
+
|
|
23
|
+
:param value: The constant value to return.
|
|
24
|
+
:return: A function that takes any arguments and returns ``value``.
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
def getter(*args: Any, **kwargs: Any) -> T:
|
|
28
|
+
return value
|
|
29
|
+
|
|
30
|
+
return getter
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def first[K]() -> Callable[[tuple[K, Any]], K]:
|
|
34
|
+
"""
|
|
35
|
+
Returns a function that extracts the first element (key) from a 2-tuple.
|
|
36
|
+
|
|
37
|
+
:return: A function that takes a 2-tuple and returns its first element.
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
def getter(item: tuple[K, Any]) -> K:
|
|
41
|
+
if not isinstance(item, tuple) or len(item) != 2:
|
|
42
|
+
raise ValueError("item must be a 2-tuple")
|
|
43
|
+
return item[0]
|
|
44
|
+
|
|
45
|
+
return getter
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def second[V]() -> Callable[[tuple[Any, V]], V]:
|
|
49
|
+
"""
|
|
50
|
+
Returns a function that extracts the second element (value) from a 2-tuple.
|
|
51
|
+
|
|
52
|
+
:return: A function that takes a 2-tuple and returns its second element.
|
|
53
|
+
"""
|
|
54
|
+
|
|
55
|
+
def getter(item: tuple[Any, V]) -> V:
|
|
56
|
+
if not isinstance(item, tuple) or len(item) != 2:
|
|
57
|
+
raise ValueError("item must be a 2-tuple")
|
|
58
|
+
return item[1]
|
|
59
|
+
|
|
60
|
+
return getter
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def packed[R](func: Callable[..., R]) -> Callable[[tuple[Any, ...]], R]:
|
|
64
|
+
"""
|
|
65
|
+
Wraps a function to accept its arguments as a single tuple, unpacking them when called. This is useful for
|
|
66
|
+
scenarios where arguments are naturally grouped in tuples, such as when working with data structures like maps or
|
|
67
|
+
lists of tuples, or when interfacing with APIs that provide arguments in tuple form.
|
|
68
|
+
|
|
69
|
+
>>> data = [(1, 2), (3, 4), (5, 6)]
|
|
70
|
+
>>> sums = map(packed(lambda x, y: x + y), data)
|
|
71
|
+
|
|
72
|
+
:param func: The function to wrap.
|
|
73
|
+
:return: A function that takes a tuple of arguments and calls the original function with them unpacked.
|
|
74
|
+
"""
|
|
75
|
+
|
|
76
|
+
@functools.wraps(func)
|
|
77
|
+
def wrapper(args: tuple[Any, ...]) -> R:
|
|
78
|
+
return func(*args)
|
|
79
|
+
|
|
80
|
+
return wrapper
|
|
81
|
+
|
|
82
|
+
|
|
15
83
|
def identity[T](instance: T) -> T:
|
|
16
84
|
"""
|
|
17
85
|
Returns the input ``instance`` unchanged. This is a utility function often used as a default or placeholder.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import math
|
|
2
|
-
from collections.abc import Callable, Mapping, MutableMapping, MutableSequence, Sequence, Set
|
|
2
|
+
from collections.abc import Callable, Generator, Mapping, MutableMapping, MutableSequence, Sequence, Set
|
|
3
3
|
from typing import Any, SupportsFloat, SupportsInt
|
|
4
4
|
|
|
5
5
|
from iker.common.utils.numutils import is_normal_real
|
|
@@ -24,6 +24,8 @@ __all__ = [
|
|
|
24
24
|
"json_traverse",
|
|
25
25
|
"json_reformat",
|
|
26
26
|
"json_sanitize",
|
|
27
|
+
"json_difference",
|
|
28
|
+
"json_equals",
|
|
27
29
|
"json_compare",
|
|
28
30
|
]
|
|
29
31
|
|
|
@@ -347,79 +349,134 @@ def json_sanitize(obj: Any, *, str_inf_nan: bool = True, str_unregistered: bool
|
|
|
347
349
|
unregistered_formatter=unregistered_formatter)
|
|
348
350
|
|
|
349
351
|
|
|
350
|
-
def
|
|
352
|
+
def json_difference(
|
|
351
353
|
a: JsonTypeCompatible,
|
|
352
354
|
b: JsonTypeCompatible,
|
|
355
|
+
node_path: NodePath | None = None,
|
|
353
356
|
*,
|
|
354
357
|
int_strict: bool = False,
|
|
355
358
|
float_tol: float = 1e-5,
|
|
356
359
|
list_order: bool = True,
|
|
357
360
|
dict_extra: bool = False,
|
|
358
|
-
) ->
|
|
361
|
+
) -> Generator[tuple[NodePath, str], None, None]:
|
|
359
362
|
"""
|
|
360
|
-
Compares two JSON-like structures
|
|
361
|
-
and dictionary key matching.
|
|
363
|
+
Compares two JSON-like structures and yields differences found, with options for integer strictness, float
|
|
364
|
+
tolerance, list order, and dictionary key matching.
|
|
362
365
|
|
|
363
366
|
:param a: The first JSON-compatible object to compare.
|
|
364
367
|
:param b: The second JSON-compatible object to compare.
|
|
368
|
+
:param node_path: The current node path during recursion (used internally).
|
|
365
369
|
:param int_strict: Whether to require strict integer type matching.
|
|
366
370
|
:param float_tol: The tolerance for comparing float values.
|
|
367
371
|
:param list_order: Whether to require list order to match.
|
|
368
372
|
:param dict_extra: Whether to allow extra keys in dictionaries.
|
|
369
|
-
:return:
|
|
373
|
+
:return: Tuples of node paths and difference descriptions.
|
|
370
374
|
"""
|
|
371
375
|
if a is None or b is None:
|
|
372
|
-
|
|
376
|
+
if not (a is None and b is None):
|
|
377
|
+
yield node_path, "one value is None while the other is not"
|
|
378
|
+
return
|
|
373
379
|
|
|
374
380
|
if isinstance(a, (str, bool)):
|
|
375
381
|
if type(a) != type(b):
|
|
376
|
-
|
|
377
|
-
|
|
382
|
+
yield node_path, f"type mismatch: '{type(a)}' vs '{type(b)}'"
|
|
383
|
+
elif a != b:
|
|
384
|
+
yield node_path, f"value mismatch: '{a}' vs '{b}'"
|
|
385
|
+
return
|
|
378
386
|
|
|
379
387
|
if isinstance(a, (SupportsFloat, SupportsInt)) and isinstance(b, (SupportsFloat, SupportsInt)):
|
|
380
388
|
isint_a = isinstance(a, int) or not isinstance(a, SupportsFloat)
|
|
381
389
|
isint_b = isinstance(b, int) or not isinstance(b, SupportsFloat)
|
|
382
390
|
if isint_a and isint_b:
|
|
383
|
-
|
|
391
|
+
if int(a) != int(b):
|
|
392
|
+
yield node_path, f"integer value mismatch: '{int(a)}' vs '{int(b)}'"
|
|
393
|
+
return
|
|
384
394
|
if int_strict and (isint_a or isint_b):
|
|
385
|
-
|
|
395
|
+
yield node_path, "integer type mismatch under strict mode"
|
|
396
|
+
return
|
|
386
397
|
va = int(a) if isint_a else float(a)
|
|
387
398
|
vb = int(b) if isint_b else float(b)
|
|
388
|
-
if math.isnan(va)
|
|
389
|
-
|
|
399
|
+
if math.isnan(va) or math.isnan(vb):
|
|
400
|
+
if not (math.isnan(va) and math.isnan(vb)):
|
|
401
|
+
yield node_path, "NaN mismatch"
|
|
402
|
+
return
|
|
390
403
|
if math.isinf(va) and math.isinf(vb):
|
|
391
|
-
|
|
392
|
-
|
|
404
|
+
if va != vb:
|
|
405
|
+
yield node_path, "infinity sign mismatch"
|
|
406
|
+
return
|
|
407
|
+
if abs(va - vb) > float_tol:
|
|
408
|
+
yield node_path, f"float value mismatch: '{va}' vs '{vb}' with tolerance '{float_tol}'"
|
|
409
|
+
return
|
|
393
410
|
|
|
394
411
|
if isinstance(a, Mapping) and isinstance(b, Mapping):
|
|
395
412
|
if not dict_extra and set(a.keys()) != set(b.keys()):
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
413
|
+
yield node_path, f"dictionary key mismatch: '{set(a.keys())}' vs '{set(b.keys())}'"
|
|
414
|
+
return
|
|
415
|
+
for k in set(a.keys()) & set(b.keys()):
|
|
416
|
+
yield from json_difference(a[k],
|
|
417
|
+
b[k],
|
|
418
|
+
(node_path or []) + [k],
|
|
419
|
+
int_strict=int_strict,
|
|
420
|
+
float_tol=float_tol,
|
|
421
|
+
list_order=list_order,
|
|
422
|
+
dict_extra=dict_extra)
|
|
423
|
+
return
|
|
404
424
|
|
|
405
425
|
if isinstance(a, Sequence) and isinstance(b, Sequence):
|
|
406
426
|
if len(a) != len(b):
|
|
407
|
-
|
|
427
|
+
yield node_path, f"list length mismatch: '{len(a)}' vs '{len(b)}'"
|
|
428
|
+
return
|
|
408
429
|
if list_order:
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
430
|
+
for i, (va, vb) in enumerate(zip(a, b)):
|
|
431
|
+
yield from json_difference(va,
|
|
432
|
+
vb,
|
|
433
|
+
(node_path or []) + [i],
|
|
434
|
+
int_strict=int_strict,
|
|
435
|
+
float_tol=float_tol,
|
|
436
|
+
list_order=list_order,
|
|
437
|
+
dict_extra=dict_extra)
|
|
416
438
|
else:
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
439
|
+
for i, (va, vb) in enumerate(zip(sorted(a), sorted(b))):
|
|
440
|
+
yield from json_difference(va,
|
|
441
|
+
vb,
|
|
442
|
+
(node_path or []) + [i],
|
|
443
|
+
int_strict=int_strict,
|
|
444
|
+
float_tol=float_tol,
|
|
445
|
+
list_order=list_order,
|
|
446
|
+
dict_extra=dict_extra)
|
|
447
|
+
return
|
|
448
|
+
|
|
449
|
+
yield node_path, f"type mismatch: '{type(a)}' vs '{type(b)}'"
|
|
450
|
+
|
|
451
|
+
|
|
452
|
+
def json_equals(
|
|
453
|
+
a: JsonTypeCompatible,
|
|
454
|
+
b: JsonTypeCompatible,
|
|
455
|
+
*,
|
|
456
|
+
int_strict: bool = False,
|
|
457
|
+
float_tol: float = 1e-5,
|
|
458
|
+
list_order: bool = True,
|
|
459
|
+
dict_extra: bool = False,
|
|
460
|
+
) -> bool:
|
|
461
|
+
"""
|
|
462
|
+
Compares two JSON-like structures for equality based on specified criteria.
|
|
463
|
+
|
|
464
|
+
:param a: The first JSON-compatible object to compare.
|
|
465
|
+
:param b: The second JSON-compatible object to compare.
|
|
466
|
+
:param int_strict: Whether to require strict integer type matching.
|
|
467
|
+
:param float_tol: The tolerance for comparing float values.
|
|
468
|
+
:param list_order: Whether to require list order to match.
|
|
469
|
+
:param dict_extra: Whether to allow extra keys in dictionaries.
|
|
470
|
+
:return: ``True`` if the structures are considered equal, ``False`` otherwise.
|
|
471
|
+
"""
|
|
472
|
+
return next(json_difference(a,
|
|
473
|
+
b,
|
|
474
|
+
node_path=[],
|
|
475
|
+
int_strict=int_strict,
|
|
476
|
+
float_tol=float_tol,
|
|
477
|
+
list_order=list_order,
|
|
478
|
+
dict_extra=dict_extra),
|
|
479
|
+
None) is None
|
|
480
|
+
|
|
481
|
+
|
|
482
|
+
json_compare = json_equals
|
|
@@ -4,6 +4,7 @@ import unittest
|
|
|
4
4
|
import ddt
|
|
5
5
|
|
|
6
6
|
from iker.common.utils.funcutils import composable, identity
|
|
7
|
+
from iker.common.utils.funcutils import const, first, packed, second
|
|
7
8
|
from iker.common.utils.funcutils import lazy, memorized, singleton, unique_returns
|
|
8
9
|
from iker.common.utils.randutils import randomizer
|
|
9
10
|
|
|
@@ -19,6 +20,45 @@ class Counter(object):
|
|
|
19
20
|
@ddt.ddt
|
|
20
21
|
class FuncUtilsTest(unittest.TestCase):
|
|
21
22
|
|
|
23
|
+
def test_const(self):
|
|
24
|
+
self.assertEqual(5, const(5)())
|
|
25
|
+
self.assertEqual(5, const(5)(1, 2, 3))
|
|
26
|
+
self.assertEqual(5, const(5)(a=1, b=2))
|
|
27
|
+
|
|
28
|
+
self.assertEqual("hello", const("hello")())
|
|
29
|
+
self.assertEqual("hello", const("hello")(1, 2, 3))
|
|
30
|
+
self.assertEqual("hello", const("hello")(a=1, b=2))
|
|
31
|
+
|
|
32
|
+
def test_first(self):
|
|
33
|
+
self.assertEqual(1, first()((1, "a")))
|
|
34
|
+
self.assertEqual("key", first()(("key", 12)))
|
|
35
|
+
self.assertEqual((1, 2), first()(((1, 2), "value")))
|
|
36
|
+
|
|
37
|
+
with self.assertRaises(ValueError):
|
|
38
|
+
first()((1, 2, 3))
|
|
39
|
+
with self.assertRaises(ValueError):
|
|
40
|
+
first()(123)
|
|
41
|
+
|
|
42
|
+
def test_second(self):
|
|
43
|
+
self.assertEqual("a", second()((1, "a")))
|
|
44
|
+
self.assertEqual(12, second()(("key", 12)))
|
|
45
|
+
self.assertEqual("value", second()(((1, 2), "value")))
|
|
46
|
+
|
|
47
|
+
with self.assertRaises(ValueError):
|
|
48
|
+
second()((1, 2, 3))
|
|
49
|
+
with self.assertRaises(ValueError):
|
|
50
|
+
second()(123)
|
|
51
|
+
|
|
52
|
+
def test_packed(self):
|
|
53
|
+
self.assertEqual(3, packed(lambda x, y: x + y)((1, 2)))
|
|
54
|
+
self.assertEqual(12, packed(lambda x, y, z: x + y + z)((3, 4, 5)))
|
|
55
|
+
self.assertEqual("aab", packed(lambda a, b, x, y: a * x + b * y)(("a", "b", 2, 1)))
|
|
56
|
+
|
|
57
|
+
with self.assertRaises(TypeError):
|
|
58
|
+
packed(lambda x, y, z: x ** y ** z)((2, 3, 4, 5))
|
|
59
|
+
with self.assertRaises(TypeError):
|
|
60
|
+
packed(lambda x, y, z: x ** y ** z)((2, 3))
|
|
61
|
+
|
|
22
62
|
def test_identity(self):
|
|
23
63
|
self.assertEqual(1, identity(1))
|
|
24
64
|
self.assertEqual("test", identity("test"))
|