pylantir 0.0.3__py3-none-any.whl → 0.0.5__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.
- pylantir/cli/run.py +12 -8
- {pylantir-0.0.3.dist-info → pylantir-0.0.5.dist-info}/METADATA +9 -1
- {pylantir-0.0.3.dist-info → pylantir-0.0.5.dist-info}/RECORD +5 -5
- {pylantir-0.0.3.dist-info → pylantir-0.0.5.dist-info}/WHEEL +0 -0
- {pylantir-0.0.3.dist-info → pylantir-0.0.5.dist-info}/entry_points.txt +0 -0
pylantir/cli/run.py
CHANGED
|
@@ -12,9 +12,6 @@ import importlib.util
|
|
|
12
12
|
from dotenv import set_key
|
|
13
13
|
from concurrent.futures import ThreadPoolExecutor # for background thread
|
|
14
14
|
|
|
15
|
-
from ..mwl_server import run_mwl_server
|
|
16
|
-
from ..redcap_to_db import sync_redcap_to_db_repeatedly
|
|
17
|
-
|
|
18
15
|
lgr = logging.getLogger(__name__)
|
|
19
16
|
|
|
20
17
|
def setup_logging(debug=False):
|
|
@@ -195,16 +192,19 @@ def main() -> None:
|
|
|
195
192
|
print("pynetdicom logger level:", logging.getLogger("pynetdicom").getEffectiveLevel())
|
|
196
193
|
|
|
197
194
|
|
|
198
|
-
if (args.command == "start"):
|
|
199
|
-
# Load configuration (either user-specified or default)
|
|
200
|
-
config = load_config(args.pylantir_config)
|
|
201
195
|
|
|
196
|
+
if (args.command == "start"):
|
|
202
197
|
# Extract the database path (default to worklist.db if missing) &
|
|
203
198
|
# Extract the database echo setting (default to False if missing)
|
|
204
199
|
db_path = config.get("db_path", "./worklist.db")
|
|
205
200
|
db_echo = config.get("db_echo", "False")
|
|
206
201
|
update_env_with_config(db_path=db_path, db_echo=db_echo)
|
|
207
202
|
|
|
203
|
+
from ..mwl_server import run_mwl_server
|
|
204
|
+
from ..redcap_to_db import sync_redcap_to_db_repeatedly
|
|
205
|
+
# Load configuration (either user-specified or default)
|
|
206
|
+
config = load_config(args.pylantir_config)
|
|
207
|
+
|
|
208
208
|
# Extract the database update interval (default to 60 seconds if missing)
|
|
209
209
|
db_update_interval = config.get("db_update_interval", 60)
|
|
210
210
|
|
|
@@ -250,14 +250,17 @@ def main() -> None:
|
|
|
250
250
|
)
|
|
251
251
|
|
|
252
252
|
if (args.command == "query-db"):
|
|
253
|
+
from ..mwl_server import run_mwl_server
|
|
254
|
+
from ..redcap_to_db import sync_redcap_to_db_repeatedly
|
|
253
255
|
lgr.info("Querying the MWL database")
|
|
254
256
|
|
|
255
257
|
run_test_script(
|
|
256
258
|
"query_db.py")
|
|
257
259
|
|
|
258
260
|
if (args.command == "test-client"):
|
|
261
|
+
from ..mwl_server import run_mwl_server
|
|
262
|
+
from ..redcap_to_db import sync_redcap_to_db_repeatedly
|
|
259
263
|
lgr.info("Running client test for MWL")
|
|
260
|
-
|
|
261
264
|
# Run client.py to ensure that the worklist server is running and accepting connections
|
|
262
265
|
run_test_script(
|
|
263
266
|
"client.py",
|
|
@@ -267,9 +270,10 @@ def main() -> None:
|
|
|
267
270
|
)
|
|
268
271
|
|
|
269
272
|
if (args.command == "test-mpps"):
|
|
273
|
+
from ..mwl_server import run_mwl_server
|
|
274
|
+
from ..redcap_to_db import sync_redcap_to_db_repeatedly
|
|
270
275
|
lgr.info("Running MPPS test")
|
|
271
276
|
# Run MPPS tester with relevant arguments
|
|
272
|
-
|
|
273
277
|
run_test_script(
|
|
274
278
|
"mpps_tester.py",
|
|
275
279
|
host=args.ip,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: pylantir
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.5
|
|
4
4
|
Summary: Python - DICOM Modality WorkList
|
|
5
5
|
Author-email: Milton Camacho <miltoncamachoicc@gmail.com>
|
|
6
6
|
Requires-Python: >=3.11.1
|
|
@@ -64,6 +64,14 @@ To get started simply install using:
|
|
|
64
64
|
pip install pylantir
|
|
65
65
|
```
|
|
66
66
|
|
|
67
|
+
You need to provide your REDCap API URL and API token before starting the server.
|
|
68
|
+
Set up environmental variables before starting the server:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
export REDCAP_API_URL=<your API url>
|
|
72
|
+
export REDCAP_API_TOKEN=<your API token>
|
|
73
|
+
```
|
|
74
|
+
|
|
67
75
|
Start a server called with AEtitle MWL_SERVER.
|
|
68
76
|
|
|
69
77
|
```bash
|
|
@@ -6,9 +6,9 @@ pylantir/mwl_server.py,sha256=0NzZY2_uRI8QIeLeTFzQBuPyYxrKYrF1eHLNAnT4rXc,8662
|
|
|
6
6
|
pylantir/populate_db.py,sha256=KIbkVA-EAuTlDArXMFOHkjMmVfjlsTApj7S1wpUu1bM,2207
|
|
7
7
|
pylantir/redcap_to_db.py,sha256=ITiMAY-XB7B_-_8jUSAjdNqTngULjXBbWYjY4_Byh1U,8465
|
|
8
8
|
pylantir/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
|
-
pylantir/cli/run.py,sha256=
|
|
9
|
+
pylantir/cli/run.py,sha256=3auU1RW-RxJ9JQpWoUOXK5iXO4ff1WVyp19qqPmNZsk,10292
|
|
10
10
|
pylantir/config/mwl_config.json,sha256=1Ma2guYAEAXQh1z7959aZadAn3ORjBqnDDibSLcwv_g,851
|
|
11
|
-
pylantir-0.0.
|
|
12
|
-
pylantir-0.0.
|
|
13
|
-
pylantir-0.0.
|
|
14
|
-
pylantir-0.0.
|
|
11
|
+
pylantir-0.0.5.dist-info/entry_points.txt,sha256=vxaxvfGppLqRt9_4sqNDdP6b2jlgpcHIwP7UQfrM1T0,50
|
|
12
|
+
pylantir-0.0.5.dist-info/WHEEL,sha256=CpUCUxeHQbRN5UGRQHYRJorO5Af-Qy_fHMctcQ8DSGI,82
|
|
13
|
+
pylantir-0.0.5.dist-info/METADATA,sha256=ajRfFBP3c1uCneHPfmS-QDT-nkex9TQ0NXk5V6BeMkw,7176
|
|
14
|
+
pylantir-0.0.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|