clear-skies-doc-builder 2.0.5__py3-none-any.whl → 2.0.6__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.
- {clear_skies_doc_builder-2.0.5.dist-info → clear_skies_doc_builder-2.0.6.dist-info}/METADATA +1 -1
- {clear_skies_doc_builder-2.0.5.dist-info → clear_skies_doc_builder-2.0.6.dist-info}/RECORD +7 -7
- {clear_skies_doc_builder-2.0.5.dist-info → clear_skies_doc_builder-2.0.6.dist-info}/WHEEL +1 -1
- clearskies_doc_builder/backends/attribute_backend.py +2 -1
- clearskies_doc_builder/backends/class_backend.py +3 -2
- clearskies_doc_builder/backends/module_backend.py +10 -9
- {clear_skies_doc_builder-2.0.5.dist-info → clear_skies_doc_builder-2.0.6.dist-info}/licenses/LICENSE +0 -0
{clear_skies_doc_builder-2.0.5.dist-info → clear_skies_doc_builder-2.0.6.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: clear-skies-doc-builder
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.6
|
|
4
4
|
Summary: The docbuilder for all 'official' clearskies plugins (as well as the main clearskies docs)
|
|
5
5
|
Project-URL: repository, https://github.com/clearskies-py/docs
|
|
6
6
|
Project-URL: issues, https://github.com/clearskies-py/docs/issues
|
|
@@ -2,9 +2,9 @@ clearskies_doc_builder/__init__.py,sha256=AFQzZ9HwIxPyLpsUhkSDRh_6hm8-5H4RpAelTS
|
|
|
2
2
|
clearskies_doc_builder/build_callable.py,sha256=9_HrytRA5MeGpuUKRFgmlK5Mb1WKt6TfWlCOi1aS-Pc,983
|
|
3
3
|
clearskies_doc_builder/prepare_doc_space.py,sha256=BXIH-CQJ1ZY6sf2bj1Fjhrglihls6AnqMNdjirDqSFM,1019
|
|
4
4
|
clearskies_doc_builder/backends/__init__.py,sha256=q5jpy8xfZ4SbGQ1T30q4mp4h346HaMivvmNqtgTMQxw,303
|
|
5
|
-
clearskies_doc_builder/backends/attribute_backend.py,sha256=
|
|
6
|
-
clearskies_doc_builder/backends/class_backend.py,sha256=
|
|
7
|
-
clearskies_doc_builder/backends/module_backend.py,sha256=
|
|
5
|
+
clearskies_doc_builder/backends/attribute_backend.py,sha256=2nivmJpedPsoQibf9NlIT-Wfvg0PbfHKoT06xKkt0O0,3634
|
|
6
|
+
clearskies_doc_builder/backends/class_backend.py,sha256=JIKRYAVFxYEOHV7tG9RBrfuo1SN8Uw4KKaMz5YzlMHo,4112
|
|
7
|
+
clearskies_doc_builder/backends/module_backend.py,sha256=hHJXt00TJIF3-69p_kjdAZuWOyGhpCvD3TgOKMOp4og,5971
|
|
8
8
|
clearskies_doc_builder/backends/python.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
9
|
clearskies_doc_builder/builders/__init__.py,sha256=ndAK4-imR9vhl7CS425ASYi46FN5-eR9Dr6bKxCn5lA,292
|
|
10
10
|
clearskies_doc_builder/builders/builder.py,sha256=3aQ_UTKJFDDUCNHKhwn1sr74CKR3YCe7xuWRX528eAw,6133
|
|
@@ -32,7 +32,7 @@ clearskies_doc_builder/models/method_reference.py,sha256=U4YOpRLotyEp6G0Y5OHORdo
|
|
|
32
32
|
clearskies_doc_builder/models/module.py,sha256=5JUF2LUKTpVsYlviT7T_qgLdMApGtS4qIUloCEzJ-uo,573
|
|
33
33
|
clearskies_doc_builder/models/module_reference.py,sha256=-zHnrkP6JR7j2XFuW94uGlPENI3ZshxgBu4yY9ayzSg,177
|
|
34
34
|
clearskies_doc_builder/models/property.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
35
|
-
clear_skies_doc_builder-2.0.
|
|
36
|
-
clear_skies_doc_builder-2.0.
|
|
37
|
-
clear_skies_doc_builder-2.0.
|
|
38
|
-
clear_skies_doc_builder-2.0.
|
|
35
|
+
clear_skies_doc_builder-2.0.6.dist-info/METADATA,sha256=zRggQB45s4XRrRCaKqNzCyWDeP-VVZknkY6XupaWytg,3075
|
|
36
|
+
clear_skies_doc_builder-2.0.6.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
37
|
+
clear_skies_doc_builder-2.0.6.dist-info/licenses/LICENSE,sha256=pgH32-xrgpIDf6WIBUA1X19o-sIHIXgToCxo-tBWDdw,1071
|
|
38
|
+
clear_skies_doc_builder-2.0.6.dist-info/RECORD,,
|
|
@@ -5,6 +5,7 @@ import clearskies
|
|
|
5
5
|
import clearskies.column
|
|
6
6
|
import clearskies.model
|
|
7
7
|
import clearskies.query
|
|
8
|
+
from clearskies.query.result import RecordsQueryResult
|
|
8
9
|
|
|
9
10
|
from clearskies_doc_builder.backends.module_backend import ModuleBackend
|
|
10
11
|
|
|
@@ -18,7 +19,7 @@ class AttributeBackend(ModuleBackend):
|
|
|
18
19
|
|
|
19
20
|
def records(
|
|
20
21
|
self, query: clearskies.query.Query, next_page_data: dict[str, str | int] | None = None
|
|
21
|
-
) ->
|
|
22
|
+
) -> RecordsQueryResult:
|
|
22
23
|
"""
|
|
23
24
|
Return a list of records that match the given query configuration.
|
|
24
25
|
|
|
@@ -7,6 +7,7 @@ import clearskies
|
|
|
7
7
|
import clearskies.column
|
|
8
8
|
import clearskies.model
|
|
9
9
|
import clearskies.query
|
|
10
|
+
from clearskies.query.result import RecordsQueryResult
|
|
10
11
|
|
|
11
12
|
from clearskies_doc_builder.backends.module_backend import ModuleBackend
|
|
12
13
|
|
|
@@ -19,7 +20,7 @@ class ClassBackend(ModuleBackend):
|
|
|
19
20
|
|
|
20
21
|
def records(
|
|
21
22
|
self, query: clearskies.query.Query, next_page_data: dict[str, str | int] | None = None
|
|
22
|
-
) ->
|
|
23
|
+
) -> RecordsQueryResult:
|
|
23
24
|
"""
|
|
24
25
|
Return a list of records that match the given query configuration.
|
|
25
26
|
|
|
@@ -53,7 +54,7 @@ class ClassBackend(ModuleBackend):
|
|
|
53
54
|
raise ValueError(
|
|
54
55
|
f"I was asked to import the class named '{import_path}' but this doesn't actually reference a class"
|
|
55
56
|
)
|
|
56
|
-
return [self.unpack(Class, module)]
|
|
57
|
+
return RecordsQueryResult(records=[self.unpack(Class, module)])
|
|
57
58
|
|
|
58
59
|
if "module" not in query.conditions_by_column:
|
|
59
60
|
raise ValueError(
|
|
@@ -9,6 +9,7 @@ import clearskies.model
|
|
|
9
9
|
import clearskies.query
|
|
10
10
|
from clearskies.autodoc.schema import Integer as AutoDocInteger
|
|
11
11
|
from clearskies.autodoc.schema import Schema as AutoDocSchema
|
|
12
|
+
from clearskies.query.result import CountQueryResult, RecordQueryResult, RecordsQueryResult, SuccessQueryResult
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
class ModuleBackend(clearskies.backends.Backend):
|
|
@@ -19,25 +20,25 @@ class ModuleBackend(clearskies.backends.Backend):
|
|
|
19
20
|
"module": lambda module, value: id(module) == id(value),
|
|
20
21
|
}
|
|
21
22
|
|
|
22
|
-
def update(self, id: int | str, data: dict[str, Any], model: clearskies.model.Model) ->
|
|
23
|
+
def update(self, id: int | str, data: dict[str, Any], model: clearskies.model.Model) -> RecordQueryResult:
|
|
23
24
|
"""Update the record with the given id with the information from the data dictionary."""
|
|
24
25
|
raise Exception(f"The {self.__class__.__name__} only supports read operations: update is not allowed")
|
|
25
26
|
|
|
26
|
-
def create(self, data: dict[str, Any], model: clearskies.model.Model) ->
|
|
27
|
+
def create(self, data: dict[str, Any], model: clearskies.model.Model) -> RecordQueryResult:
|
|
27
28
|
"""Create a record with the information from the data dictionary."""
|
|
28
29
|
raise Exception(f"The {self.__class__.__name__} only supports read operations: create is not allowed")
|
|
29
30
|
|
|
30
|
-
def delete(self, id: int | str, model: clearskies.model.Model) ->
|
|
31
|
+
def delete(self, id: int | str, model: clearskies.model.Model) -> SuccessQueryResult:
|
|
31
32
|
"""Delete the record with the given id."""
|
|
32
33
|
raise Exception(f"The {self.__class__.__name__} only supports read operations: delete is not allowed")
|
|
33
34
|
|
|
34
|
-
def count(self, query: clearskies.query.Query) ->
|
|
35
|
+
def count(self, query: clearskies.query.Query) -> CountQueryResult:
|
|
35
36
|
"""Return the number of records which match the given query configuration."""
|
|
36
|
-
return len(self.records(query))
|
|
37
|
+
return CountQueryResult(count=len(self.records(query).records))
|
|
37
38
|
|
|
38
39
|
def records(
|
|
39
40
|
self, query: clearskies.query.Query, next_page_data: dict[str, str | int] | None = None
|
|
40
|
-
) ->
|
|
41
|
+
) -> RecordsQueryResult:
|
|
41
42
|
"""
|
|
42
43
|
Return a list of records that match the given query configuration.
|
|
43
44
|
|
|
@@ -58,7 +59,7 @@ class ModuleBackend(clearskies.backends.Backend):
|
|
|
58
59
|
if module_name_condition:
|
|
59
60
|
module_name = module_name_condition[0].values[0]
|
|
60
61
|
module = importlib.import_module(module_name)
|
|
61
|
-
return [self.unpack(module)]
|
|
62
|
+
return RecordsQueryResult(records=[self.unpack(module)])
|
|
62
63
|
|
|
63
64
|
matching_modules = []
|
|
64
65
|
module_names = set(sys.modules) & set(globals())
|
|
@@ -92,8 +93,8 @@ class ModuleBackend(clearskies.backends.Backend):
|
|
|
92
93
|
"module": module,
|
|
93
94
|
}
|
|
94
95
|
|
|
95
|
-
def paginate(self, records, query):
|
|
96
|
-
return records
|
|
96
|
+
def paginate(self, records, query) -> RecordsQueryResult:
|
|
97
|
+
return RecordsQueryResult(records=records)
|
|
97
98
|
|
|
98
99
|
def validate_pagination_data(self, data: dict[str, Any], case_mapping: Callable) -> str:
|
|
99
100
|
extra_keys = set(data.keys()) - set(self.allowed_pagination_keys())
|
{clear_skies_doc_builder-2.0.5.dist-info → clear_skies_doc_builder-2.0.6.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|