meerschaum 1.5.22__py3-none-any.whl → 1.5.24__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.
- meerschaum/actions/copy.py +9 -1
- meerschaum/actions/stack.py +11 -1
- meerschaum/api/dash/callbacks/dashboard.py +15 -8
- meerschaum/config/_version.py +1 -1
- meerschaum/config/stack/__init__.py +24 -12
- {meerschaum-1.5.22.dist-info → meerschaum-1.5.24.dist-info}/METADATA +1 -1
- {meerschaum-1.5.22.dist-info → meerschaum-1.5.24.dist-info}/RECORD +13 -13
- {meerschaum-1.5.22.dist-info → meerschaum-1.5.24.dist-info}/LICENSE +0 -0
- {meerschaum-1.5.22.dist-info → meerschaum-1.5.24.dist-info}/NOTICE +0 -0
- {meerschaum-1.5.22.dist-info → meerschaum-1.5.24.dist-info}/WHEEL +0 -0
- {meerschaum-1.5.22.dist-info → meerschaum-1.5.24.dist-info}/entry_points.txt +0 -0
- {meerschaum-1.5.22.dist-info → meerschaum-1.5.24.dist-info}/top_level.txt +0 -0
- {meerschaum-1.5.22.dist-info → meerschaum-1.5.24.dist-info}/zip-safe +0 -0
meerschaum/actions/copy.py
CHANGED
@@ -117,7 +117,15 @@ def _copy_pipes(
|
|
117
117
|
noask=noask, yes=yes
|
118
118
|
)
|
119
119
|
):
|
120
|
-
_new_pipe.sync(
|
120
|
+
_new_pipe.sync(
|
121
|
+
p.get_data(
|
122
|
+
debug = debug,
|
123
|
+
as_iterator = True,
|
124
|
+
**kw
|
125
|
+
),
|
126
|
+
debug = debug,
|
127
|
+
**kw
|
128
|
+
)
|
121
129
|
|
122
130
|
msg = (
|
123
131
|
"No pipes were copied." if successes == 0
|
meerschaum/actions/stack.py
CHANGED
@@ -47,6 +47,15 @@ def stack(
|
|
47
47
|
from meerschaum.utils.warnings import warn
|
48
48
|
from meerschaum.utils.formatting import ANSI
|
49
49
|
from meerschaum.utils.misc import is_docker_available
|
50
|
+
from meerschaum.config._read_config import search_and_substitute_config
|
51
|
+
|
52
|
+
stack_env_dict = {
|
53
|
+
var: val
|
54
|
+
for var, val in search_and_substitute_config(
|
55
|
+
meerschaum.config.stack.env_dict
|
56
|
+
).items()
|
57
|
+
if isinstance(val, str)
|
58
|
+
}
|
50
59
|
|
51
60
|
if action is None:
|
52
61
|
action = []
|
@@ -139,7 +148,7 @@ def stack(
|
|
139
148
|
cwd = STACK_COMPOSE_PATH.parent,
|
140
149
|
stdout = stdout,
|
141
150
|
stderr = stderr,
|
142
|
-
env =
|
151
|
+
env = stack_env_dict,
|
143
152
|
) if (has_builtin_compose or has_binary_compose) else run_python_package(
|
144
153
|
'compose',
|
145
154
|
args = cmd_list,
|
@@ -147,6 +156,7 @@ def stack(
|
|
147
156
|
venv = _compose_venv,
|
148
157
|
capture_output = _capture_output,
|
149
158
|
as_proc = True,
|
159
|
+
env = stack_env_dict,
|
150
160
|
)
|
151
161
|
try:
|
152
162
|
rc = proc.wait() if proc is not None else 1
|
@@ -129,17 +129,23 @@ def update_page_layout_div(pathname: str, session_store_data: Dict[str, Any]):
|
|
129
129
|
session_id = session_store_data.get('session-id', None)
|
130
130
|
except AttributeError:
|
131
131
|
session_id = None
|
132
|
+
|
132
133
|
### Bypass login if `--no-auth` is specified.
|
133
|
-
if session_id
|
134
|
+
if session_id not in active_sessions and no_auth:
|
134
135
|
session_store_data['session-id'] = str(uuid.uuid4())
|
135
136
|
active_sessions[session_store_data['session-id']] = {'username': 'no-auth'}
|
136
|
-
session_store_to_return =
|
137
|
+
session_store_to_return = session_store_data
|
137
138
|
else:
|
138
139
|
session_store_to_return = dash.no_update
|
139
140
|
|
140
141
|
_path = (pathname.rstrip('/') + '/').replace((dash_endpoint + '/'), '').rstrip('/')
|
141
|
-
path =
|
142
|
-
_path
|
142
|
+
path = (
|
143
|
+
_path
|
144
|
+
if no_auth or _path not in _required_login else (
|
145
|
+
_path
|
146
|
+
if session_id in active_sessions
|
147
|
+
else 'login'
|
148
|
+
)
|
143
149
|
)
|
144
150
|
layout = _paths.get(path, pages.error.layout)
|
145
151
|
return layout, session_store_to_return
|
@@ -447,21 +453,22 @@ def show_arguments_collapse(n_clicks : int, is_open : bool):
|
|
447
453
|
Output('ws', 'send'),
|
448
454
|
Input('test-button', 'n_clicks'),
|
449
455
|
Input('ws', 'url'),
|
456
|
+
Input('session-store', 'data'),
|
450
457
|
State('ws', 'state'),
|
451
458
|
State('ws', 'message'),
|
452
459
|
State('ws', 'error'),
|
453
460
|
State('ws', 'protocols'),
|
454
|
-
State('session-store', 'data'),
|
455
|
-
# prevent_initial_call = True,
|
456
461
|
)
|
457
|
-
def ws_send(n_clicks: int, url, *states):
|
462
|
+
def ws_send(n_clicks: int, url, session_store_data: Dict[str, Any], *states):
|
458
463
|
"""
|
459
464
|
Send an initial connection message over the websocket.
|
460
465
|
"""
|
461
466
|
ctx = dash.callback_context
|
462
467
|
if not url:
|
463
468
|
raise PreventUpdate
|
464
|
-
session_id =
|
469
|
+
session_id = session_store_data.get('session-id', None)
|
470
|
+
if session_id is None:
|
471
|
+
raise PreventUpdate
|
465
472
|
return json.dumps({
|
466
473
|
'connect-time': json_serialize_datetime(datetime.datetime.utcnow()),
|
467
474
|
'session-id': session_id,
|
meerschaum/config/_version.py
CHANGED
@@ -47,7 +47,6 @@ env_dict['MEERSCHAUM_API_CONFIG'] = json.dumps(
|
|
47
47
|
'meerschaum' : 'MRSM{!meerschaum}',
|
48
48
|
'system' : 'MRSM{!system}',
|
49
49
|
},
|
50
|
-
# separators = (',', ':'),
|
51
50
|
indent = 4,
|
52
51
|
).replace(
|
53
52
|
'"MRSM{!system}"', 'MRSM{!system}'
|
@@ -94,17 +93,26 @@ networks = {
|
|
94
93
|
}
|
95
94
|
|
96
95
|
default_docker_compose_config = {
|
97
|
-
'version': '3.
|
96
|
+
'version': '3.9',
|
98
97
|
'services': {
|
99
98
|
'db': {
|
100
99
|
'environment': {
|
101
100
|
'TIMESCALEDB_TELEMETRY': 'off',
|
102
|
-
'POSTGRES_USER':
|
103
|
-
'POSTGRES_DB':
|
104
|
-
'POSTGRES_PASSWORD':
|
101
|
+
'POSTGRES_USER': '$POSTGRES_USER',
|
102
|
+
'POSTGRES_DB': '$POSTGRES_DB',
|
103
|
+
'POSTGRES_PASSWORD': '$POSTGRES_PASSWORD',
|
105
104
|
'ALLOW_IP_RANGE': env_dict['ALLOW_IP_RANGE'],
|
106
105
|
},
|
107
106
|
'command': 'postgres -c max_connections=1000 -c shared_buffers=1024MB',
|
107
|
+
'healthcheck': {
|
108
|
+
'test': [
|
109
|
+
'CMD-SHELL', 'pg_isready',
|
110
|
+
'-U', '$POSTGRES_USER', '-d', '$POSTGRES_DB',
|
111
|
+
],
|
112
|
+
'interval': '5s',
|
113
|
+
'timeout': '3s',
|
114
|
+
'retries': 3
|
115
|
+
},
|
108
116
|
'restart': 'always',
|
109
117
|
'image' : 'timescale/timescaledb:' + env_dict['TIMESCALEDB_VERSION'],
|
110
118
|
'ports' : [
|
@@ -132,11 +140,13 @@ default_docker_compose_config = {
|
|
132
140
|
'MRSM_CONFIG': env_dict['MEERSCHAUM_API_CONFIG'],
|
133
141
|
'MRSM_PATCH': env_dict['MEERSCHAUM_API_PATCH'],
|
134
142
|
},
|
135
|
-
'restart'
|
143
|
+
'restart': 'always',
|
136
144
|
'init': True,
|
137
|
-
'depends_on'
|
138
|
-
'db'
|
139
|
-
|
145
|
+
'depends_on': {
|
146
|
+
'db': {
|
147
|
+
'condition': 'service_healthy',
|
148
|
+
},
|
149
|
+
},
|
140
150
|
'volumes' : [
|
141
151
|
'api_root:' + volumes['api_root'],
|
142
152
|
],
|
@@ -151,9 +161,11 @@ default_docker_compose_config = {
|
|
151
161
|
'backend',
|
152
162
|
],
|
153
163
|
'restart': 'always',
|
154
|
-
'depends_on':
|
155
|
-
'db'
|
156
|
-
|
164
|
+
'depends_on': {
|
165
|
+
'db': {
|
166
|
+
'condition': 'service_healthy',
|
167
|
+
},
|
168
|
+
},
|
157
169
|
'volumes': [
|
158
170
|
'grafana_storage' + ':' + volumes['grafana_storage'],
|
159
171
|
### NOTE: Mount with the 'z' option for SELinux.
|
@@ -24,7 +24,7 @@ meerschaum/actions/__init__.py,sha256=6R5Lpfm1zbah-lq_EbNuPOXhmW4i1-M3jibXp9FQ07
|
|
24
24
|
meerschaum/actions/api.py,sha256=loSyeob6DOd9lngKzzr3obnpzc-qvsXzq6mXziYSREg,10996
|
25
25
|
meerschaum/actions/bootstrap.py,sha256=StA6CkWBt-FEl26MyAGC7Q8SPVSHrfB3Uf56HrmnZoM,14529
|
26
26
|
meerschaum/actions/clear.py,sha256=IdHy1tafcoPUSLSxExnSzroIdQPOTPIs_wMVpiMvi-0,4857
|
27
|
-
meerschaum/actions/copy.py,sha256=
|
27
|
+
meerschaum/actions/copy.py,sha256=dieg0qn7UviQY718nwGhDU2dVr0hNbAb-2J04pxcl5I,6259
|
28
28
|
meerschaum/actions/delete.py,sha256=XIeQ1Blxg7c5Gr6RbFasgz0lsr1IZgOHnbjhMR3V4sE,15245
|
29
29
|
meerschaum/actions/drop.py,sha256=KOnpy-4TJqir--WkqYRr0VQePa_gl6_qqjjT6FVfRP4,2701
|
30
30
|
meerschaum/actions/edit.py,sha256=Ql-Gcol_ydTB7unsprlhRc94-JSjiXs564vuv1wRppk,9492
|
@@ -38,7 +38,7 @@ meerschaum/actions/setup.py,sha256=LSma1nPCAJCV9u5A3BqZLBsXipjKwfpw4gP9roKygjk,3
|
|
38
38
|
meerschaum/actions/sh.py,sha256=fLfTJaacKu4sjLTRqEzzYlT2WbbdZBEczsKb6F-qAek,2026
|
39
39
|
meerschaum/actions/show.py,sha256=mH08dx6Z2iu-odpuq7oJGuCabM4aZ8GxD9mYssIMcAA,23468
|
40
40
|
meerschaum/actions/sql.py,sha256=DZDc5qgiqlPgRJpAeBUVK-W-2FeVO0CuOQTEUybOcU0,4224
|
41
|
-
meerschaum/actions/stack.py,sha256=
|
41
|
+
meerschaum/actions/stack.py,sha256=x3Xr633H82o75zajuQwZZ8QsRayyQGu4MqXGapruB2s,5807
|
42
42
|
meerschaum/actions/start.py,sha256=bD5nuTTMDTnL3GAcW6pmR6iXFZNwAQ-02FLoM2qIkss,18247
|
43
43
|
meerschaum/actions/stop.py,sha256=7PqrKzmAxZ9X4HSAkeIbzaAg6KUSWylixybICfR9zuI,3948
|
44
44
|
meerschaum/actions/sync.py,sha256=l6JpW6lg2FHT3dUhIHre-I-hJ6rApEZGUZgcSR15L6A,15339
|
@@ -69,7 +69,7 @@ meerschaum/api/dash/assets/favicon.ico,sha256=nDEekVxwS60wEDno1nbw5GF3TJOcDV26SE
|
|
69
69
|
meerschaum/api/dash/assets/logo_48x48.png,sha256=hTR5BHUHEN4yP2xiqAcDciuigoII9T3-80R-dzsxVmw,10218
|
70
70
|
meerschaum/api/dash/assets/logo_500x500.png,sha256=9EUtf6wQcEZTXHKfQ2kjNXod6Rn_4DTB_BkTgxggq00,67702
|
71
71
|
meerschaum/api/dash/callbacks/__init__.py,sha256=eVXQKdXMk-PKRBBfCFaj1Bk2lLlHYvpzEWVDsT8Tabg,283
|
72
|
-
meerschaum/api/dash/callbacks/dashboard.py,sha256=
|
72
|
+
meerschaum/api/dash/callbacks/dashboard.py,sha256=UG9HzFTj-rM2SXgon-Wy7-kDbAExzKsp7jfAkH41flg,25003
|
73
73
|
meerschaum/api/dash/callbacks/login.py,sha256=BNkJNllMuMxtF1AaNrCXxnzkaT_YVJrkCv6Qr2CJqEI,2529
|
74
74
|
meerschaum/api/dash/callbacks/plugins.py,sha256=7CrwwbBI2N3DR4Yb1bKmrtJ3cAQ3dVv1l6E_AtZ6Wng,2777
|
75
75
|
meerschaum/api/dash/callbacks/register.py,sha256=wr9KF8FkeUeqPDlcGaIsBWrKVRIGee1oF6aAnDmpNKg,3446
|
@@ -125,9 +125,9 @@ meerschaum/config/_preprocess.py,sha256=-AEA8m_--KivZwTQ1sWN6LTn5sio_fUr2XZ51BO6
|
|
125
125
|
meerschaum/config/_read_config.py,sha256=4GzNM0iRysuE9cY2wU_HZlTCs0pvJ9SgF7BCuOCif9k,14567
|
126
126
|
meerschaum/config/_shell.py,sha256=k6PH0BEr2imhgURLYlR5p6s5gXfYpWoyZSV29U-SsXk,3589
|
127
127
|
meerschaum/config/_sync.py,sha256=vPdr6XBYM3k8xLyWbWSXpFh6pNIsbchIkJDw-gKZjgU,4968
|
128
|
-
meerschaum/config/_version.py,sha256=
|
128
|
+
meerschaum/config/_version.py,sha256=enAodlavOdkagzu5r0Ke24tcJHL8VkBI5vAXKO0G1kg,72
|
129
129
|
meerschaum/config/resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
130
|
-
meerschaum/config/stack/__init__.py,sha256=
|
130
|
+
meerschaum/config/stack/__init__.py,sha256=wJpxRRJnds0PT3dSr717GbtIHue3rnQ5C3R0H-xVpx0,8616
|
131
131
|
meerschaum/config/stack/grafana/__init__.py,sha256=wzuoch_AK49lcn7lH2qTSJ_PPbSagF4lcweeipz_XiE,2010
|
132
132
|
meerschaum/config/stack/mosquitto/__init__.py,sha256=-OwOjq8KiBoSH_pmgCAAF3Dp3CRD4KgAEdimZSadROs,186
|
133
133
|
meerschaum/config/stack/mosquitto/resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -214,11 +214,11 @@ meerschaum/utils/packages/_packages.py,sha256=NHRcHPMmq-SonGLdLtjqhB2uDGxUDBrGfW
|
|
214
214
|
meerschaum/utils/packages/lazy_loader.py,sha256=VHnph3VozH29R4JnSSBfwtA5WKZYZQFT_GeQSShCnuc,2540
|
215
215
|
meerschaum/utils/venv/_Venv.py,sha256=oKuSNYsFfsKQhrsV5TViPekRHvjUXyJ-hChMPqSxnlw,3479
|
216
216
|
meerschaum/utils/venv/__init__.py,sha256=DzyBp2tvTp5gl1qp52iTHh6hCDT8VkpiV1_ghXpg6ak,22150
|
217
|
-
meerschaum-1.5.
|
218
|
-
meerschaum-1.5.
|
219
|
-
meerschaum-1.5.
|
220
|
-
meerschaum-1.5.
|
221
|
-
meerschaum-1.5.
|
222
|
-
meerschaum-1.5.
|
223
|
-
meerschaum-1.5.
|
224
|
-
meerschaum-1.5.
|
217
|
+
meerschaum-1.5.24.dist-info/LICENSE,sha256=jG2zQEdRNt88EgHUWPpXVWmOrOduUQRx7MnYV9YIPaw,11359
|
218
|
+
meerschaum-1.5.24.dist-info/METADATA,sha256=T7BipEo0CPuNkN35TmgTaVzD2mAGAiDOcHNKFQrxeA8,24344
|
219
|
+
meerschaum-1.5.24.dist-info/NOTICE,sha256=OTA9Fcthjf5BRvWDDIcBC_xfLpeDV-RPZh3M-HQBRtQ,114
|
220
|
+
meerschaum-1.5.24.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
221
|
+
meerschaum-1.5.24.dist-info/entry_points.txt,sha256=5YBVzibw-0rNA_1VjB16z5GABsOGf-CDhW4yqH8C7Gc,88
|
222
|
+
meerschaum-1.5.24.dist-info/top_level.txt,sha256=bNoSiDj0El6buocix-FRoAtJOeq1qOF5rRm2u9i7Q6A,11
|
223
|
+
meerschaum-1.5.24.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
224
|
+
meerschaum-1.5.24.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|