dmart 1.4.40.post2__py3-none-any.whl → 1.4.40.post3__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.
- dmart/cli.py +3 -3
- dmart/dmart.py +29 -0
- {dmart-1.4.40.post2.dist-info → dmart-1.4.40.post3.dist-info}/METADATA +1 -1
- {dmart-1.4.40.post2.dist-info → dmart-1.4.40.post3.dist-info}/RECORD +7 -7
- {dmart-1.4.40.post2.dist-info → dmart-1.4.40.post3.dist-info}/WHEEL +0 -0
- {dmart-1.4.40.post2.dist-info → dmart-1.4.40.post3.dist-info}/entry_points.txt +0 -0
- {dmart-1.4.40.post2.dist-info → dmart-1.4.40.post3.dist-info}/top_level.txt +0 -0
dmart/cli.py
CHANGED
|
@@ -68,11 +68,11 @@ pretty.install()
|
|
|
68
68
|
class Settings(BaseSettings):
|
|
69
69
|
url: str = "http://localhost:8282"
|
|
70
70
|
shortname: str = "dmart"
|
|
71
|
-
password: str = "
|
|
72
|
-
query_limit: int =
|
|
71
|
+
password: str = "xxxx"
|
|
72
|
+
query_limit: int = 50
|
|
73
73
|
retrieve_json_payload: bool = True
|
|
74
74
|
default_space: str = "management"
|
|
75
|
-
pagination: int =
|
|
75
|
+
pagination: int = 50
|
|
76
76
|
|
|
77
77
|
model_config = SettingsConfigDict(env_file = os.getenv("BACKEND_ENV", os.path.dirname(os.path.realpath(__file__)) + "/config.ini"), env_file_encoding = "utf-8")
|
|
78
78
|
|
dmart/dmart.py
CHANGED
|
@@ -435,6 +435,35 @@ def main():
|
|
|
435
435
|
home_config = Path.home() / ".dmart" / "config.ini"
|
|
436
436
|
if home_config.exists():
|
|
437
437
|
config_file = str(home_config)
|
|
438
|
+
else:
|
|
439
|
+
# Create default config
|
|
440
|
+
try:
|
|
441
|
+
home_config.parent.mkdir(parents=True, exist_ok=True)
|
|
442
|
+
|
|
443
|
+
default_config = ""
|
|
444
|
+
# Try to find config.ini.sample in the package
|
|
445
|
+
sample_path = Path(__file__).resolve().parent / "config.ini.sample"
|
|
446
|
+
if sample_path.exists():
|
|
447
|
+
with open(sample_path, "r") as f:
|
|
448
|
+
default_config = f.read()
|
|
449
|
+
else:
|
|
450
|
+
# Fallback to hardcoded defaults from issue description
|
|
451
|
+
default_config = (
|
|
452
|
+
'url = "http://localhost:8282"\n'
|
|
453
|
+
'shortname = "dmart"\n'
|
|
454
|
+
'password = "xxxx"\n'
|
|
455
|
+
'query_limit = 50\n'
|
|
456
|
+
'retrieve_json_payload = True\n'
|
|
457
|
+
'default_space = "management"\n'
|
|
458
|
+
'pagination = 50\n'
|
|
459
|
+
)
|
|
460
|
+
|
|
461
|
+
with open(home_config, "w") as f:
|
|
462
|
+
f.write(default_config)
|
|
463
|
+
print(f"Created default config at {home_config}")
|
|
464
|
+
config_file = str(home_config)
|
|
465
|
+
except Exception as e:
|
|
466
|
+
print(f"Warning: Failed to create default config at {home_config}: {e}")
|
|
438
467
|
|
|
439
468
|
if config_file:
|
|
440
469
|
os.environ["BACKEND_ENV"] = config_file
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
dmart/__init__.py,sha256=xHodcATn-JYaoi3_TVDimR_UWG_ux9uLePUNQDzHhsY,122
|
|
2
2
|
dmart/alembic.ini,sha256=wQweByyHQm-EI8BQkE0SHNRjULJ6Xn5jqgvv88IT5Sg,3738
|
|
3
3
|
dmart/bundler.py,sha256=so8ZJResb1PcOH5vboa_mpFAdYr_T8u8DbbFXd570Lg,1704
|
|
4
|
-
dmart/cli.py,sha256=
|
|
4
|
+
dmart/cli.py,sha256=nIK1yuGKJ_huOF-qkIRNI995nAbznlsSBb24mKHqtuc,41614
|
|
5
5
|
dmart/config.env.sample,sha256=CKd4KIBeUatoFcO2IefmrVNBohpaVMQMFcoPkNBvCeI,696
|
|
6
6
|
dmart/config.ini.sample,sha256=AADMdwG07zRV_cAGMoOorHQaqzTTL2WEIC_mPWjIslE,159
|
|
7
7
|
dmart/conftest.py,sha256=0ry_zeCmdBNLbm5q115b-pkOrUFYxdsOUXbIMkr7E5Y,362
|
|
8
8
|
dmart/curl.sh,sha256=lmHSFVr5ft-lc5Aq9LfvKyWfntrfYbnirhzx1EGjp_A,15743
|
|
9
9
|
dmart/data_generator.py,sha256=CnE-VHEeX7-lAXtqCgbRqR9WHjTuOgeiZcviYrHAmho,2287
|
|
10
|
-
dmart/dmart.py,sha256=
|
|
10
|
+
dmart/dmart.py,sha256=QMK5wbYWOHmufoD-sQP5afOwSSXEOiVFUvLFCi22bgo,26752
|
|
11
11
|
dmart/get_settings.py,sha256=Sbe2WCoiK398E7HY4SNLfDN_GmE8knR4M-YJWF31jcg,153
|
|
12
12
|
dmart/hypercorn_config.toml,sha256=-eryppEG8HBOM_KbFc4dTQePnpyfoW9ZG5aUATU_6yM,50
|
|
13
13
|
dmart/info.json,sha256=5Yz4tc5dEt5eVrM2LzLhXgN8vGvE0aDbbbEEaGDsD5k,123
|
|
@@ -280,8 +280,8 @@ dmart/utils/ticket_sys_utils.py,sha256=9QAlW2iiy8KyxQRBDj_WmzS5kKb0aYJmGwd4qzmGV
|
|
|
280
280
|
dmart/utils/web_notifier.py,sha256=QM87VVid2grC5lK3NdS1yzz0z1wXljr4GChJOeK86W4,843
|
|
281
281
|
dmart/utils/templates/activation.html.j2,sha256=XAMKCdoqONoc4ZQucD0yV-Pg5DlHHASZrTVItNS-iBE,640
|
|
282
282
|
dmart/utils/templates/reminder.html.j2,sha256=aoS8bTs56q4hjAZKsb0jV9c-PIURBELuBOpT_qPZNVU,639
|
|
283
|
-
dmart-1.4.40.
|
|
284
|
-
dmart-1.4.40.
|
|
285
|
-
dmart-1.4.40.
|
|
286
|
-
dmart-1.4.40.
|
|
287
|
-
dmart-1.4.40.
|
|
283
|
+
dmart-1.4.40.post3.dist-info/METADATA,sha256=uOn6icxljn3GjmNCpcD2y8Lr7Ky2khJqf--9GtNfwOs,2531
|
|
284
|
+
dmart-1.4.40.post3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
285
|
+
dmart-1.4.40.post3.dist-info/entry_points.txt,sha256=N832M4wG8d2GDw1xztKRVM3TnxpY2QDzvdFE8XaWaG8,43
|
|
286
|
+
dmart-1.4.40.post3.dist-info/top_level.txt,sha256=zJo4qk9fUW0BGIR9f4DCfpxaXbvQXH9izIOom6JsyAo,6
|
|
287
|
+
dmart-1.4.40.post3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|