scistackplotdb 0.1.26__tar.gz → 0.1.28__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.
- {scistackplotdb-0.1.26 → scistackplotdb-0.1.28}/.gitignore +4 -0
- {scistackplotdb-0.1.26 → scistackplotdb-0.1.28}/PKG-INFO +3 -1
- {scistackplotdb-0.1.26 → scistackplotdb-0.1.28}/pyproject.toml +2 -0
- {scistackplotdb-0.1.26 → scistackplotdb-0.1.28}/src/scistackplotdb/__init__.py +7 -1
- {scistackplotdb-0.1.26 → scistackplotdb-0.1.28}/src/scistackplotdb/variants.py +49 -0
- {scistackplotdb-0.1.26 → scistackplotdb-0.1.28}/README.md +0 -0
- {scistackplotdb-0.1.26 → scistackplotdb-0.1.28}/src/scistackplotdb/endpoint.py +0 -0
- {scistackplotdb-0.1.26 → scistackplotdb-0.1.28}/src/scistackplotdb/hierarchy.py +0 -0
- {scistackplotdb-0.1.26 → scistackplotdb-0.1.28}/src/scistackplotdb/load.py +0 -0
- {scistackplotdb-0.1.26 → scistackplotdb-0.1.28}/src/scistackplotdb/source.py +0 -0
|
@@ -20,6 +20,10 @@ __pycache__/
|
|
|
20
20
|
*.duckdb.wal
|
|
21
21
|
*.wal
|
|
22
22
|
scistack-gui/frontend/node_modules/
|
|
23
|
+
# Compiled output of the frontend's React-free unit tests (npm test in
|
|
24
|
+
# scistack-gui/frontend). Regenerated by `tsc -p tsconfig.test.json`; unlike
|
|
25
|
+
# extension/dist/, nothing loads it at runtime.
|
|
26
|
+
scistack-gui/frontend/dist/
|
|
23
27
|
# mkdocs build output (regenerated by `mkdocs build`)
|
|
24
28
|
/site/
|
|
25
29
|
# Runtime output of code_export_service (pipeline-to-code export) — timestamped
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: scistackplotdb
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.28
|
|
4
4
|
Summary: scidb-backed plotting: load variables into long tables and plot them with scistackplot
|
|
5
5
|
Author: SciStack Contributors
|
|
6
6
|
License-Expression: MIT
|
|
@@ -10,8 +10,10 @@ Classifier: Intended Audience :: Science/Research
|
|
|
10
10
|
Classifier: License :: OSI Approved :: MIT License
|
|
11
11
|
Classifier: Operating System :: OS Independent
|
|
12
12
|
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
13
14
|
Classifier: Programming Language :: Python :: 3.11
|
|
14
15
|
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
15
17
|
Classifier: Topic :: Scientific/Engineering :: Visualization
|
|
16
18
|
Classifier: Typing :: Typed
|
|
17
19
|
Requires-Python: >=3.10
|
|
@@ -29,8 +29,10 @@ classifiers = [
|
|
|
29
29
|
"License :: OSI Approved :: MIT License",
|
|
30
30
|
"Operating System :: OS Independent",
|
|
31
31
|
"Programming Language :: Python :: 3",
|
|
32
|
+
"Programming Language :: Python :: 3.10",
|
|
32
33
|
"Programming Language :: Python :: 3.11",
|
|
33
34
|
"Programming Language :: Python :: 3.12",
|
|
35
|
+
"Programming Language :: Python :: 3.13",
|
|
34
36
|
"Topic :: Scientific/Engineering :: Visualization",
|
|
35
37
|
"Typing :: Typed",
|
|
36
38
|
]
|
|
@@ -50,13 +50,19 @@ from .load import (
|
|
|
50
50
|
schema_keys,
|
|
51
51
|
)
|
|
52
52
|
from .source import ScidbSource
|
|
53
|
-
from .variants import
|
|
53
|
+
from .variants import (
|
|
54
|
+
branch_params_for,
|
|
55
|
+
selection_for,
|
|
56
|
+
variant_graph,
|
|
57
|
+
variant_set,
|
|
58
|
+
)
|
|
54
59
|
|
|
55
60
|
__all__ = [
|
|
56
61
|
"ScidbSource",
|
|
57
62
|
"variant_set",
|
|
58
63
|
"variant_graph",
|
|
59
64
|
"selection_for",
|
|
65
|
+
"branch_params_for",
|
|
60
66
|
"VariableFrame",
|
|
61
67
|
"VERSION_FACTOR_PREFIX",
|
|
62
68
|
"MISSING_VERSION_LEVEL",
|
|
@@ -95,6 +95,55 @@ def selection_for(
|
|
|
95
95
|
return selection
|
|
96
96
|
|
|
97
97
|
|
|
98
|
+
def branch_params_for(selection: dict[str, Any]) -> dict[str, Any]:
|
|
99
|
+
"""The inverse of :func:`selection_for`: a column-keyed selection →
|
|
100
|
+
``Variant.branch_params``.
|
|
101
|
+
|
|
102
|
+
Needed because the schema location picker asks **scidb** a question about a
|
|
103
|
+
variant the plotting layer is holding: "which locations have this one?"
|
|
104
|
+
``scidb.locations.location_states`` takes a ``branch_params_filter``, the
|
|
105
|
+
same dict ``Variant`` builds and ``find_record_id`` matches on, so the
|
|
106
|
+
picker's dots and a ``Variant(...).load()`` cannot disagree about which
|
|
107
|
+
records a selection names.
|
|
108
|
+
|
|
109
|
+
Three mappings, and the third is the one worth reading twice:
|
|
110
|
+
|
|
111
|
+
* ``Code:<fn>`` → ``__code__.<fn>``;
|
|
112
|
+
* anything else is already ``fn.param``, scidb's own namespacing, and
|
|
113
|
+
passes through — including a **list** value, which scidb already reads as
|
|
114
|
+
membership (``database.py``'s list-valued branch params), so the picker's
|
|
115
|
+
multi-checkbox needs no new scidb work;
|
|
116
|
+
* the :data:`~scistackplotdb.load.LATEST_COLUMN` flag → ``__code__ =
|
|
117
|
+
"latest"``. Both spell the same **per-location** rule (each schema
|
|
118
|
+
location contributes its own newest record, rather than the global highest
|
|
119
|
+
ordinal), which is exactly the meaning this picker needs: a location never
|
|
120
|
+
re-run under the newest code must show up as the record it actually has,
|
|
121
|
+
not as red.
|
|
122
|
+
|
|
123
|
+
``CodeIsLatest: False`` has no scidb spelling — "not the latest" is not a
|
|
124
|
+
pin — so it is dropped with a warning rather than silently inverted.
|
|
125
|
+
"""
|
|
126
|
+
from scidb.variant import CODE_PIN_PREFIX, LATEST_VERSION
|
|
127
|
+
|
|
128
|
+
out: dict[str, Any] = {}
|
|
129
|
+
for key, value in (selection or {}).items():
|
|
130
|
+
if key == LATEST_COLUMN:
|
|
131
|
+
if value is False:
|
|
132
|
+
Log.warn(
|
|
133
|
+
"selection pins %s=False, which scidb cannot express "
|
|
134
|
+
"(there is no 'not the latest' pin) — ignoring it",
|
|
135
|
+
LATEST_COLUMN,
|
|
136
|
+
layer=LAYER,
|
|
137
|
+
)
|
|
138
|
+
continue
|
|
139
|
+
out[CODE_PIN_PREFIX] = LATEST_VERSION
|
|
140
|
+
elif key.startswith(CODE_FACTOR_PREFIX):
|
|
141
|
+
out[f"{CODE_PIN_PREFIX}.{key[len(CODE_FACTOR_PREFIX):]}"] = value
|
|
142
|
+
else:
|
|
143
|
+
out[key] = value
|
|
144
|
+
return out
|
|
145
|
+
|
|
146
|
+
|
|
98
147
|
def _axes_of(table: LongTable | None) -> list[dict]:
|
|
99
148
|
if table is None:
|
|
100
149
|
return []
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|