corelp 1.0.32__py3-none-any.whl → 1.0.33__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.
|
@@ -14,7 +14,7 @@ This class defines decorator instances allowing to create section functions.
|
|
|
14
14
|
|
|
15
15
|
# %% Libraries
|
|
16
16
|
from corelp import print, folder, selfkwargs, kwargsself
|
|
17
|
-
from dataclasses import dataclass
|
|
17
|
+
from dataclasses import dataclass
|
|
18
18
|
import pickle
|
|
19
19
|
import joblib
|
|
20
20
|
from pathlib import Path
|
|
@@ -14,12 +14,10 @@ Gets last user inputs dictionnary from global variables.
|
|
|
14
14
|
|
|
15
15
|
# %% Libraries
|
|
16
16
|
import inspect
|
|
17
|
-
from IPython import get_ipython
|
|
18
17
|
|
|
19
18
|
|
|
20
19
|
|
|
21
20
|
# %% Function
|
|
22
|
-
_user_inputs = {} # User inputs cache
|
|
23
21
|
|
|
24
22
|
def user_inputs() :
|
|
25
23
|
r"""
|
|
@@ -49,16 +47,8 @@ def user_inputs() :
|
|
|
49
47
|
{'a': 1}
|
|
50
48
|
"""
|
|
51
49
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
if ipy is not None:
|
|
56
|
-
# Running in IPython or Jupyter
|
|
57
|
-
ns = ipy.user_ns
|
|
58
|
-
else:
|
|
59
|
-
# Running in normal Python script
|
|
60
|
-
frame = inspect.currentframe().f_back
|
|
61
|
-
ns = {**frame.f_globals, **frame.f_locals}
|
|
50
|
+
frame = inspect.currentframe().f_back
|
|
51
|
+
ns = {**frame.f_globals, **frame.f_locals}
|
|
62
52
|
|
|
63
53
|
# ---- Filter user variables (ignore internals starting with "_") ----
|
|
64
54
|
ns = {k: v for k, v in ns.items() if not k.startswith("_")}
|
|
@@ -67,12 +57,13 @@ def user_inputs() :
|
|
|
67
57
|
updated = {
|
|
68
58
|
k: v
|
|
69
59
|
for k, v in ns.items()
|
|
70
|
-
if k not in
|
|
60
|
+
if k not in user_inputs.cache or user_inputs.cache[k] is not v
|
|
71
61
|
}
|
|
72
62
|
|
|
73
|
-
|
|
63
|
+
user_inputs.cache.update(updated)
|
|
74
64
|
return updated
|
|
75
65
|
|
|
66
|
+
user_inputs.cache = {}
|
|
76
67
|
|
|
77
68
|
|
|
78
69
|
# %% Test function run
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: corelp
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.33
|
|
4
4
|
Summary: A library that gathers core functions for python programming.
|
|
5
|
-
Requires-Dist: ipython
|
|
6
|
-
Requires-Dist: ipywidgets
|
|
7
5
|
Requires-Dist: joblib
|
|
8
6
|
Requires-Dist: rich
|
|
9
7
|
Requires-Python: >=3.12
|
|
@@ -3,7 +3,7 @@ corelp/icon_pythonLP.png,sha256=pg386kYEKGspDDRbRF0alOmHXPEm0geMoYIPaxEfQ_o,3805
|
|
|
3
3
|
corelp/modules/Path_LP/Path.py,sha256=wfvO1DuewIUSEA9_g66O5nCEp95Pr5XM-yxaOOEimTs,2418
|
|
4
4
|
corelp/modules/Path_LP/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
corelp/modules/Path_LP/test_Path.py,sha256=8VSn9VVbhc3EDxXpxQV18rnAq_T2a1uuoRFKdmsqX-I,715
|
|
6
|
-
corelp/modules/Section_LP/Section.py,sha256=
|
|
6
|
+
corelp/modules/Section_LP/Section.py,sha256=LQwy3rb4XP3aq3mLtZRBg2AeTYX4bosnYJbIsCpbYIs,6060
|
|
7
7
|
corelp/modules/Section_LP/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
8
|
corelp/modules/Section_LP/test_Section.py,sha256=zcrIbJueMDT90t0_M-RD40IWpkx4OT7Q52tE6HzbfIo,812
|
|
9
9
|
corelp/modules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -38,12 +38,12 @@ corelp/modules/test_LP/test.py,sha256=KwAeIZWQ7pZX85J50q6qfB4HuJUgREu1ieB_byPqI2
|
|
|
38
38
|
corelp/modules/test_LP/test_test.py,sha256=sXI6G4OBnWXSqrfMy9QdabkYIvcD80EmnNcnQiXxcRI,605
|
|
39
39
|
corelp/modules/user_inputs_LP/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
40
40
|
corelp/modules/user_inputs_LP/test_user_inputs.py,sha256=lK8pYm5q5ob9ry3T-gU3J_-KZMKWCCmeuFjjH7DkF_8,927
|
|
41
|
-
corelp/modules/user_inputs_LP/user_inputs.py,sha256=
|
|
41
|
+
corelp/modules/user_inputs_LP/user_inputs.py,sha256=dqv78EnT1NiUf4ix_P6bQLoiAjNKHjYVu7lZYm-jXtI,1713
|
|
42
42
|
corelp/modules.json,sha256=ZQ8BMU8X2u71wfVj_AufwOoJUPdaxU_AHn7Ohbkp-Pc,3122
|
|
43
43
|
corelp/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
44
44
|
corelp/pythonLP.png:Zone.Identifier,sha256=uVLSTPcBvE56fSHhroXGEYJOgFeaiYNsDLSbGTRGzP4,25
|
|
45
45
|
corelp/scripts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
46
46
|
corelp/scripts.json,sha256=RBNvo1WzZ4oRRq0W9-hknpT7T8If536DEMBg9hyq_4o,2
|
|
47
|
-
corelp-1.0.
|
|
48
|
-
corelp-1.0.
|
|
49
|
-
corelp-1.0.
|
|
47
|
+
corelp-1.0.33.dist-info/WHEEL,sha256=eh7sammvW2TypMMMGKgsM83HyA_3qQ5Lgg3ynoecH3M,79
|
|
48
|
+
corelp-1.0.33.dist-info/METADATA,sha256=pwYkVZsYhheWKpAm9-1Un6IyAurHA93nB5IEtanT8Cc,1698
|
|
49
|
+
corelp-1.0.33.dist-info/RECORD,,
|
|
File without changes
|