kleinkram 0.38.1.dev20241125112529__py3-none-any.whl → 0.38.1.dev20250113080249__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.
Potentially problematic release.
This version of kleinkram might be problematic. Click here for more details.
- kleinkram/__init__.py +33 -2
- kleinkram/api/client.py +21 -16
- kleinkram/api/deser.py +165 -0
- kleinkram/api/file_transfer.py +13 -24
- kleinkram/api/pagination.py +56 -0
- kleinkram/api/query.py +111 -0
- kleinkram/api/routes.py +270 -97
- kleinkram/auth.py +21 -20
- kleinkram/cli/__init__.py +0 -0
- kleinkram/{commands/download.py → cli/_download.py} +18 -44
- kleinkram/cli/_endpoint.py +58 -0
- kleinkram/{commands/list.py → cli/_list.py} +25 -38
- kleinkram/cli/_mission.py +153 -0
- kleinkram/cli/_project.py +99 -0
- kleinkram/cli/_upload.py +84 -0
- kleinkram/cli/_verify.py +56 -0
- kleinkram/{app.py → cli/app.py} +50 -22
- kleinkram/cli/error_handling.py +44 -0
- kleinkram/config.py +141 -107
- kleinkram/core.py +251 -3
- kleinkram/errors.py +13 -45
- kleinkram/main.py +1 -1
- kleinkram/models.py +48 -149
- kleinkram/printing.py +325 -0
- kleinkram/py.typed +0 -0
- kleinkram/types.py +9 -0
- kleinkram/utils.py +82 -27
- kleinkram/wrappers.py +401 -0
- {kleinkram-0.38.1.dev20241125112529.dist-info → kleinkram-0.38.1.dev20250113080249.dist-info}/METADATA +3 -3
- kleinkram-0.38.1.dev20250113080249.dist-info/RECORD +48 -0
- {kleinkram-0.38.1.dev20241125112529.dist-info → kleinkram-0.38.1.dev20250113080249.dist-info}/WHEEL +1 -1
- {kleinkram-0.38.1.dev20241125112529.dist-info → kleinkram-0.38.1.dev20250113080249.dist-info}/top_level.txt +1 -0
- testing/__init__.py +0 -0
- testing/backend_fixtures.py +69 -0
- tests/conftest.py +7 -0
- tests/test_config.py +115 -0
- tests/test_core.py +165 -0
- tests/test_end_to_end.py +29 -39
- tests/test_fixtures.py +29 -0
- tests/test_printing.py +62 -0
- tests/test_query.py +138 -0
- tests/test_utils.py +34 -24
- tests/test_wrappers.py +71 -0
- kleinkram/api/parsing.py +0 -86
- kleinkram/commands/__init__.py +0 -1
- kleinkram/commands/endpoint.py +0 -62
- kleinkram/commands/mission.py +0 -69
- kleinkram/commands/project.py +0 -24
- kleinkram/commands/upload.py +0 -164
- kleinkram/commands/verify.py +0 -142
- kleinkram/consts.py +0 -8
- kleinkram/enums.py +0 -10
- kleinkram/resources.py +0 -158
- kleinkram-0.38.1.dev20241125112529.dist-info/LICENSE +0 -674
- kleinkram-0.38.1.dev20241125112529.dist-info/RECORD +0 -37
- tests/test_resources.py +0 -137
- {kleinkram-0.38.1.dev20241125112529.dist-info → kleinkram-0.38.1.dev20250113080249.dist-info}/entry_points.txt +0 -0
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
kleinkram/__init__.py,sha256=adI-FqfuuH56n8U-lJa3uZkH_saxi7dr4Hox_HBuf9A,107
|
|
2
|
-
kleinkram/__main__.py,sha256=B9RiZxfO4jpCmWPUHyKJ7_EoZlEG4sPpH-nz7T_YhhQ,125
|
|
3
|
-
kleinkram/_version.py,sha256=QYJyRTcqFcJj4qWYpqs7WcoOP6jxDMqyvxLY-cD6KcE,129
|
|
4
|
-
kleinkram/app.py,sha256=dhXHl9xYXnfahXKbkyNI_EpTvtmmsrEjxbpPOANI7SY,5584
|
|
5
|
-
kleinkram/auth.py,sha256=G1RRyJBMR1IFLL2lR3D2RjkYtlkHWXZwCHRP-bRKKmk,2857
|
|
6
|
-
kleinkram/config.py,sha256=-MEgsSAzQg7jUSr8czRj8Y2DxbqMIKPDy4HBvnZ2oaI,4373
|
|
7
|
-
kleinkram/consts.py,sha256=70GELDssDm-YeIbChBRTscnNRcyWRUDWWlYBjVWNLDk,205
|
|
8
|
-
kleinkram/core.py,sha256=XmNhg1i520w-9et8r0LSQRsVN09gJgSXfyHRV1tu2rM,227
|
|
9
|
-
kleinkram/enums.py,sha256=bX0H8_xkh_7DRycJYII8MTjHmjbcFW9ZJ3tzlzRhT2k,149
|
|
10
|
-
kleinkram/errors.py,sha256=PVwgUAIuPie8uufN1UuuEAGQR-K41jFSygE1bMdhCwo,1869
|
|
11
|
-
kleinkram/main.py,sha256=hmFuSnE2p-E4nZ2zDVToOsoELZhosLN0r4wsXnbmsas,168
|
|
12
|
-
kleinkram/models.py,sha256=FFsbgcWN6GH3dFcbRDN2IPiVZ1wQG-FbYGtM64JaI_E,4303
|
|
13
|
-
kleinkram/resources.py,sha256=LqSLU5WPQOZZGG6w6-8E_Uy3B2AOc6dRjyZYiTByunY,4684
|
|
14
|
-
kleinkram/utils.py,sha256=BG6BrNc5eNARQ0nG4J2_rEK28bX--8KwwA2eIdXZo3o,4619
|
|
15
|
-
kleinkram/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
|
-
kleinkram/api/client.py,sha256=L0e6-KxpEmhNH-Z0_FgAIFqhAERRphlpyffjky8umOA,3385
|
|
17
|
-
kleinkram/api/file_transfer.py,sha256=pI9QKSpZFeIPY6fFwWsBxQr0PE9UW97Dp8UlKRZ5owY,13144
|
|
18
|
-
kleinkram/api/parsing.py,sha256=bvUwrSrM9SnDs_TGRq-HHOvH9hu3aTAq5S_bNLHA3Wk,2549
|
|
19
|
-
kleinkram/api/routes.py,sha256=o-ZoQlK3pZ1jx-sD2-EXEXAa5XZ8BsIXa0jLQ0Ogst4,6062
|
|
20
|
-
kleinkram/commands/__init__.py,sha256=U4S_2y3zgLZVfMenHRaJFBW8yqh2mUBuI291LGQVOJ8,35
|
|
21
|
-
kleinkram/commands/download.py,sha256=LydLgo3MMBfp35eENOKxuvV8z3eTSmmANcMcSQpgB88,3368
|
|
22
|
-
kleinkram/commands/endpoint.py,sha256=VgaleKTev8Muu4OmS4tptbhrbl58u1UTAxEmoLBCQew,1642
|
|
23
|
-
kleinkram/commands/list.py,sha256=NmTI6j-w-pp4Xf-U02HgKayb2U5H_3TvUytudY1lMNg,3316
|
|
24
|
-
kleinkram/commands/mission.py,sha256=on1mYcYbixOSqhciqB2GugmO2WyzZN4jgoS0mA78BaU,2214
|
|
25
|
-
kleinkram/commands/project.py,sha256=q-kJ1YQr-Axo-Zl0qe2J7eGGgKlSbcdDjpAJIynRLaM,587
|
|
26
|
-
kleinkram/commands/upload.py,sha256=rKS7_zPfHpOm6UG595Wfn9AKEAJ0sr9aqScpyaKruwo,5102
|
|
27
|
-
kleinkram/commands/verify.py,sha256=96yBA7rpQRsAdSGPZXE6gpvnw7e_patex2XqvNeDJLc,4841
|
|
28
|
-
tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
29
|
-
tests/test_end_to_end.py,sha256=uGNsNz9HszzKYSXMUcTYzjMuYJkCEWjE9yt3IszcsY0,2855
|
|
30
|
-
tests/test_resources.py,sha256=y6Ibi1fn7oBV19-XVtgwqLLOYKAGwi7DcimkG5CLPI8,3802
|
|
31
|
-
tests/test_utils.py,sha256=zFtr66_TV68xcGchX64jRS-08mwWE-WghS6F3GXRpIc,4018
|
|
32
|
-
kleinkram-0.38.1.dev20241125112529.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
33
|
-
kleinkram-0.38.1.dev20241125112529.dist-info/METADATA,sha256=NIoNLmkeTm4u4ap17SyRZ8yU96pqQvN5ciQjN1JBnO4,2324
|
|
34
|
-
kleinkram-0.38.1.dev20241125112529.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
35
|
-
kleinkram-0.38.1.dev20241125112529.dist-info/entry_points.txt,sha256=SaB2l5aqhSr8gmaMw2kvQU90a8Bnl7PedU8cWYxkfYo,46
|
|
36
|
-
kleinkram-0.38.1.dev20241125112529.dist-info/top_level.txt,sha256=G1Lj9vHAtZn402Ukkrfll-6BCmnDNy_HVtWeNvXzdDA,16
|
|
37
|
-
kleinkram-0.38.1.dev20241125112529.dist-info/RECORD,,
|
tests/test_resources.py
DELETED
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
from uuid import uuid4
|
|
4
|
-
|
|
5
|
-
import pytest
|
|
6
|
-
from kleinkram.resources import check_mission_spec_is_creatable
|
|
7
|
-
from kleinkram.resources import check_project_spec_is_creatable
|
|
8
|
-
from kleinkram.resources import InvalidMissionSpec
|
|
9
|
-
from kleinkram.resources import InvalidProjectSpec
|
|
10
|
-
from kleinkram.resources import mission_spec_is_unique
|
|
11
|
-
from kleinkram.resources import MissionSpec
|
|
12
|
-
from kleinkram.resources import project_spec_is_unique
|
|
13
|
-
from kleinkram.resources import ProjectSpec
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
@pytest.mark.parametrize(
|
|
17
|
-
"spec, expected",
|
|
18
|
-
[
|
|
19
|
-
pytest.param(MissionSpec(), False, id="match all"),
|
|
20
|
-
pytest.param(MissionSpec(patterns=["*"]), False, id="mission name match all"),
|
|
21
|
-
pytest.param(
|
|
22
|
-
MissionSpec(patterns=["test"]),
|
|
23
|
-
False,
|
|
24
|
-
id="mission name without project",
|
|
25
|
-
),
|
|
26
|
-
pytest.param(
|
|
27
|
-
MissionSpec(patterns=["test"], project_spec=ProjectSpec()),
|
|
28
|
-
False,
|
|
29
|
-
id="mission name with non-unique project",
|
|
30
|
-
),
|
|
31
|
-
pytest.param(
|
|
32
|
-
MissionSpec(
|
|
33
|
-
patterns=["test"],
|
|
34
|
-
project_spec=ProjectSpec(ids=[uuid4()]),
|
|
35
|
-
),
|
|
36
|
-
True,
|
|
37
|
-
id="mission name with unique project",
|
|
38
|
-
),
|
|
39
|
-
pytest.param(
|
|
40
|
-
MissionSpec(ids=[uuid4()]),
|
|
41
|
-
True,
|
|
42
|
-
id="mission by id",
|
|
43
|
-
),
|
|
44
|
-
pytest.param(
|
|
45
|
-
MissionSpec(ids=[uuid4(), uuid4()]),
|
|
46
|
-
False,
|
|
47
|
-
id="multiple mission ids",
|
|
48
|
-
),
|
|
49
|
-
],
|
|
50
|
-
)
|
|
51
|
-
def test_mission_spec_is_unique(spec, expected):
|
|
52
|
-
assert mission_spec_is_unique(spec) == expected
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
@pytest.mark.parametrize(
|
|
56
|
-
"spec, expected",
|
|
57
|
-
[
|
|
58
|
-
pytest.param(ProjectSpec(), False, id="match all"),
|
|
59
|
-
pytest.param(ProjectSpec(patterns=["*"]), False, id="project name match all"),
|
|
60
|
-
pytest.param(
|
|
61
|
-
ProjectSpec(patterns=["test"]),
|
|
62
|
-
True,
|
|
63
|
-
id="project name",
|
|
64
|
-
),
|
|
65
|
-
pytest.param(
|
|
66
|
-
ProjectSpec(ids=[uuid4()]),
|
|
67
|
-
True,
|
|
68
|
-
id="project by id",
|
|
69
|
-
),
|
|
70
|
-
pytest.param(
|
|
71
|
-
ProjectSpec(ids=[uuid4(), uuid4()]),
|
|
72
|
-
False,
|
|
73
|
-
id="multiple project ids",
|
|
74
|
-
),
|
|
75
|
-
],
|
|
76
|
-
)
|
|
77
|
-
def test_project_spec_is_unique(spec, expected):
|
|
78
|
-
assert project_spec_is_unique(spec) == expected
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
@pytest.mark.parametrize(
|
|
82
|
-
"spec, valid",
|
|
83
|
-
[
|
|
84
|
-
pytest.param(
|
|
85
|
-
MissionSpec(patterns=["test"], project_spec=ProjectSpec()),
|
|
86
|
-
False,
|
|
87
|
-
id="non-unique project",
|
|
88
|
-
),
|
|
89
|
-
pytest.param(
|
|
90
|
-
MissionSpec(
|
|
91
|
-
patterns=["test"],
|
|
92
|
-
project_spec=ProjectSpec(ids=[uuid4()]),
|
|
93
|
-
),
|
|
94
|
-
True,
|
|
95
|
-
id="valid spec",
|
|
96
|
-
),
|
|
97
|
-
pytest.param(
|
|
98
|
-
MissionSpec(ids=[uuid4()]),
|
|
99
|
-
False,
|
|
100
|
-
id="mission by id",
|
|
101
|
-
),
|
|
102
|
-
],
|
|
103
|
-
)
|
|
104
|
-
def test_check_mission_spec_is_createable(spec, valid):
|
|
105
|
-
if not valid:
|
|
106
|
-
with pytest.raises(InvalidMissionSpec):
|
|
107
|
-
check_mission_spec_is_creatable(spec)
|
|
108
|
-
else:
|
|
109
|
-
check_mission_spec_is_creatable(spec)
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
@pytest.mark.parametrize(
|
|
113
|
-
"spec, valid",
|
|
114
|
-
[
|
|
115
|
-
pytest.param(
|
|
116
|
-
ProjectSpec(patterns=["test"]),
|
|
117
|
-
True,
|
|
118
|
-
id="project name",
|
|
119
|
-
),
|
|
120
|
-
pytest.param(
|
|
121
|
-
ProjectSpec(ids=[uuid4()]),
|
|
122
|
-
False,
|
|
123
|
-
id="project by id",
|
|
124
|
-
),
|
|
125
|
-
pytest.param(
|
|
126
|
-
ProjectSpec(ids=[uuid4(), uuid4()]),
|
|
127
|
-
False,
|
|
128
|
-
id="multiple project ids",
|
|
129
|
-
),
|
|
130
|
-
],
|
|
131
|
-
)
|
|
132
|
-
def test_check_project_spec_is_creatable(spec, valid):
|
|
133
|
-
if not valid:
|
|
134
|
-
with pytest.raises(InvalidProjectSpec):
|
|
135
|
-
check_project_spec_is_creatable(spec)
|
|
136
|
-
else:
|
|
137
|
-
check_project_spec_is_creatable(spec)
|
|
File without changes
|