revisit 0.0.16__tar.gz → 0.0.18__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {revisit-0.0.16 → revisit-0.0.18}/PKG-INFO +1 -4
- {revisit-0.0.16 → revisit-0.0.18}/pyproject.toml +1 -4
- {revisit-0.0.16 → revisit-0.0.18}/src/revisit/revisit.py +23 -8
- {revisit-0.0.16 → revisit-0.0.18}/.gitignore +0 -0
- {revisit-0.0.16 → revisit-0.0.18}/README.md +0 -0
- {revisit-0.0.16 → revisit-0.0.18}/src/revisit/StudyConfigSchema.json +0 -0
- {revisit-0.0.16 → revisit-0.0.18}/src/revisit/__init__.py +0 -0
- {revisit-0.0.16 → revisit-0.0.18}/src/revisit/models.py +0 -0
- {revisit-0.0.16 → revisit-0.0.18}/src/revisit/static/widget.css +0 -0
- {revisit-0.0.16 → revisit-0.0.18}/src/revisit/static/widget.js +0 -0
- {revisit-0.0.16 → revisit-0.0.18}/src/revisit/widget.py +0 -0
@@ -1,12 +1,9 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: revisit
|
3
|
-
Version: 0.0.
|
4
|
-
Requires-Dist: altair[all]>=5.5.0
|
3
|
+
Version: 0.0.18
|
5
4
|
Requires-Dist: anywidget
|
6
5
|
Requires-Dist: ipykernel>=6.29.5
|
7
|
-
Requires-Dist: pandas>=2.2.3
|
8
6
|
Requires-Dist: pydantic>=2.10.5
|
9
|
-
Requires-Dist: scipy>=1.15.1
|
10
7
|
Provides-Extra: dev
|
11
8
|
Requires-Dist: jupyterlab; extra == 'dev'
|
12
9
|
Requires-Dist: watchfiles; extra == 'dev'
|
@@ -4,14 +4,11 @@ build-backend = "hatchling.build"
|
|
4
4
|
|
5
5
|
[project]
|
6
6
|
name = "revisit"
|
7
|
-
version = "0.0.
|
7
|
+
version = "0.0.18"
|
8
8
|
dependencies = [
|
9
|
-
"altair[all]>=5.5.0",
|
10
9
|
"anywidget",
|
11
10
|
"ipykernel>=6.29.5",
|
12
|
-
"pandas>=2.2.3",
|
13
11
|
"pydantic>=2.10.5",
|
14
|
-
"scipy>=1.15.1",
|
15
12
|
]
|
16
13
|
readme = "README.md"
|
17
14
|
|
@@ -10,8 +10,7 @@ import re
|
|
10
10
|
import os
|
11
11
|
import shutil
|
12
12
|
from . import widget as _widget
|
13
|
-
|
14
|
-
import time
|
13
|
+
|
15
14
|
|
16
15
|
__all__ = [
|
17
16
|
"component",
|
@@ -170,6 +169,16 @@ class _WrappedComponentBlock(_JSONableBaseModel):
|
|
170
169
|
numSamples: Optional[int] = None,
|
171
170
|
component_function=None
|
172
171
|
) -> None:
|
172
|
+
|
173
|
+
# Initialize components list with blank component if empty
|
174
|
+
make_comp_block = True
|
175
|
+
if len(self.component_objects__) == 0:
|
176
|
+
self = self + __component__(type='questionnaire', component_name__='place-holder-component')
|
177
|
+
# If there only exists one component (either existing one or placeholder),
|
178
|
+
# do not create the first component blocks.
|
179
|
+
if len(self.component_objects__) == 1:
|
180
|
+
make_comp_block = False
|
181
|
+
|
173
182
|
# Convert to JSON
|
174
183
|
self_json = json.loads(self.__str__())
|
175
184
|
# Get all current component dictionaries
|
@@ -181,7 +190,8 @@ class _WrappedComponentBlock(_JSONableBaseModel):
|
|
181
190
|
order=order,
|
182
191
|
numSamples=numSamples,
|
183
192
|
input_components=components_dict,
|
184
|
-
component_function=component_function
|
193
|
+
component_function=component_function,
|
194
|
+
make_comp_block=make_comp_block
|
185
195
|
)
|
186
196
|
# Set new objects
|
187
197
|
self.component_objects__ = new_permuted_component_block.component_objects__
|
@@ -700,11 +710,12 @@ def _recursive_json_permutation(
|
|
700
710
|
input_json: dict,
|
701
711
|
factors: List[str],
|
702
712
|
order: rvt_models.Order,
|
703
|
-
numSamples: int,
|
704
713
|
input_components: dict,
|
705
|
-
|
714
|
+
numSamples: Optional[int] = None,
|
715
|
+
component_function=None,
|
716
|
+
make_comp_block=True
|
706
717
|
):
|
707
|
-
new_seq = __sequence__(order=order, numSamples=numSamples)
|
718
|
+
new_seq = __sequence__(order=input_json['order'], numSamples=input_json.get('numSamples'))
|
708
719
|
while input_json['components']:
|
709
720
|
c = input_json['components'].pop()
|
710
721
|
# If component name
|
@@ -749,5 +760,9 @@ def _recursive_json_permutation(
|
|
749
760
|
curr_seq.root.order = new_input_json['order']
|
750
761
|
curr_seq.root.numSamples = temp_num_samples
|
751
762
|
new_seq = new_seq + curr_seq
|
752
|
-
|
753
|
-
|
763
|
+
|
764
|
+
# Only return curr sequence if not making the comp block.
|
765
|
+
if make_comp_block is True:
|
766
|
+
return new_seq
|
767
|
+
else:
|
768
|
+
return curr_seq
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|