cave-utils 2.2.0b2__tar.gz → 2.2.0b3__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.
Files changed (36) hide show
  1. {cave_utils-2.2.0b2/cave_utils.egg-info → cave_utils-2.2.0b3}/PKG-INFO +1 -1
  2. {cave_utils-2.2.0b2 → cave_utils-2.2.0b3}/cave_utils/api/groupedOutputs.py +32 -17
  3. {cave_utils-2.2.0b2 → cave_utils-2.2.0b3}/cave_utils/api/pages.py +3 -1
  4. {cave_utils-2.2.0b2 → cave_utils-2.2.0b3/cave_utils.egg-info}/PKG-INFO +1 -1
  5. {cave_utils-2.2.0b2 → cave_utils-2.2.0b3}/pyproject.toml +1 -1
  6. {cave_utils-2.2.0b2 → cave_utils-2.2.0b3}/setup.cfg +1 -1
  7. {cave_utils-2.2.0b2 → cave_utils-2.2.0b3}/LICENSE +0 -0
  8. {cave_utils-2.2.0b2 → cave_utils-2.2.0b3}/NOTICE.md +0 -0
  9. {cave_utils-2.2.0b2 → cave_utils-2.2.0b3}/README.md +0 -0
  10. {cave_utils-2.2.0b2 → cave_utils-2.2.0b3}/cave_utils/__init__.py +0 -0
  11. {cave_utils-2.2.0b2 → cave_utils-2.2.0b3}/cave_utils/api/__init__.py +0 -0
  12. {cave_utils-2.2.0b2 → cave_utils-2.2.0b3}/cave_utils/api/appBar.py +0 -0
  13. {cave_utils-2.2.0b2 → cave_utils-2.2.0b3}/cave_utils/api/extraKwargs.py +0 -0
  14. {cave_utils-2.2.0b2 → cave_utils-2.2.0b3}/cave_utils/api/globalOutputs.py +0 -0
  15. {cave_utils-2.2.0b2 → cave_utils-2.2.0b3}/cave_utils/api/mapFeatures.py +0 -0
  16. {cave_utils-2.2.0b2 → cave_utils-2.2.0b3}/cave_utils/api/maps.py +0 -0
  17. {cave_utils-2.2.0b2 → cave_utils-2.2.0b3}/cave_utils/api/panes.py +0 -0
  18. {cave_utils-2.2.0b2 → cave_utils-2.2.0b3}/cave_utils/api/settings.py +0 -0
  19. {cave_utils-2.2.0b2 → cave_utils-2.2.0b3}/cave_utils/api_utils/__init__.py +0 -0
  20. {cave_utils-2.2.0b2 → cave_utils-2.2.0b3}/cave_utils/api_utils/general.py +0 -0
  21. {cave_utils-2.2.0b2 → cave_utils-2.2.0b3}/cave_utils/api_utils/validator.py +0 -0
  22. {cave_utils-2.2.0b2 → cave_utils-2.2.0b3}/cave_utils/api_utils/validator_utils.py +0 -0
  23. {cave_utils-2.2.0b2 → cave_utils-2.2.0b3}/cave_utils/arguments.py +0 -0
  24. {cave_utils-2.2.0b2 → cave_utils-2.2.0b3}/cave_utils/builders/__init__.py +0 -0
  25. {cave_utils-2.2.0b2 → cave_utils-2.2.0b3}/cave_utils/builders/groups.py +0 -0
  26. {cave_utils-2.2.0b2 → cave_utils-2.2.0b3}/cave_utils/log.py +0 -0
  27. {cave_utils-2.2.0b2 → cave_utils-2.2.0b3}/cave_utils/socket.py +0 -0
  28. {cave_utils-2.2.0b2 → cave_utils-2.2.0b3}/cave_utils.egg-info/SOURCES.txt +0 -0
  29. {cave_utils-2.2.0b2 → cave_utils-2.2.0b3}/cave_utils.egg-info/dependency_links.txt +0 -0
  30. {cave_utils-2.2.0b2 → cave_utils-2.2.0b3}/cave_utils.egg-info/requires.txt +0 -0
  31. {cave_utils-2.2.0b2 → cave_utils-2.2.0b3}/cave_utils.egg-info/top_level.txt +0 -0
  32. {cave_utils-2.2.0b2 → cave_utils-2.2.0b3}/test/test_arguments.py +0 -0
  33. {cave_utils-2.2.0b2 → cave_utils-2.2.0b3}/test/test_builders_groups.py +0 -0
  34. {cave_utils-2.2.0b2 → cave_utils-2.2.0b3}/test/test_import.py +0 -0
  35. {cave_utils-2.2.0b2 → cave_utils-2.2.0b3}/test/test_log.py +0 -0
  36. {cave_utils-2.2.0b2 → cave_utils-2.2.0b3}/test/test_validator.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cave_utils
3
- Version: 2.2.0b2
3
+ Version: 2.2.0b3
4
4
  Summary: Python wrapper for api use in the cave_app
5
5
  Author-email: Connor Makowski <conmak@mit.edu>
6
6
  Project-URL: Homepage, https://github.com/mit-cave/cave_utils
@@ -279,13 +279,13 @@ class groupedOutputs_groupings_star(ApiValidator):
279
279
  levels_data = self.data.get("levels", {})
280
280
  levels_data_keys = list(levels_data.keys())
281
281
  data_data = self.data.get("data", {})
282
-
283
282
  CustomKeyValidator(
284
283
  data=levels_data,
285
284
  log=self.log,
286
285
  prepend_path=["levels"],
287
286
  validator=groupedOutputs_groupings_star_levels_star,
288
287
  acceptable_parents=levels_data_keys,
288
+ acceptable_data_levels=data_data,
289
289
  **kwargs,
290
290
  )
291
291
  groupedOutputs_groupings_star_data(
@@ -348,7 +348,7 @@ class groupedOutputs_groupings_star_levels_star(ApiValidator):
348
348
  """
349
349
 
350
350
  @staticmethod
351
- def spec(name: str, parent: [str, None] = None, ordering: [list, None] = None, **kwargs):
351
+ def spec(name: str, parent: [str, None] = None, ordering: [list, None] = None, orderWithParent: bool = True, coloring: [dict, None] = None, **kwargs):
352
352
  """
353
353
  Arguments:
354
354
 
@@ -358,16 +358,22 @@ class groupedOutputs_groupings_star_levels_star(ApiValidator):
358
358
  * **Notes**:
359
359
  * The parent level key must be defined in `groupedOutputs.groupings.*.levels.*`
360
360
  * If `None`, this will be considered to be the root of the hierarchy.
361
+ * **`ordering`**: `[list]` &rarr;
362
+ * The ordering of individual values for this level in charts and tables.
363
+ * **Note**: If none, the ordering will be alphabetical.
364
+ * **Note**: If a partial ordering is provided, the provided values will be placed first in order.
365
+ * **Note**: If a partial ordering is provided, the remaining values will be placed in alphabetical order.
366
+ * **Note**: All items in this list must be defined in `groupedOutputs.groupings.*.levels.*.values.*`
367
+ * **`orderWithParent`**: `[bool]`=True &rarr;
368
+ * Weather or not to order this level based on the parent level.
369
+ * If `True`, the ordering of this level will also be based on the parent level.
370
+ * If `False`, the ordering will be based on the ordering of this level only.
371
+ * **`coloring`**: `[dict]` &rarr;
372
+ * A dictionary of colors to be used for the level.
373
+ * Each key in this dictionary is a value in the level.
374
+ * Each value in this dictionary is an rgba string.
375
+ * **See**: `cave_utils.api.groupedOutputs.groupedOutputs_groupings_star_levels_star_coloring`
361
376
  """
362
- # TODO: Figure out new way for ordering
363
- # - `ordering`:
364
- # - Type: list
365
- # - What: The ordering of individual values for this level in charts and tables.
366
- # - Note: If none, the ordering will be alphabetical.
367
- # - Note: If a partial ordering is provided, the provided values will be placed first in order.
368
- # - Note: If a partial ordering is provided, the remaining values will be placed in alphabetical order.
369
- # - Note: All items in this list must be defined in `groupedOutputs.groupings.*.levels.*.values.*`
370
- # """
371
377
  return {"kwargs": kwargs, "accepted_values": {}}
372
378
 
373
379
  def __extend_spec__(self, **kwargs):
@@ -378,9 +384,18 @@ class groupedOutputs_groupings_star_levels_star(ApiValidator):
378
384
  valid_values=kwargs.get("acceptable_parents", []),
379
385
  prepend_path=["parent"],
380
386
  )
381
- # ordering = self.data.get("ordering")
382
- # if ordering is not None:
383
- # print(ordering, kwargs.get("acceptable_data_keys", []))
384
- # self.__check_subset_valid__(
385
- # subset=ordering, valid_values=kwargs.get("acceptable_data_keys", []), prepend_path=["ordering"]
386
- # )
387
+ ordering = self.data.get("ordering")
388
+ if ordering is not None:
389
+ self.__check_subset_valid__(
390
+ subset=ordering, valid_values=kwargs.get("acceptable_data_levels", {}).get(kwargs.get('CustomKeyValidatorFieldId'),[]), prepend_path=["ordering"]
391
+ )
392
+
393
+ coloring = self.data.get("coloring")
394
+ if coloring is not None:
395
+ self.__check_subset_valid__(
396
+ subset=list(coloring.keys()),
397
+ valid_values=kwargs.get("acceptable_data_levels", {}).get(kwargs.get('CustomKeyValidatorFieldId'),[]),
398
+ prepend_path=["coloring"],
399
+ )
400
+ for key, value in coloring.items():
401
+ self.__check_rgba_string_valid__(rgba_string=value, prepend_path=['coloring', key])
@@ -82,6 +82,7 @@ class pages_data_star_pageLayout(ApiValidator):
82
82
  statId: [str, list, None] = None,
83
83
  showToolbar: bool = True,
84
84
  maximized: bool = False,
85
+ defaultToZero: bool = False,
85
86
  **kwargs,
86
87
  ):
87
88
  """
@@ -135,7 +136,8 @@ class pages_data_star_pageLayout(ApiValidator):
135
136
  * **Note**: If left unspecified (i.e., `None`), it will default to `settings.showToolbar`.
136
137
  * **`maximized`**: `[bool]` = `False` &rarr; Whether or not the layout should be maximized.
137
138
  * **Note**: If more than one chart belonging to the same page layout is set to `True`, the first one found in the list will take precedence.
138
-
139
+ * **`defaultToZero`**: `[bool]` = `False` &rarr; Whether or not the chart should default missing values to zero.
140
+
139
141
  [area chart]: https://en.wikipedia.org/wiki/Area_chart
140
142
  [bar chart]: https://en.wikipedia.org/wiki/Bar_chart
141
143
  [stacked bar chart]: https://en.wikipedia.org/wiki/Bar_chart
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cave_utils
3
- Version: 2.2.0b2
3
+ Version: 2.2.0b3
4
4
  Summary: Python wrapper for api use in the cave_app
5
5
  Author-email: Connor Makowski <conmak@mit.edu>
6
6
  Project-URL: Homepage, https://github.com/mit-cave/cave_utils
@@ -12,7 +12,7 @@ build-backend = "setuptools.build_meta"
12
12
 
13
13
  [project]
14
14
  name = "cave_utils"
15
- version = "2.2.0b2"
15
+ version = "2.2.0b3"
16
16
  description = "Python wrapper for api use in the cave_app"
17
17
  authors = [
18
18
  {name="Connor Makowski", email="conmak@mit.edu"}
@@ -1,6 +1,6 @@
1
1
  [metadata]
2
2
  name = cave_utils
3
- version = 2.2.0b2
3
+ version = 2.2.0b3
4
4
  description_file = README.md
5
5
 
6
6
  [options]
File without changes
File without changes
File without changes