jupyter-analysis-tools 1.7.0__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.
@@ -1,7 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  # __init__.py
3
3
 
4
- __version__ = "1.7.0"
4
+ __version__ = "1.7.1"
5
5
 
6
6
  from .binning import reBin
7
7
  from .git import checkRepo, isNBstripoutActivated, isNBstripoutInstalled, isRepo
@@ -121,11 +121,9 @@ class DataStore:
121
121
  objType: str = None,
122
122
  props: dict = None,
123
123
  ):
124
- dsProject = self.createProject(projectName, space, spacePrefix=spacePrefix)
125
- dsColl = None
126
- if collectionName is None: # collectionName is required
127
- return None
128
- 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!"
129
127
  obj = self.ds.get_objects(type=objType, where={"$name": props["$name"]}).objects
130
128
  if len(obj):
131
129
  obj = obj[0]
@@ -135,10 +133,13 @@ class DataStore:
135
133
  )
136
134
  warnings.warn_explicit(msg, UserWarning, prefix, 0)
137
135
  else: # does not exist yet
136
+ dsProject = self.createProject(projectName, space, spacePrefix=spacePrefix)
137
+ dsColl = self.createCollection(collectionName, dsProject, defaultObjType=objType)
138
138
  objName = f" '{props['$name']}'" if len(props.get("$name", "")) else ""
139
139
  print(f"Creating new {objType}{objName} in {dsColl.identifier}")
140
140
  obj = self.ds.new_object(type=objType, props=props, collection=dsColl)
141
141
  obj.set_props(props)
142
+ obj.save()
142
143
  return obj
143
144
 
144
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.7.0
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.7.0)
39
+ # Jupyter Analysis Tools (v1.7.1)
40
40
 
41
41
  [![PyPI Package latest release](https://img.shields.io/pypi/v/jupyter-analysis-tools.svg)](https://pypi.org/project/jupyter-analysis-tools)
42
- [![Commits since latest release](https://img.shields.io/github/commits-since/BAMresearch/jupyter-analysis-tools/v1.7.0.svg)](https://github.com/BAMresearch/jupyter-analysis-tools/compare/v1.7.0...main)
42
+ [![Commits since latest release](https://img.shields.io/github/commits-since/BAMresearch/jupyter-analysis-tools/v1.7.1.svg)](https://github.com/BAMresearch/jupyter-analysis-tools/compare/v1.7.1...main)
43
43
  [![License](https://img.shields.io/pypi/l/jupyter-analysis-tools.svg)](https://en.wikipedia.org/wiki/MIT_license)
44
44
  [![Supported versions](https://img.shields.io/pypi/pyversions/jupyter-analysis-tools.svg)](https://pypi.org/project/jupyter-analysis-tools)
45
45
  [![PyPI Wheel](https://img.shields.io/pypi/wheel/jupyter-analysis-tools.svg)](https://pypi.org/project/jupyter-analysis-tools#files)
@@ -98,6 +98,12 @@ 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
+
101
107
  ## v1.7.0 (2025-12-11)
102
108
 
103
109
  ### Code style
@@ -1,8 +1,8 @@
1
- jupyter_analysis_tools/__init__.py,sha256=OFNOTDk0seYxfOSaF7l0KJ4ZM6XDPzNxwH4Ys_7aqnA,398
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=3Mb0Sspz7GSj1VTTGQtvUyh1snumE93YR1Zrrz64o4Y,6996
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.7.0.dist-info/licenses/AUTHORS.rst,sha256=-twUESsY0XqFQ0MIC0ylKhglNwL8lyHmGXriM3RF-2s,93
15
- jupyter_analysis_tools-1.7.0.dist-info/licenses/LICENSE,sha256=jRVl3hmCq0Qv1wifm-EelEKhFWecdoWdhcxSte4a1_c,1125
16
- jupyter_analysis_tools-1.7.0.dist-info/METADATA,sha256=8F0rEyEGAAifcj6bMJzfH_fjKreCRK8A51OOnjezHjQ,47801
17
- jupyter_analysis_tools-1.7.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
18
- jupyter_analysis_tools-1.7.0.dist-info/entry_points.txt,sha256=-LU146dufa_JTwarciGzC6bjsl8pqY_8Z49ODYQ4lPY,124
19
- jupyter_analysis_tools-1.7.0.dist-info/top_level.txt,sha256=ei_0x-BF85FLoJ_h67ySwDFowtqus_gI4_0GR466PEU,23
20
- jupyter_analysis_tools-1.7.0.dist-info/RECORD,,
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,,