labmate 0.10.0__py3-none-any.whl → 0.10.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.
labmate/__config__.py CHANGED
@@ -1,3 +1,3 @@
1
1
  """This file contains all package constants."""
2
2
 
3
- __version__ = "0.10.0"
3
+ __version__ = "0.10.1"
@@ -2,6 +2,7 @@
2
2
 
3
3
  import json
4
4
  import os
5
+ import re
5
6
  from typing import Any, Dict, List, Optional
6
7
 
7
8
  from ..parsing.brackets_score import BracketsScore
@@ -76,12 +77,20 @@ def update_file_variable(file, params: Dict[str, Any]):
76
77
  if param in params:
77
78
  current_param = param
78
79
  start_line = lines.index(line)
80
+
79
81
  brackets.update_from_str(line)
80
82
  if brackets.is_zero() and current_param is not None:
81
83
  end_line = lines.index(line)
82
- end_comment = line.split("#")[-1].strip() if "#" in line else None
84
+ end_comment = "#".join(line.split("#")[1:]).strip() if "#" in line else None
83
85
  del lines[start_line : end_line + 1]
84
86
  value_str = json.JSONEncoder().encode(params[current_param])
87
+
88
+ print("value_str", value_str)
89
+ if re.match(
90
+ r"^['\"]?[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?['\"]?$", value_str
91
+ ):
92
+ value_str = value_str.replace('"', "")
93
+
85
94
  lines.insert(
86
95
  start_line,
87
96
  (
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: labmate
3
- Version: 0.10.0
3
+ Version: 0.10.1
4
4
  Summary: Data management library to save data and plots to hdf5 files
5
5
  Home-page: https://github.com/kyrylo-gr/labmate
6
6
  Author: kyrylo.gr | LKB-OMQ
@@ -1,4 +1,4 @@
1
- labmate/__config__.py,sha256=klTEHuAm-AhAQg9qYq-W6YyefUJiHBGfIPWnRQr-eT0,72
1
+ labmate/__config__.py,sha256=6nUZZrH6U2jvORBV3RNzCT76ZBQlo0WQHMxCwBoZpZ8,72
2
2
  labmate/__init__.py,sha256=aHQiPLldCXIJqz6wwcfyFU9sGLofUR3W5sXBIRzK2n4,182
3
3
  labmate/acquisition/__init__.py,sha256=8q3dy18lL32A9y_Du8GggpLgJqDMFcFKddHrySMavrM,269
4
4
  labmate/acquisition/acquisition_data.py,sha256=UcpUaT1SkmnqGMyzP8cgH2JjLRtWZZdTk5S0JHf-v9c,6681
@@ -29,12 +29,12 @@ labmate/utils/__init__.py,sha256=g9LSaSVDFC4Uo7hbdd66aT7QewuXNRheZ8PZlMrcsNw,104
29
29
  labmate/utils/async_utils.py,sha256=mSfmpF7I3M5KePkPtoS-OcuoCkFDHPKjf-RVF0P3R48,118
30
30
  labmate/utils/autoreload.py,sha256=wKi1GgWyRu1h101OguVRpO3zQXZ8qsFj-K-1P8PKuq8,305
31
31
  labmate/utils/errors.py,sha256=ly7-JQStTKmPiMuT0w3eXFw1O8-1kpTsqZT2jebpJ-I,140
32
- labmate/utils/file_read.py,sha256=mRHRIyqejtDlfLuPyafEYcfKfb4bac7zHbt-DW091Vg,3155
32
+ labmate/utils/file_read.py,sha256=MS32w5a968OtHS5i6uIOgvImkFiblTDosG5zXUxX-Ng,3398
33
33
  labmate/utils/lint.py,sha256=7llJbZUAM-ikEpmU_ZzraqOwGUuJPgk1wAf3aYMJdxg,9312
34
34
  labmate/utils/random_utils.py,sha256=ZA3gK9P-eTcd_a3BTS_ZeJI5A0GM_GXL7X3yUqnPTO4,690
35
35
  labmate/utils/title_parsing.py,sha256=5csdqiD6w6pzyqRon38V2WeGA00CifSrMMtoWZmk0Ok,2644
36
- labmate-0.10.0.dist-info/LICENCE,sha256=J9XIxdJExlWYZuxhhKtk4oYILvUz8-JM0y_leRQCKUE,7488
37
- labmate-0.10.0.dist-info/METADATA,sha256=_8Qsw4NxSoayjiPoPvdunyV-a_ovkwjxYaqThycQvVQ,3211
38
- labmate-0.10.0.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
39
- labmate-0.10.0.dist-info/top_level.txt,sha256=WWAn6t2zNWsp02gRq6f5cSsGebcs-4L6HBFk0XrcY0o,8
40
- labmate-0.10.0.dist-info/RECORD,,
36
+ labmate-0.10.1.dist-info/LICENCE,sha256=J9XIxdJExlWYZuxhhKtk4oYILvUz8-JM0y_leRQCKUE,7488
37
+ labmate-0.10.1.dist-info/METADATA,sha256=_jJ8OsSvC99zDMW1HXDmTWv5pdGlnE5vJTB_UtL3sjo,3211
38
+ labmate-0.10.1.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
39
+ labmate-0.10.1.dist-info/top_level.txt,sha256=WWAn6t2zNWsp02gRq6f5cSsGebcs-4L6HBFk0XrcY0o,8
40
+ labmate-0.10.1.dist-info/RECORD,,