jupyter-analysis-tools 1.6.3__py3-none-any.whl → 1.7.1__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.
- jupyter_analysis_tools/__init__.py +1 -1
- jupyter_analysis_tools/datastore.py +11 -7
- {jupyter_analysis_tools-1.6.3.dist-info → jupyter_analysis_tools-1.7.1.dist-info}/METADATA +19 -3
- {jupyter_analysis_tools-1.6.3.dist-info → jupyter_analysis_tools-1.7.1.dist-info}/RECORD +9 -9
- {jupyter_analysis_tools-1.6.3.dist-info → jupyter_analysis_tools-1.7.1.dist-info}/WHEEL +0 -0
- {jupyter_analysis_tools-1.6.3.dist-info → jupyter_analysis_tools-1.7.1.dist-info}/entry_points.txt +0 -0
- {jupyter_analysis_tools-1.6.3.dist-info → jupyter_analysis_tools-1.7.1.dist-info}/licenses/AUTHORS.rst +0 -0
- {jupyter_analysis_tools-1.6.3.dist-info → jupyter_analysis_tools-1.7.1.dist-info}/licenses/LICENSE +0 -0
- {jupyter_analysis_tools-1.6.3.dist-info → jupyter_analysis_tools-1.7.1.dist-info}/top_level.txt +0 -0
|
@@ -12,10 +12,11 @@ from pybis import Openbis
|
|
|
12
12
|
|
|
13
13
|
class DataStore:
|
|
14
14
|
url = None
|
|
15
|
+
token = None
|
|
15
16
|
_availObj = None
|
|
16
17
|
_userspace = None
|
|
17
18
|
|
|
18
|
-
def __init__(self, url, username=None):
|
|
19
|
+
def __init__(self, url, username=None, tokenValidTo=None):
|
|
19
20
|
self.url = url
|
|
20
21
|
self.username = username
|
|
21
22
|
if self.username is None:
|
|
@@ -30,7 +31,9 @@ class DataStore:
|
|
|
30
31
|
save_token=False,
|
|
31
32
|
)
|
|
32
33
|
# create the PAT with the given name, don't store it
|
|
33
|
-
self.ds.get_or_create_personal_access_token(
|
|
34
|
+
self.token = self.ds.get_or_create_personal_access_token(
|
|
35
|
+
"test-session", validTo=tokenValidTo
|
|
36
|
+
)
|
|
34
37
|
|
|
35
38
|
@property
|
|
36
39
|
def userspace(self):
|
|
@@ -118,11 +121,9 @@ class DataStore:
|
|
|
118
121
|
objType: str = None,
|
|
119
122
|
props: dict = None,
|
|
120
123
|
):
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
return None
|
|
125
|
-
dsColl = self.createCollection(collectionName, dsProject, defaultObjType=objType)
|
|
124
|
+
assert space and len(space), "space is required!"
|
|
125
|
+
assert projectName and len(projectName), "projectName is required!"
|
|
126
|
+
assert collectionName and len(collectionName), "collectionName is required!"
|
|
126
127
|
obj = self.ds.get_objects(type=objType, where={"$name": props["$name"]}).objects
|
|
127
128
|
if len(obj):
|
|
128
129
|
obj = obj[0]
|
|
@@ -132,10 +133,13 @@ class DataStore:
|
|
|
132
133
|
)
|
|
133
134
|
warnings.warn_explicit(msg, UserWarning, prefix, 0)
|
|
134
135
|
else: # does not exist yet
|
|
136
|
+
dsProject = self.createProject(projectName, space, spacePrefix=spacePrefix)
|
|
137
|
+
dsColl = self.createCollection(collectionName, dsProject, defaultObjType=objType)
|
|
135
138
|
objName = f" '{props['$name']}'" if len(props.get("$name", "")) else ""
|
|
136
139
|
print(f"Creating new {objType}{objName} in {dsColl.identifier}")
|
|
137
140
|
obj = self.ds.new_object(type=objType, props=props, collection=dsColl)
|
|
138
141
|
obj.set_props(props)
|
|
142
|
+
obj.save()
|
|
139
143
|
return obj
|
|
140
144
|
|
|
141
145
|
def findObjects(self, *args, **kwargs):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: jupyter-analysis-tools
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.7.1
|
|
4
4
|
Summary: Yet another Python library with helpers and utilities for data analysis and processing.
|
|
5
5
|
Author-email: Ingo Breßler <ingo.bressler@bam.de>, "Brian R. Pauw" <brian.pauw@bam.de>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -36,10 +36,10 @@ Requires-Dist: ipywidgets
|
|
|
36
36
|
Requires-Dist: pybis
|
|
37
37
|
Dynamic: license-file
|
|
38
38
|
|
|
39
|
-
# Jupyter Analysis Tools (v1.
|
|
39
|
+
# Jupyter Analysis Tools (v1.7.1)
|
|
40
40
|
|
|
41
41
|
[](https://pypi.org/project/jupyter-analysis-tools)
|
|
42
|
-
[](https://github.com/BAMresearch/jupyter-analysis-tools/compare/v1.7.1...main)
|
|
43
43
|
[](https://en.wikipedia.org/wiki/MIT_license)
|
|
44
44
|
[](https://pypi.org/project/jupyter-analysis-tools)
|
|
45
45
|
[](https://pypi.org/project/jupyter-analysis-tools#files)
|
|
@@ -98,6 +98,22 @@ are installed:
|
|
|
98
98
|
|
|
99
99
|
# CHANGELOG
|
|
100
100
|
|
|
101
|
+
## v1.7.1 (2025-12-11)
|
|
102
|
+
|
|
103
|
+
### Bug fixes
|
|
104
|
+
|
|
105
|
+
* **DataStore.createObject(**: attempt to create new project/collection only if object was not found; save it finally as well ([`95fa9e0`](https://github.com/BAMresearch/jupyter-analysis-tools/commit/95fa9e042a26b423936caac64d3e8b115790e888))
|
|
106
|
+
|
|
107
|
+
## v1.7.0 (2025-12-11)
|
|
108
|
+
|
|
109
|
+
### Code style
|
|
110
|
+
|
|
111
|
+
* **DataStore**: line length ([`8741be2`](https://github.com/BAMresearch/jupyter-analysis-tools/commit/8741be28e86990ec18ec946795f2a6b643dcaac6))
|
|
112
|
+
|
|
113
|
+
### Enh
|
|
114
|
+
|
|
115
|
+
* **DataStore.init**: remember token and forward how long it should be valid ([`385ecf8`](https://github.com/BAMresearch/jupyter-analysis-tools/commit/385ecf8137bbce46f7ed5266de3596b415e4576c))
|
|
116
|
+
|
|
101
117
|
## v1.6.3 (2025-12-04)
|
|
102
118
|
|
|
103
119
|
### Bug fixes
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
jupyter_analysis_tools/__init__.py,sha256=
|
|
1
|
+
jupyter_analysis_tools/__init__.py,sha256=8H5TrG3I8roNIFxpKDxoPF9tb4cFlQO79NgaKLCWCYo,398
|
|
2
2
|
jupyter_analysis_tools/analysis.py,sha256=AiAvUO648f0PYXqLfal1kDH926neasE5c1RYFu9wtYg,1768
|
|
3
3
|
jupyter_analysis_tools/binning.py,sha256=d6eXRC3IOnnJIF25OfEASyWedT71EX2nF7jAgGJ9suQ,14536
|
|
4
4
|
jupyter_analysis_tools/datalocations.py,sha256=BakfiZOMcBwp-_DAn7l57lGWZmZGNnk0j73V75nLBUA,4322
|
|
5
|
-
jupyter_analysis_tools/datastore.py,sha256=
|
|
5
|
+
jupyter_analysis_tools/datastore.py,sha256=ZjNIFZ9M5-VPd1JfNeDA2dZfYSPE6-mux-BU6qGpVcE,7131
|
|
6
6
|
jupyter_analysis_tools/distrib.py,sha256=uyh2jXDdXR6dfd36CAoE5_psoFF0bfA6l1wletPD7Xo,16515
|
|
7
7
|
jupyter_analysis_tools/git.py,sha256=mqSk5nnAFrmk1_2KFuKVrDWOkRbGbAQOq2N1DfxhNpg,2216
|
|
8
8
|
jupyter_analysis_tools/plotting.py,sha256=X5Orrwiof-9MuYMKDJEXIlIt0K6bQT6ktFFjXKIVApI,1962
|
|
@@ -11,10 +11,10 @@ jupyter_analysis_tools/ssfz2json.py,sha256=aEJo8No_PZ021RJGqDz9g2uZVh9y2G-wNvUB7
|
|
|
11
11
|
jupyter_analysis_tools/ssfz_compare.py,sha256=__6qXALyX5pdUBYSEjzNoVHa470QX8Cg_LASpahtAGI,1557
|
|
12
12
|
jupyter_analysis_tools/utils.py,sha256=c8q2-0v7wEjJ_3w5YTZdjFSf-RP1gPUpMJpv5KUyilU,8800
|
|
13
13
|
jupyter_analysis_tools/widgets.py,sha256=rA8qPvY9nS1OtykZwXtCTG29K-N_MYFVb5Aj8yK40_s,2996
|
|
14
|
-
jupyter_analysis_tools-1.
|
|
15
|
-
jupyter_analysis_tools-1.
|
|
16
|
-
jupyter_analysis_tools-1.
|
|
17
|
-
jupyter_analysis_tools-1.
|
|
18
|
-
jupyter_analysis_tools-1.
|
|
19
|
-
jupyter_analysis_tools-1.
|
|
20
|
-
jupyter_analysis_tools-1.
|
|
14
|
+
jupyter_analysis_tools-1.7.1.dist-info/licenses/AUTHORS.rst,sha256=-twUESsY0XqFQ0MIC0ylKhglNwL8lyHmGXriM3RF-2s,93
|
|
15
|
+
jupyter_analysis_tools-1.7.1.dist-info/licenses/LICENSE,sha256=jRVl3hmCq0Qv1wifm-EelEKhFWecdoWdhcxSte4a1_c,1125
|
|
16
|
+
jupyter_analysis_tools-1.7.1.dist-info/METADATA,sha256=i9XsIzO3Kji936IQbG24DUrxkW64SppHmmfJ0upz20k,48084
|
|
17
|
+
jupyter_analysis_tools-1.7.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
18
|
+
jupyter_analysis_tools-1.7.1.dist-info/entry_points.txt,sha256=-LU146dufa_JTwarciGzC6bjsl8pqY_8Z49ODYQ4lPY,124
|
|
19
|
+
jupyter_analysis_tools-1.7.1.dist-info/top_level.txt,sha256=ei_0x-BF85FLoJ_h67ySwDFowtqus_gI4_0GR466PEU,23
|
|
20
|
+
jupyter_analysis_tools-1.7.1.dist-info/RECORD,,
|
|
File without changes
|
{jupyter_analysis_tools-1.6.3.dist-info → jupyter_analysis_tools-1.7.1.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
{jupyter_analysis_tools-1.6.3.dist-info → jupyter_analysis_tools-1.7.1.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
{jupyter_analysis_tools-1.6.3.dist-info → jupyter_analysis_tools-1.7.1.dist-info}/top_level.txt
RENAMED
|
File without changes
|