pylantir 0.0.2__tar.gz → 0.0.2rc53.post1__tar.gz

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.
Files changed (56) hide show
  1. pylantir-0.0.2rc53.post1/.devcontainer/Dockerfile +12 -0
  2. pylantir-0.0.2rc53.post1/.devcontainer/devcontainer.json +44 -0
  3. pylantir-0.0.2rc53.post1/.github/dependabot.yml +22 -0
  4. pylantir-0.0.2rc53.post1/.github/template-sync.yml +21 -0
  5. pylantir-0.0.2rc53.post1/.github/workflows/CI.yml +21 -0
  6. pylantir-0.0.2rc53.post1/.github/workflows/publish.yml +33 -0
  7. pylantir-0.0.2rc53.post1/.github/workflows/schedule-update-actions.yml +25 -0
  8. pylantir-0.0.2rc53.post1/.github/workflows/semantic-pr-check.yml +17 -0
  9. pylantir-0.0.2rc53.post1/.github/workflows/sphinx.yml +18 -0
  10. pylantir-0.0.2rc53.post1/.github/workflows/template-sync.yml +12 -0
  11. pylantir-0.0.2rc53.post1/.gitignore +129 -0
  12. pylantir-0.0.2rc53.post1/.pre-commit-config.yaml +60 -0
  13. pylantir-0.0.2rc53.post1/.pypirc +10 -0
  14. pylantir-0.0.2rc53.post1/.vscode/launch.json +19 -0
  15. pylantir-0.0.2rc53.post1/.vscode/settings.json +29 -0
  16. pylantir-0.0.2rc53.post1/CODE_OF_CONDUCT.md +9 -0
  17. pylantir-0.0.2rc53.post1/LICENSE +21 -0
  18. {pylantir-0.0.2 → pylantir-0.0.2rc53.post1}/PKG-INFO +38 -19
  19. {pylantir-0.0.2 → pylantir-0.0.2rc53.post1}/README.md +31 -16
  20. pylantir-0.0.2rc53.post1/SECURITY.md +41 -0
  21. pylantir-0.0.2rc53.post1/SUPPORT.md +25 -0
  22. pylantir-0.0.2rc53.post1/docs/Makefile +20 -0
  23. pylantir-0.0.2rc53.post1/docs/conf.py +67 -0
  24. pylantir-0.0.2rc53.post1/docs/devcontainer.md +16 -0
  25. pylantir-0.0.2rc53.post1/docs/developer.md +3 -0
  26. pylantir-0.0.2rc53.post1/docs/index.rst +20 -0
  27. pylantir-0.0.2rc53.post1/docs/make.bat +35 -0
  28. pylantir-0.0.2rc53.post1/docs/modules.rst +7 -0
  29. pylantir-0.0.2rc53.post1/docs/pre-commit-config.md +6 -0
  30. pylantir-0.0.2rc53.post1/docs/pylint.md +507 -0
  31. pylantir-0.0.2rc53.post1/docs/pyproject.md +9 -0
  32. pylantir-0.0.2rc53.post1/docs/python_package.hello_world.rst +21 -0
  33. pylantir-0.0.2rc53.post1/docs/python_package.rst +29 -0
  34. pylantir-0.0.2rc53.post1/docs/requirements.txt +3 -0
  35. pylantir-0.0.2rc53.post1/docs/vscode.md +1 -0
  36. pylantir-0.0.2rc53.post1/docs/workflows.md +4 -0
  37. pylantir-0.0.2rc53.post1/pylantir.png +0 -0
  38. {pylantir-0.0.2 → pylantir-0.0.2rc53.post1}/pyproject.toml +5 -2
  39. pylantir-0.0.2rc53.post1/src/README.md +1 -0
  40. {pylantir-0.0.2 → pylantir-0.0.2rc53.post1}/src/pylantir/__init__.py +1 -1
  41. {pylantir-0.0.2 → pylantir-0.0.2rc53.post1}/src/pylantir/cli/run.py +15 -11
  42. {pylantir-0.0.2 → pylantir-0.0.2rc53.post1}/src/pylantir/config/mwl_config.json +13 -3
  43. {pylantir-0.0.2 → pylantir-0.0.2rc53.post1}/src/pylantir/models.py +4 -0
  44. {pylantir-0.0.2 → pylantir-0.0.2rc53.post1}/src/pylantir/mwl_server.py +98 -67
  45. pylantir-0.0.2rc53.post1/src/pylantir/redcap_to_db.py +322 -0
  46. pylantir-0.0.2rc53.post1/tests/client.py +63 -0
  47. pylantir-0.0.2rc53.post1/tests/client2.py +46 -0
  48. pylantir-0.0.2rc53.post1/tests/conftest.py +30 -0
  49. pylantir-0.0.2rc53.post1/tests/mpps_tester.py +147 -0
  50. pylantir-0.0.2rc53.post1/tests/query_db.py +44 -0
  51. pylantir-0.0.2rc53.post1/tests/test_methods.py +32 -0
  52. pylantir-0.0.2/src/pylantir/.env +0 -2
  53. pylantir-0.0.2/src/pylantir/redcap_to_db.py +0 -231
  54. {pylantir-0.0.2 → pylantir-0.0.2rc53.post1}/src/pylantir/cli/__init__.py +0 -0
  55. {pylantir-0.0.2 → pylantir-0.0.2rc53.post1}/src/pylantir/db_setup.py +0 -0
  56. {pylantir-0.0.2 → pylantir-0.0.2rc53.post1}/src/pylantir/populate_db.py +0 -0
@@ -0,0 +1,12 @@
1
+ FROM mcr.microsoft.com/devcontainers/python:3
2
+
3
+ RUN python -m pip install --upgrade pip \
4
+ && python -m pip install 'flit>=3.8.0'
5
+
6
+ ENV FLIT_ROOT_INSTALL=1
7
+
8
+ COPY pyproject.toml .
9
+ RUN touch README.md \
10
+ && mkdir -p src/python_package \
11
+ && python -m flit install --only-deps --deps develop \
12
+ && rm -r pyproject.toml README.md src
@@ -0,0 +1,44 @@
1
+ // For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2
+ // https://github.com/microsoft/vscode-dev-containers/tree/v0.222.0/containers/python-3-miniconda
3
+ {
4
+ "name": "Python Environment",
5
+ "build": {
6
+ "dockerfile": "Dockerfile",
7
+ "context": ".."
8
+ },
9
+ "customizations": {
10
+ "vscode": {
11
+ "extensions": [
12
+ "editorconfig.editorconfig",
13
+ "github.vscode-pull-request-github",
14
+ "ms-azuretools.vscode-docker",
15
+ "ms-python.python",
16
+ "ms-python.vscode-pylance",
17
+ "ms-python.pylint",
18
+ "ms-python.isort",
19
+ "ms-python.flake8",
20
+ "ms-python.black-formatter",
21
+ "ms-vsliveshare.vsliveshare",
22
+ "ryanluker.vscode-coverage-gutters",
23
+ "bungcip.better-toml",
24
+ "GitHub.copilot"
25
+ ],
26
+ "settings": {
27
+ "python.defaultInterpreterPath": "/usr/local/bin/python",
28
+ "black-formatter.path": [
29
+ "/usr/local/py-utils/bin/black"
30
+ ],
31
+ "pylint.path": [
32
+ "/usr/local/py-utils/bin/pylint"
33
+ ],
34
+ "flake8.path": [
35
+ "/usr/local/py-utils/bin/flake8"
36
+ ],
37
+ "isort.path": [
38
+ "/usr/local/py-utils/bin/isort"
39
+ ]
40
+ }
41
+ }
42
+ },
43
+ "onCreateCommand": "pre-commit install-hooks"
44
+ }
@@ -0,0 +1,22 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: pip
4
+ directory: "/"
5
+ schedule:
6
+ interval: daily
7
+ time: "13:00"
8
+ open-pull-requests-limit: 10
9
+ reviewers:
10
+ - dciborow
11
+ allow:
12
+ - dependency-type: direct
13
+ - dependency-type: indirect
14
+ commit-message:
15
+ prefix: "fix: "
16
+ - package-ecosystem: "github-actions"
17
+ directory: "/"
18
+ schedule:
19
+ interval: daily
20
+ time: "13:00"
21
+ commit-message:
22
+ prefix: "fix: "
@@ -0,0 +1,21 @@
1
+ files:
2
+ - ".gitignore" # include
3
+ - ".github"
4
+ - ".vscode"
5
+ - "tests/conftest.py"
6
+ - ".flake8"
7
+ - ".pre-commit-config.yml"
8
+ - ".pypirc"
9
+ - "docs"
10
+ - "src/README.md"
11
+ - "CODE_OF_CONDUCT.md"
12
+ - "LICENSE"
13
+ - "README.md"
14
+ - "SECURITY.md"
15
+ - "SUPPORT.md"
16
+ - "pyproject.toml"
17
+
18
+ - "!.github/workflows/template-sync.yml"
19
+ - "!.github/template-sync.yml"
20
+ - "!src/python_project"
21
+ - "!tests/test_methods.py"
@@ -0,0 +1,21 @@
1
+ name: Python CI
2
+ on:
3
+ push:
4
+ branches: [ main ]
5
+ pull_request:
6
+ branches: [ main ]
7
+ release:
8
+ types: [created]
9
+ workflow_dispatch:
10
+
11
+ jobs:
12
+ validation:
13
+ uses: microsoft/action-python/.github/workflows/validation.yml@0.6.4
14
+ with:
15
+ workdir: '.'
16
+
17
+ publish:
18
+ uses: microsoft/action-python/.github/workflows/publish.yml@0.6.4
19
+ secrets:
20
+ PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
21
+ TEST_PYPI_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }}
@@ -0,0 +1,33 @@
1
+ name: Publish Python Package
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*" # Only run on version tags like v1.2.3
7
+
8
+ jobs:
9
+ build-and-publish:
10
+ runs-on: ubuntu-latest
11
+
12
+ steps:
13
+ - name: Checkout code
14
+ uses: actions/checkout@v4
15
+
16
+ - name: Set up Python
17
+ uses: actions/setup-python@v5
18
+ with:
19
+ python-version: '3.11'
20
+
21
+ - name: Install build tools
22
+ run: |
23
+ python -m pip install --upgrade pip
24
+ pip install build twine
25
+
26
+ - name: Build package
27
+ run: python -m build
28
+
29
+ - name: Publish to PyPI
30
+ env:
31
+ TWINE_USERNAME: __token__
32
+ TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
33
+ run: twine upload dist/*
@@ -0,0 +1,25 @@
1
+ name: GitHub Actions Version Updater
2
+
3
+ # Controls when the action will run.
4
+ on:
5
+ workflow_dispatch:
6
+ schedule:
7
+ # Automatically run on every Sunday
8
+ - cron: '0 0 * * 0'
9
+
10
+ jobs:
11
+ build:
12
+ runs-on: ubuntu-latest
13
+
14
+ steps:
15
+ - uses: actions/checkout@v3.5.2
16
+ with:
17
+ # [Required] Access token with `workflow` scope.
18
+ token: ${{ secrets.PAT }}
19
+
20
+ - name: Run GitHub Actions Version Updater
21
+ uses: saadmk11/github-actions-version-updater@v0.7.4
22
+ with:
23
+ # [Required] Access token with `workflow` scope.
24
+ token: ${{ secrets.PAT }}
25
+ pull_request_title: "ci: Update GitHub Actions to Latest Version"
@@ -0,0 +1,17 @@
1
+ name: "Semantic PR Check"
2
+
3
+ on:
4
+ pull_request_target:
5
+ types:
6
+ - opened
7
+ - edited
8
+ - synchronize
9
+
10
+ jobs:
11
+ main:
12
+ name: Validate PR title
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: amannn/action-semantic-pull-request@v5.2.0
16
+ env:
17
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,18 @@
1
+ name: Deploy Sphinx documentation to Pages
2
+
3
+ on:
4
+ push:
5
+ branches: [main] # branch to trigger deployment
6
+
7
+ jobs:
8
+ pages:
9
+ runs-on: ubuntu-20.04
10
+ environment:
11
+ name: github-pages
12
+ url: ${{ steps.deployment.outputs.page_url }}
13
+ permissions:
14
+ pages: write
15
+ id-token: write
16
+ steps:
17
+ - id: deployment
18
+ uses: sphinx-notes/pages@v3
@@ -0,0 +1,12 @@
1
+ name: Template Sync
2
+ on:
3
+ workflow_dispatch:
4
+ jobs:
5
+ sync:
6
+ runs-on: ubuntu-latest
7
+ steps:
8
+ - uses: actions/checkout@v3.5.2 # important!
9
+ - uses: euphoricsystems/action-sync-template-repository@v2.5.1
10
+ with:
11
+ github-token: ${{ secrets.GITHUB_TOKEN }}
12
+ dry-run: true
@@ -0,0 +1,129 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ pip-wheel-metadata/
24
+ share/python-wheels/
25
+ *.egg-info/
26
+ .installed.cfg
27
+ *.egg
28
+ MANIFEST
29
+
30
+ # PyInstaller
31
+ # Usually these files are written by a python script from a template
32
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
33
+ *.manifest
34
+ *.spec
35
+
36
+ # Installer logs
37
+ pip-log.txt
38
+ pip-delete-this-directory.txt
39
+
40
+ # Unit test / coverage reports
41
+ htmlcov/
42
+ .tox/
43
+ .nox/
44
+ .coverage
45
+ .coverage.*
46
+ .cache
47
+ nosetests.xml
48
+ coverage.xml
49
+ *.cover
50
+ *.py,cover
51
+ .hypothesis/
52
+ .pytest_cache/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ target/
76
+
77
+ # Jupyter Notebook
78
+ .ipynb_checkpoints
79
+
80
+ # IPython
81
+ profile_default/
82
+ ipython_config.py
83
+
84
+ # pyenv
85
+ .python-version
86
+
87
+ # pipenv
88
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
89
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
90
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
91
+ # install all needed dependencies.
92
+ #Pipfile.lock
93
+
94
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
95
+ __pypackages__/
96
+
97
+ # Celery stuff
98
+ celerybeat-schedule
99
+ celerybeat.pid
100
+
101
+ # SageMath parsed files
102
+ *.sage.py
103
+
104
+ # Environments
105
+ .env
106
+ .venv
107
+ env/
108
+ venv/
109
+ ENV/
110
+ env.bak/
111
+ venv.bak/
112
+
113
+ # Spyder project settings
114
+ .spyderproject
115
+ .spyproject
116
+
117
+ # Rope project settings
118
+ .ropeproject
119
+
120
+ # mkdocs documentation
121
+ /site
122
+
123
+ # mypy
124
+ .mypy_cache/
125
+ .dmypy.json
126
+ dmypy.json
127
+
128
+ # Pyre type checker
129
+ .pyre/
@@ -0,0 +1,60 @@
1
+ ci:
2
+ autoupdate_commit_msg: "chore: update pre-commit hooks"
3
+ autofix_commit_msg: "style: pre-commit fixes"
4
+
5
+ repos:
6
+ - repo: https://github.com/pre-commit/pre-commit-hooks
7
+ rev: v4.1.0
8
+ hooks:
9
+ - id: check-added-large-files
10
+ - id: check-case-conflict
11
+ - id: check-merge-conflict
12
+ - id: check-symlinks
13
+ - id: check-yaml
14
+ - id: debug-statements
15
+ - id: end-of-file-fixer
16
+ - id: mixed-line-ending
17
+ - id: requirements-txt-fixer
18
+ - id: trailing-whitespace
19
+
20
+ - repo: https://github.com/PyCQA/isort
21
+ rev: 5.12.0
22
+ hooks:
23
+ - id: isort
24
+ args: ["-a", "from __future__ import annotations"]
25
+
26
+ - repo: https://github.com/asottile/pyupgrade
27
+ rev: v2.31.0
28
+ hooks:
29
+ - id: pyupgrade
30
+ args: [--py37-plus]
31
+
32
+ - repo: https://github.com/hadialqattan/pycln
33
+ rev: v1.2.5
34
+ hooks:
35
+ - id: pycln
36
+ args: [--config=pyproject.toml]
37
+ stages: [manual]
38
+
39
+ - repo: https://github.com/codespell-project/codespell
40
+ rev: v2.1.0
41
+ hooks:
42
+ - id: codespell
43
+
44
+ - repo: https://github.com/pre-commit/pygrep-hooks
45
+ rev: v1.9.0
46
+ hooks:
47
+ - id: python-check-blanket-noqa
48
+ - id: python-check-blanket-type-ignore
49
+ - id: python-no-log-warn
50
+ - id: python-no-eval
51
+ - id: python-use-type-annotations
52
+ - id: rst-backticks
53
+ - id: rst-directive-colons
54
+ - id: rst-inline-touching-normal
55
+
56
+ - repo: https://github.com/mgedmin/check-manifest
57
+ rev: "0.47"
58
+ hooks:
59
+ - id: check-manifest
60
+ stages: [manual]
@@ -0,0 +1,10 @@
1
+ [distutils]
2
+ index-servers =
3
+ pypi
4
+ testpypi
5
+
6
+ [pypi]
7
+ repository = https://upload.pypi.org/legacy/
8
+
9
+ [testpypi]
10
+ repository = https://test.pypi.org/legacy/
@@ -0,0 +1,19 @@
1
+ {
2
+ "version": "0.1.0",
3
+ "configurations": [
4
+ {
5
+ "name": "Python: Debug Tests",
6
+ "type": "python",
7
+ "request": "launch",
8
+ "program": "${file}",
9
+ "purpose": [
10
+ "debug-test"
11
+ ],
12
+ "console": "integratedTerminal",
13
+ "justMyCode": false,
14
+ "env": {
15
+ "PYTEST_ADDOPTS": "--no-cov -n0 --dist no"
16
+ }
17
+ }
18
+ ]
19
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "editor.formatOnSave": true,
3
+ "editor.formatOnPaste": true,
4
+ "files.trimTrailingWhitespace": true,
5
+ "files.autoSave": "onFocusChange",
6
+ "git.autofetch": true,
7
+ "[jsonc]": {
8
+ "editor.defaultFormatter": "vscode.json-language-features"
9
+ },
10
+ "[python]": {
11
+ "editor.defaultFormatter": "ms-python.black-formatter"
12
+ },
13
+ "python.defaultInterpreterPath": "/usr/local/bin/python",
14
+ "python.formatting.provider": "black",
15
+ "python.testing.unittestEnabled": false,
16
+ "python.testing.pytestEnabled": true,
17
+ "pylint.args": [
18
+ "--rcfile=pyproject.toml"
19
+ ],
20
+ "black-formatter.args": [
21
+ "--config=pyproject.toml"
22
+ ],
23
+ "flake8.args": [
24
+ "--toml-config=pyproject.toml"
25
+ ],
26
+ "isort.args": [
27
+ "--settings-path=pyproject.toml"
28
+ ]
29
+ }
@@ -0,0 +1,9 @@
1
+ # Microsoft Open Source Code of Conduct
2
+
3
+ This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
4
+
5
+ Resources:
6
+
7
+ - [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/)
8
+ - [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
9
+ - Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Microsoft Corporation.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: pylantir
3
- Version: 0.0.2
3
+ Version: 0.0.2rc53.post1
4
4
  Summary: Python - DICOM Modality WorkList
5
5
  Author-email: Milton Camacho <miltoncamachoicc@gmail.com>
6
6
  Requires-Python: >=3.11.1
@@ -13,10 +13,14 @@ Classifier: Programming Language :: Python :: 3.8
13
13
  Classifier: Programming Language :: Python :: 3.9
14
14
  Classifier: Programming Language :: Python :: 3.10
15
15
  Classifier: Programming Language :: Python :: 3.11
16
+ License-File: LICENSE
16
17
  Requires-Dist: pynetdicom
17
18
  Requires-Dist: sqlalchemy
18
19
  Requires-Dist: PyCap
19
20
  Requires-Dist: uuid
21
+ Requires-Dist: coloredlogs
22
+ Requires-Dist: python-dotenv
23
+ Requires-Dist: pandas
20
24
  Requires-Dist: pyspark>=3.0.0 ; extra == "spark"
21
25
  Requires-Dist: bandit[toml]==1.7.5 ; extra == "test"
22
26
  Requires-Dist: black==23.3.0 ; extra == "test"
@@ -27,7 +31,7 @@ Requires-Dist: flake8-formatter_junit_xml ; extra == "test"
27
31
  Requires-Dist: flake8 ; extra == "test"
28
32
  Requires-Dist: flake8-pyproject ; extra == "test"
29
33
  Requires-Dist: pre-commit==3.3.1 ; extra == "test"
30
- Requires-Dist: pylint==2.17.4 ; extra == "test"
34
+ Requires-Dist: pylint==3.3.6 ; extra == "test"
31
35
  Requires-Dist: pylint_junit ; extra == "test"
32
36
  Requires-Dist: pytest-cov==4.0.0 ; extra == "test"
33
37
  Requires-Dist: pytest-mock<3.10.1 ; extra == "test"
@@ -62,20 +66,35 @@ To get started simply install using:
62
66
  pip install pylantir
63
67
  ```
64
68
 
69
+ You need to provide your REDCap API URL and API token before starting the server.
70
+ Set up environmental variables before starting the server:
71
+
72
+ ```bash
73
+ export REDCAP_API_URL=<your API url>
74
+ export REDCAP_API_TOKEN=<your API token>
75
+ ```
76
+
65
77
  Start a server called with AEtitle MWL_SERVER.
66
78
 
67
79
  ```bash
68
- pylantir start --ip 127.0.0.1 --port 4242 --AEtitle MWL_SERVER
80
+ pylantir start --ip 127.0.0.1 --port 4242 --AEtitle MWL_SERVER --pylantir_config Path/to/your/config.json
69
81
  ```
70
82
 
71
83
  ## Tests
72
84
 
73
- Once your modality worklist server is running you can test it running the following:
85
+ If you want to run the tests make sure to clone the repository and run them from there.
86
+
87
+ Git clone the repository:
88
+
89
+ ```bash
90
+ git clone https://github.com/miltoncamacho/pylantir
91
+ cd pylantir/tests
92
+ ```
74
93
 
75
94
  Query the worklist database to check that you have some entries using:
76
95
 
77
96
  ```bash
78
- pylantir query-db
97
+ python query-db.py
79
98
  ```
80
99
 
81
100
  Then, you can get a StudyUID from one of the entries to test the MPPS workflow. For example: 1.2.840.10008.3.1.2.3.4.55635351412689303463019139483773956632
@@ -83,19 +102,19 @@ Then, you can get a StudyUID from one of the entries to test the MPPS workflow.
83
102
  Take this and run a create action to mark the worklist Procedure Step Status as IN_PROGRESS
84
103
 
85
104
  ```bash
86
- pylantir test-mpps --AEtitle MWL_SERVER --mpps_action create --callingAEtitle MWL_TESTER --ip 127.0.0.1 --port 4242 --study_uid 1.2.840.10008.3.1.2.3.4.55635351412689303463019139483773956632
105
+ python test-mpps.py --AEtitle MWL_SERVER --mpps_action create --callingAEtitle MWL_TESTER --ip 127.0.0.1 --port 4242 --study_uid 1.2.840.10008.3.1.2.3.4.55635351412689303463019139483773956632
87
106
  ```
88
107
 
89
108
  You can verify that this in fact modified your database re-running:
90
109
 
91
110
  ```bash
92
- pylantir query-db
111
+ python query-db.py
93
112
  ```
94
113
 
95
114
  Finally, you can also simulate the pocedure completion efectively updating the Procedure Step Status to COMPLETED or DISCONTINUED:
96
115
 
97
116
  ```bash
98
- pylantir test-mpps --AEtitle MWL_SERVER --mpps_action set --mpps_status COMPLETED --callingAEtitle MWL_TESTER --ip 127.0.0.1 --port 4242 --study_uid 1.2.840.10008.3.1.2.3.4.55635351412689303463019139483773956632 --sop_uid 1.2.840.10008.3.1.2.3.4.187176383255263644225774937658729238426
117
+ python test-mpps.py --AEtitle MWL_SERVER --mpps_action set --mpps_status COMPLETED --callingAEtitle MWL_TESTER --ip 127.0.0.1 --port 4242 --study_uid 1.2.840.10008.3.1.2.3.4.55635351412689303463019139483773956632 --sop_uid 1.2.840.10008.3.1.2.3.4.187176383255263644225774937658729238426
99
118
  ```
100
119
 
101
120
  ## Usage
@@ -122,10 +141,11 @@ usage: pylantir [-h] [--AEtitle AETITLE] [--ip IP] [--port PORT] [--pylantir_con
122
141
  - **--port PORT**: Port for the server
123
142
  - **--pylantir_config PYLANTIR_CONFIG**: Path to the configuration JSON file containing pylantir configs:
124
143
  - **allowed_aet**: List of allowed AE titles e.g. `["MRI_SCANNER", "MRI_SCANNER_2"]`
125
- - **mri_visit_session_mapping**: Mapping of MRI visit to session e.g., `{"T1": "1", "T2": "2"}`
126
144
  - **site**: Site ID:string
127
- - **protocol**: `{"site": "protocol_name"}`
145
+ - **protocol**: `{"site": "protocol_name", "mapping": "HIS/RIS mapping"}`
128
146
  - **redcap2wl**: Dictionary of REDCap fields to worklist fields mapping e.g., `{"redcap_field": "worklist_field"}`
147
+ - **db_update_interval**: How often to reload the database e
148
+ - **operation_interval**: What is the time range in a day in which the database will be updated e.g., `{"start_time":[hours,minutes],"end_time":[hours,minutes]}`
129
149
  - **--mpps_action {create,set}**: Action to perform for MPPS either create or set
130
150
  - **--mpps_status {COMPLETED,DISCONTINUED}**: Status to set for MPPS either COMPLETED or DISCONTINUED
131
151
  - **--callingAEtitle CALLINGAETITLE**: Calling AE Title for MPPS, it helps when the MWL is limited to only accept certain AE titles
@@ -141,21 +161,19 @@ As a default pylantir will try to read a JSON structured file with the following
141
161
  "db_path": "/path/to/worklist.db",
142
162
  "db_echo": "False",
143
163
  "db_update_interval": 60,
164
+ "operation_interval": {"start_time": [0,0],"end_time": [23,59]},
144
165
  "allowed_aet": [],
145
- "mri_visit_session_mapping": {
146
- "t1_arm_1": "1",
147
- "t2_arm_1": "2",
148
- "t3_arm_1": "3"
149
- },
150
166
  "site": "792",
151
167
  "redcap2wl": {
152
168
  "study_id": "study_id",
169
+ "instrument": "redcap_repeat_instrument",
170
+ "session_id" : "mri_instance",
153
171
  "family_id": "family_id",
154
172
  "youth_dob_y": "youth_dob_y",
155
173
  "t1_date": "t1_date",
156
174
  "demo_sex": "demo_sex",
157
- "scheduled_date": "scheduled_start_date",
158
- "scheduled_time": "scheduled_start_time",
175
+ "scheduled_date": "mri_date",
176
+ "scheduled_time": "mri_time",
159
177
  "mri_wt_lbs": "patient_weight_lb",
160
178
  "referring_physician": "referring_physician_name",
161
179
  "performing_physician": "performing_physician",
@@ -163,7 +181,8 @@ As a default pylantir will try to read a JSON structured file with the following
163
181
  "status": "performed_procedure_step_status"
164
182
  },
165
183
  "protocol": {
166
- "792": "BRAIN_MRI_3T"
184
+ "792": "BRAIN_MRI_3T",
185
+ "mapping": "GEHC"
167
186
  }
168
187
  }
169
188
  ```