eICU-MEDS 0.0.1__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 (31) hide show
  1. eicu_meds-0.0.1/.github/workflows/code-quality-main.yaml +31 -0
  2. eicu_meds-0.0.1/.github/workflows/code-quality-pr.yaml +45 -0
  3. eicu_meds-0.0.1/.github/workflows/python-build.yaml +99 -0
  4. eicu_meds-0.0.1/.github/workflows/tests.yaml +48 -0
  5. eicu_meds-0.0.1/.gitignore +163 -0
  6. eicu_meds-0.0.1/.pre-commit-config.yaml +92 -0
  7. eicu_meds-0.0.1/LICENSE +21 -0
  8. eicu_meds-0.0.1/PKG-INFO +89 -0
  9. eicu_meds-0.0.1/README.md +48 -0
  10. eicu_meds-0.0.1/pyproject.toml +41 -0
  11. eicu_meds-0.0.1/setup.cfg +4 -0
  12. eicu_meds-0.0.1/src/eICU_MEDS/__init__.py +38 -0
  13. eicu_meds-0.0.1/src/eICU_MEDS/__main__.py +101 -0
  14. eicu_meds-0.0.1/src/eICU_MEDS/commands.py +80 -0
  15. eicu_meds-0.0.1/src/eICU_MEDS/configs/ETL.yaml +45 -0
  16. eicu_meds-0.0.1/src/eICU_MEDS/configs/__init__.py +0 -0
  17. eicu_meds-0.0.1/src/eICU_MEDS/configs/event_configs.yaml +627 -0
  18. eicu_meds-0.0.1/src/eICU_MEDS/configs/main.yaml +25 -0
  19. eicu_meds-0.0.1/src/eICU_MEDS/configs/runner.yaml +7 -0
  20. eicu_meds-0.0.1/src/eICU_MEDS/configs/table_preprocessors.yaml +284 -0
  21. eicu_meds-0.0.1/src/eICU_MEDS/dataset.yaml +11 -0
  22. eicu_meds-0.0.1/src/eICU_MEDS/download.py +308 -0
  23. eicu_meds-0.0.1/src/eICU_MEDS/pre_MEDS.py +413 -0
  24. eicu_meds-0.0.1/src/eICU_MEDS.egg-info/PKG-INFO +89 -0
  25. eicu_meds-0.0.1/src/eICU_MEDS.egg-info/SOURCES.txt +29 -0
  26. eicu_meds-0.0.1/src/eICU_MEDS.egg-info/dependency_links.txt +1 -0
  27. eicu_meds-0.0.1/src/eICU_MEDS.egg-info/entry_points.txt +2 -0
  28. eicu_meds-0.0.1/src/eICU_MEDS.egg-info/requires.txt +30 -0
  29. eicu_meds-0.0.1/src/eICU_MEDS.egg-info/top_level.txt +1 -0
  30. eicu_meds-0.0.1/static/pypi_trusted_publisher_example.png +0 -0
  31. eicu_meds-0.0.1/tests/e2e_demo_test.py +62 -0
@@ -0,0 +1,31 @@
1
+ # Same as `code-quality-pr.yaml` but triggered on commit to main branch
2
+ # and runs on all files (instead of only the changed ones)
3
+
4
+ name: Code Quality Main
5
+
6
+ on:
7
+ push:
8
+ branches: [main]
9
+
10
+ jobs:
11
+ code-quality:
12
+ runs-on: ubuntu-latest
13
+
14
+ strategy:
15
+ matrix:
16
+ python-version: ["3.11"]
17
+
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+
21
+ - name: Set up Python ${{ matrix.python-version }}
22
+ uses: actions/setup-python@v5
23
+ with:
24
+ python-version: ${{ matrix.python-version }}
25
+
26
+ - name: Install packages
27
+ run: |
28
+ pip install .[dev]
29
+
30
+ - name: Run pre-commits
31
+ uses: pre-commit/action@v3.0.1
@@ -0,0 +1,45 @@
1
+ # This workflow finds which files were changed, prints them,
2
+ # and runs `pre-commit` on those files.
3
+
4
+ # Inspired by the sktime library:
5
+ # https://github.com/alan-turing-institute/sktime/blob/main/.github/workflows/test.yml
6
+
7
+ name: Code Quality PR
8
+
9
+ on:
10
+ pull_request:
11
+ branches: [main, "release/*", "dev"]
12
+
13
+ jobs:
14
+ code-quality:
15
+ runs-on: ubuntu-latest
16
+
17
+ strategy:
18
+ matrix:
19
+ python-version: ["3.11"]
20
+
21
+ steps:
22
+ - uses: actions/checkout@v4
23
+
24
+ - name: Set up Python ${{ matrix.python-version }}
25
+ uses: actions/setup-python@v5
26
+ with:
27
+ python-version: ${{ matrix.python-version }}
28
+
29
+ - name: Install packages
30
+ run: |
31
+ pip install .[dev]
32
+
33
+ - name: Find modified files
34
+ id: file_changes
35
+ uses: trilom/file-changes-action@v1.2.4
36
+ with:
37
+ output: " "
38
+
39
+ - name: List modified files
40
+ run: echo '${{ steps.file_changes.outputs.files}}'
41
+
42
+ - name: Run pre-commits
43
+ uses: pre-commit/action@v3.0.1
44
+ with:
45
+ extra_args: --files ${{ steps.file_changes.outputs.files}}
@@ -0,0 +1,99 @@
1
+ name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI
2
+
3
+ on: push
4
+
5
+ jobs:
6
+ build:
7
+ name: Build distribution 📦
8
+ runs-on: ubuntu-latest
9
+
10
+ strategy:
11
+ matrix:
12
+ python-version: ["3.12"]
13
+
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+ - name: Set up Python ${{ matrix.python-version }}
17
+ uses: actions/setup-python@v5
18
+ with:
19
+ python-version: ${{ matrix.python-version }}
20
+ - name: Install pypa/build
21
+ run: >-
22
+ python3 -m
23
+ pip install
24
+ build
25
+ --user
26
+ - name: Build a binary wheel and a source tarball
27
+ run: python3 -m build
28
+ - name: Store the distribution packages
29
+ uses: actions/upload-artifact@v4
30
+ with:
31
+ name: python-package-distributions
32
+ path: dist/
33
+
34
+ publish-to-pypi:
35
+ name: >-
36
+ Publish Python 🐍 distribution 📦 to PyPI
37
+ if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
38
+ needs:
39
+ - build
40
+ runs-on: ubuntu-latest
41
+ environment:
42
+ name: pypi
43
+ url: https://pypi.org/p/MEDS-transforms # Replace <package-name> with your PyPI project name
44
+ permissions:
45
+ id-token: write # IMPORTANT: mandatory for trusted publishing
46
+
47
+ steps:
48
+ - name: Download all the dists
49
+ uses: actions/download-artifact@v4
50
+ with:
51
+ name: python-package-distributions
52
+ path: dist/
53
+
54
+ - name: Publish distribution 📦 to PyPI
55
+ uses: pypa/gh-action-pypi-publish@release/v1
56
+
57
+ github-release:
58
+ name: >-
59
+ Sign the Python 🐍 distribution 📦 with Sigstore
60
+ and upload them to GitHub Release
61
+ needs:
62
+ - publish-to-pypi
63
+ runs-on: ubuntu-latest
64
+
65
+ permissions:
66
+ contents: write # IMPORTANT: mandatory for making GitHub Releases
67
+ id-token: write # IMPORTANT: mandatory for sigstore
68
+
69
+ steps:
70
+ - name: Download all the dists
71
+ uses: actions/download-artifact@v4
72
+ with:
73
+ name: python-package-distributions
74
+ path: dist/
75
+
76
+ - name: Sign the dists with Sigstore
77
+ uses: sigstore/gh-action-sigstore-python@v3.0.0
78
+ with:
79
+ inputs: >-
80
+ ./dist/*.tar.gz
81
+ ./dist/*.whl
82
+ - name: Create GitHub Release
83
+ env:
84
+ GITHUB_TOKEN: ${{ github.token }}
85
+ run: >-
86
+ gh release create
87
+ '${{ github.ref_name }}'
88
+ --repo '${{ github.repository }}'
89
+ --notes ""
90
+ - name: Upload artifact signatures to GitHub Release
91
+ env:
92
+ GITHUB_TOKEN: ${{ github.token }}
93
+ # Upload to GitHub Release using the `gh` CLI.
94
+ # `dist/` contains the built packages, and the
95
+ # sigstore-produced signatures and certificates.
96
+ run: >-
97
+ gh release upload
98
+ '${{ github.ref_name }}' dist/**
99
+ --repo '${{ github.repository }}'
@@ -0,0 +1,48 @@
1
+ name: Tests
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main, "release/*", "dev"]
8
+
9
+ jobs:
10
+ run_tests_ubuntu:
11
+ runs-on: ubuntu-latest
12
+
13
+ strategy:
14
+ matrix:
15
+ python-version: ["3.11", "3.12"]
16
+ fail-fast: false
17
+
18
+ timeout-minutes: 30
19
+
20
+ steps:
21
+ - name: Checkout
22
+ uses: actions/checkout@v4
23
+
24
+ - name: Set up Python ${{ matrix.python-version }}
25
+ uses: actions/setup-python@v5
26
+ with:
27
+ python-version: ${{ matrix.python-version }}
28
+
29
+ - name: Install packages
30
+ run: |
31
+ pip install -e .[tests]
32
+
33
+ #----------------------------------------------
34
+ # run test suite
35
+ #----------------------------------------------
36
+ - name: Run tests
37
+ run: |
38
+ pytest src/ tests/ -v --doctest-modules --cov=src --junitxml=junit.xml -s
39
+
40
+ - name: Upload coverage to Codecov
41
+ uses: codecov/codecov-action@v4.0.1
42
+ with:
43
+ token: ${{ secrets.CODECOV_TOKEN }}
44
+ - name: Upload test results to Codecov
45
+ if: ${{ !cancelled() }}
46
+ uses: codecov/test-results-action@v1
47
+ with:
48
+ token: ${{ secrets.CODECOV_TOKEN }}
@@ -0,0 +1,163 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ data
6
+
7
+ # C extensions
8
+ *.so
9
+
10
+ # Distribution / packaging
11
+ .Python
12
+ build/
13
+ develop-eggs/
14
+ dist/
15
+ downloads/
16
+ eggs/
17
+ .eggs/
18
+ lib/
19
+ lib64/
20
+ parts/
21
+ sdist/
22
+ var/
23
+ wheels/
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
+ cover/
54
+
55
+ # Translations
56
+ *.mo
57
+ *.pot
58
+
59
+ # Django stuff:
60
+ *.log
61
+ local_settings.py
62
+ db.sqlite3
63
+ db.sqlite3-journal
64
+
65
+ # Flask stuff:
66
+ instance/
67
+ .webassets-cache
68
+
69
+ # Scrapy stuff:
70
+ .scrapy
71
+
72
+ # Sphinx documentation
73
+ docs/_build/
74
+
75
+ # PyBuilder
76
+ .pybuilder/
77
+ target/
78
+
79
+ # Jupyter Notebook
80
+ .ipynb_checkpoints
81
+
82
+ # IPython
83
+ profile_default/
84
+ ipython_config.py
85
+
86
+ # pyenv
87
+ # For a library or package, you might want to ignore these files since the code is
88
+ # intended to run in multiple environments; otherwise, check them in:
89
+ # .python-version
90
+
91
+ # pipenv
92
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
93
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
94
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
95
+ # install all needed dependencies.
96
+ #Pipfile.lock
97
+
98
+ # poetry
99
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
100
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
101
+ # commonly ignored for libraries.
102
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
103
+ #poetry.lock
104
+
105
+ # pdm
106
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
107
+ #pdm.lock
108
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
109
+ # in version control.
110
+ # https://pdm.fming.dev/latest/usage/project/#working-with-version-control
111
+ .pdm.toml
112
+ .pdm-python
113
+ .pdm-build/
114
+
115
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
116
+ __pypackages__/
117
+
118
+ # Celery stuff
119
+ celerybeat-schedule
120
+ celerybeat.pid
121
+
122
+ # SageMath parsed files
123
+ *.sage.py
124
+
125
+ # Environments
126
+ .env
127
+ .venv
128
+ env/
129
+ venv/
130
+ ENV/
131
+ env.bak/
132
+ venv.bak/
133
+
134
+ # Spyder project settings
135
+ .spyderproject
136
+ .spyproject
137
+
138
+ # Rope project settings
139
+ .ropeproject
140
+
141
+ # mkdocs documentation
142
+ /site
143
+
144
+ # mypy
145
+ .mypy_cache/
146
+ .dmypy.json
147
+ dmypy.json
148
+
149
+ # Pyre type checker
150
+ .pyre/
151
+
152
+ # pytype static type analyzer
153
+ .pytype/
154
+
155
+ # Cython debug symbols
156
+ cython_debug/
157
+
158
+ # PyCharm
159
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
160
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
161
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
162
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
163
+ #.idea/
@@ -0,0 +1,92 @@
1
+ default_language_version:
2
+ python: python3.11
3
+
4
+ exclude: "docs/index.md|MIMIC-IV_Example/README.md|eICU_Example/README.md|AUMCdb_Example/README.md|test/demo_resources/.*"
5
+
6
+ repos:
7
+ - repo: https://github.com/pre-commit/pre-commit-hooks
8
+ rev: v5.0.0
9
+ hooks:
10
+ # list of supported hooks: https://pre-commit.com/hooks.html
11
+ - id: trailing-whitespace
12
+ - id: end-of-file-fixer
13
+ - id: check-docstring-first
14
+ - id: check-yaml
15
+ - id: debug-statements
16
+ - id: detect-private-key
17
+ - id: check-executables-have-shebangs
18
+ - id: check-toml
19
+ - id: check-case-conflict
20
+ - id: check-added-large-files
21
+ args: [--maxkb, "800"]
22
+
23
+ # python code formatting, linting, and import sorting using ruff
24
+ - repo: https://github.com/astral-sh/ruff-pre-commit
25
+ rev: v0.11.7
26
+ hooks:
27
+ # Run the formatter
28
+ - id: ruff-format
29
+ # Run the linter
30
+ - id: ruff
31
+ args: ["--fix", "--exit-non-zero-on-fix"]
32
+
33
+ # # python docstring formatting
34
+ # - repo: https://github.com/myint/docformatter
35
+ # rev: v1.7.5
36
+ # hooks:
37
+ # - id: docformatter
38
+ # args: [--in-place, --wrap-summaries=110, --wrap-descriptions=110]
39
+
40
+ # yaml formatting
41
+ - repo: https://github.com/pre-commit/mirrors-prettier
42
+ rev: v4.0.0-alpha.8
43
+ hooks:
44
+ - id: prettier
45
+ types: [yaml]
46
+ exclude: "environment.yaml"
47
+
48
+ # shell scripts linter
49
+ - repo: https://github.com/shellcheck-py/shellcheck-py
50
+ rev: v0.10.0.1
51
+ hooks:
52
+ - id: shellcheck
53
+
54
+ # md formatting
55
+ - repo: https://github.com/executablebooks/mdformat
56
+ rev: 0.7.22
57
+ hooks:
58
+ - id: mdformat
59
+ args: ["--number"]
60
+ additional_dependencies:
61
+ - mdformat-ruff
62
+ - mdformat-gfm
63
+ - mdformat-gfm-alerts
64
+ - mdformat-tables
65
+ - mdformat_frontmatter
66
+ - mdformat-config
67
+ - mdformat-mkdocs
68
+ - mdformat-toc
69
+
70
+ # word spelling linter
71
+ - repo: https://github.com/codespell-project/codespell
72
+ rev: v2.4.1
73
+ hooks:
74
+ - id: codespell
75
+ args:
76
+ - --skip=*.ipynb,*.bib,*.svg,pyproject.toml,*.csv
77
+ - --ignore-words-list=ehr,crate
78
+
79
+ # jupyter notebook cell output clearing
80
+ - repo: https://github.com/kynan/nbstripout
81
+ rev: 0.8.1
82
+ hooks:
83
+ - id: nbstripout
84
+
85
+ # jupyter notebook linting with ruff
86
+ - repo: https://github.com/nbQA-dev/nbQA
87
+ rev: 1.9.1
88
+ hooks:
89
+ - id: nbqa-ruff
90
+ args: ["--fix"]
91
+ - id: nbqa-ruff-format
92
+ args: ["--line-length=110"]
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Matthew McDermott
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.
@@ -0,0 +1,89 @@
1
+ Metadata-Version: 2.4
2
+ Name: eICU-MEDS
3
+ Version: 0.0.1
4
+ Summary: An ETL pipeline to extract the eICU dataset into the MEDS format.
5
+ Author: Jason Zuu
6
+ Author-email: Matthew McDermott <mattmcdermott8@gmail.com>, "Robin P. van de Water" <robin.vandewater@hpi.de>
7
+ Project-URL: Homepage, https://github.com/Medical-Event-Data-Standard/eICU_MEDS
8
+ Project-URL: Issues, https://github.com/Medical-Event-Data-Standard/eICU_MEDS/issues
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Operating System :: OS Independent
12
+ Requires-Python: >=3.11
13
+ Description-Content-Type: text/markdown
14
+ License-File: LICENSE
15
+ Requires-Dist: meds-transforms~=0.2.4
16
+ Requires-Dist: requests
17
+ Requires-Dist: beautifulsoup4
18
+ Requires-Dist: hydra-core
19
+ Requires-Dist: polars<1.27.0
20
+ Provides-Extra: dev
21
+ Requires-Dist: pre-commit<4; extra == "dev"
22
+ Provides-Extra: tests
23
+ Requires-Dist: pytest; extra == "tests"
24
+ Requires-Dist: pytest-cov; extra == "tests"
25
+ Requires-Dist: rootutils; extra == "tests"
26
+ Requires-Dist: hydra-joblib-launcher; extra == "tests"
27
+ Provides-Extra: local-parallelism
28
+ Requires-Dist: hydra-joblib-launcher; extra == "local-parallelism"
29
+ Provides-Extra: slurm-parallelism
30
+ Requires-Dist: hydra-submitit-launcher; extra == "slurm-parallelism"
31
+ Provides-Extra: docs
32
+ Requires-Dist: mkdocs==1.6.0; extra == "docs"
33
+ Requires-Dist: mkdocs-material==9.5.31; extra == "docs"
34
+ Requires-Dist: mkdocstrings[python,shell]==0.25.2; extra == "docs"
35
+ Requires-Dist: mkdocs-gen-files==0.5.0; extra == "docs"
36
+ Requires-Dist: mkdocs-literate-nav==0.6.1; extra == "docs"
37
+ Requires-Dist: mkdocs-section-index==0.3.9; extra == "docs"
38
+ Requires-Dist: mkdocs-git-authors-plugin==0.9.0; extra == "docs"
39
+ Requires-Dist: mkdocs-git-revision-date-localized-plugin==1.2.6; extra == "docs"
40
+ Dynamic: license-file
41
+
42
+ # eICU MEDS Extraction ETL
43
+
44
+ [![PyPI - Version](https://img.shields.io/pypi/v/ETL-MEDS)](https://pypi.org/project/ETL-MEDS/)
45
+ [![Documentation Status](https://readthedocs.org/projects/etl-meds/badge/?version=latest)](https://etl-meds.readthedocs.io/en/stable/?badge=stable)
46
+ ![Static Badge](https://img.shields.io/badge/MEDS-0.3.3-blue)
47
+
48
+ [![codecov](https://codecov.io/gh/Medical-Event-Data-Standard/ETL_MEDS_Template/graph/badge.svg?token=RW6JXHNT0W)](https://codecov.io/gh/Medical-Event-Data-Standard/ETL_MEDS_Template)
49
+ [![tests](https://github.com/Medical-Event-Data-Standard/ETL_MEDS_Template/actions/workflows/tests.yaml/badge.svg)](https://github.com/Medical-Event-Data-Standard/ETL_MEDS_Template/actions/workflows/tests.yml)
50
+ [![code-quality](https://github.com/Medical-Event-Data-Standard/ETL_MEDS_Template/actions/workflows/code-quality-main.yaml/badge.svg)](https://github.com/Medical-Event-Data-Standard/ETL_MEDS_Template/actions/workflows/code-quality-main.yaml)
51
+ ![python](https://img.shields.io/badge/-Python_3.11-blue?logo=python&logoColor=white)
52
+ [![license](https://img.shields.io/badge/License-MIT-green.svg?labelColor=gray)](https://github.com/Medical-Event-Data-Standard/ETL_MEDS_Template#license)
53
+ [![PRs](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/Medical-Event-Data-Standard/ETL_MEDS_Template/pulls)
54
+ [![contributors](https://img.shields.io/github/contributors/Medical-Event-Data-Standard/ETL_MEDS_Template.svg)](https://github.com/Medical-Event-Data-Standard/ETL_MEDS_Template/graphs/contributors)
55
+
56
+ A template repository for a MEDS-Transforms powered extraction pipeline for a custom dataset. Once you have
57
+ customized the repository to your dataset (see instructions below), you will be able to run your extraction
58
+ pipeline with a few simple command-line commands, such as:
59
+
60
+ ```bash
61
+ pip install -e . # using editing mode
62
+ export DATASET_DOWNLOAD_USERNAME=$PHYSIONET_USERNAME
63
+ export DATASET_DOWNLOAD_PASSWORD=$PHYSIONET_PASSWORD
64
+ MEDS_extract-eICU root_output_dir=data/eicu_meds do_download=False
65
+ ```
66
+
67
+ ## MEDS-transforms settings
68
+
69
+ If you want to convert a large dataset, you can use parallelization with MEDS-transforms
70
+ (the MEDS-transformation step that takes the longest).
71
+
72
+ Using local parallelization with the `hydra-joblib-launcher` package, you can set the number of workers:
73
+
74
+ ```
75
+ pip install hydra-joblib-launcher --upgrade
76
+ ```
77
+
78
+ Then, you can set the number of workers as environment variable:
79
+
80
+ ```bash
81
+ export N_WORKERS=8
82
+ ```
83
+
84
+ Moreover, you can set the number of subjects per shard to balance the parallelization overhead based on how many
85
+ subjects you have in your dataset:
86
+
87
+ ```bash
88
+ export N_SUBJECTS_PER_SHARD=100000
89
+ ```
@@ -0,0 +1,48 @@
1
+ # eICU MEDS Extraction ETL
2
+
3
+ [![PyPI - Version](https://img.shields.io/pypi/v/ETL-MEDS)](https://pypi.org/project/ETL-MEDS/)
4
+ [![Documentation Status](https://readthedocs.org/projects/etl-meds/badge/?version=latest)](https://etl-meds.readthedocs.io/en/stable/?badge=stable)
5
+ ![Static Badge](https://img.shields.io/badge/MEDS-0.3.3-blue)
6
+
7
+ [![codecov](https://codecov.io/gh/Medical-Event-Data-Standard/ETL_MEDS_Template/graph/badge.svg?token=RW6JXHNT0W)](https://codecov.io/gh/Medical-Event-Data-Standard/ETL_MEDS_Template)
8
+ [![tests](https://github.com/Medical-Event-Data-Standard/ETL_MEDS_Template/actions/workflows/tests.yaml/badge.svg)](https://github.com/Medical-Event-Data-Standard/ETL_MEDS_Template/actions/workflows/tests.yml)
9
+ [![code-quality](https://github.com/Medical-Event-Data-Standard/ETL_MEDS_Template/actions/workflows/code-quality-main.yaml/badge.svg)](https://github.com/Medical-Event-Data-Standard/ETL_MEDS_Template/actions/workflows/code-quality-main.yaml)
10
+ ![python](https://img.shields.io/badge/-Python_3.11-blue?logo=python&logoColor=white)
11
+ [![license](https://img.shields.io/badge/License-MIT-green.svg?labelColor=gray)](https://github.com/Medical-Event-Data-Standard/ETL_MEDS_Template#license)
12
+ [![PRs](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/Medical-Event-Data-Standard/ETL_MEDS_Template/pulls)
13
+ [![contributors](https://img.shields.io/github/contributors/Medical-Event-Data-Standard/ETL_MEDS_Template.svg)](https://github.com/Medical-Event-Data-Standard/ETL_MEDS_Template/graphs/contributors)
14
+
15
+ A template repository for a MEDS-Transforms powered extraction pipeline for a custom dataset. Once you have
16
+ customized the repository to your dataset (see instructions below), you will be able to run your extraction
17
+ pipeline with a few simple command-line commands, such as:
18
+
19
+ ```bash
20
+ pip install -e . # using editing mode
21
+ export DATASET_DOWNLOAD_USERNAME=$PHYSIONET_USERNAME
22
+ export DATASET_DOWNLOAD_PASSWORD=$PHYSIONET_PASSWORD
23
+ MEDS_extract-eICU root_output_dir=data/eicu_meds do_download=False
24
+ ```
25
+
26
+ ## MEDS-transforms settings
27
+
28
+ If you want to convert a large dataset, you can use parallelization with MEDS-transforms
29
+ (the MEDS-transformation step that takes the longest).
30
+
31
+ Using local parallelization with the `hydra-joblib-launcher` package, you can set the number of workers:
32
+
33
+ ```
34
+ pip install hydra-joblib-launcher --upgrade
35
+ ```
36
+
37
+ Then, you can set the number of workers as environment variable:
38
+
39
+ ```bash
40
+ export N_WORKERS=8
41
+ ```
42
+
43
+ Moreover, you can set the number of subjects per shard to balance the parallelization overhead based on how many
44
+ subjects you have in your dataset:
45
+
46
+ ```bash
47
+ export N_SUBJECTS_PER_SHARD=100000
48
+ ```
@@ -0,0 +1,41 @@
1
+ [build-system]
2
+ requires = ["setuptools>=64", "setuptools-scm>=8.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "eICU-MEDS"
7
+ dynamic = ["version"]
8
+ authors = [
9
+ { name="Matthew McDermott", email="mattmcdermott8@gmail.com" }, { name="Robin P. van de Water", email="robin.vandewater@hpi.de" }, { name="Jason Zuu" }
10
+ ]
11
+ description = "An ETL pipeline to extract the eICU dataset into the MEDS format."
12
+ readme = "README.md"
13
+ requires-python = ">=3.11"
14
+ classifiers = [
15
+ "Programming Language :: Python :: 3",
16
+ "License :: OSI Approved :: MIT License",
17
+ "Operating System :: OS Independent",
18
+ ]
19
+ dependencies = [
20
+ "meds-transforms~=0.2.4", "requests", "beautifulsoup4", "hydra-core", "polars<1.27.0"
21
+ ]
22
+
23
+ [tool.setuptools_scm]
24
+
25
+ [project.optional-dependencies]
26
+ dev = ["pre-commit<4"]
27
+ tests = ["pytest", "pytest-cov", "rootutils", "hydra-joblib-launcher"]
28
+ local_parallelism = ["hydra-joblib-launcher"]
29
+ slurm_parallelism = ["hydra-submitit-launcher"]
30
+ docs = [
31
+ "mkdocs==1.6.0", "mkdocs-material==9.5.31", "mkdocstrings[python,shell]==0.25.2", "mkdocs-gen-files==0.5.0",
32
+ "mkdocs-literate-nav==0.6.1", "mkdocs-section-index==0.3.9", "mkdocs-git-authors-plugin==0.9.0",
33
+ "mkdocs-git-revision-date-localized-plugin==1.2.6"
34
+ ]
35
+
36
+ [project.scripts]
37
+ MEDS_extract-eICU = "eICU_MEDS.__main__:main"
38
+
39
+ [project.urls]
40
+ Homepage = "https://github.com/Medical-Event-Data-Standard/eICU_MEDS"
41
+ Issues = "https://github.com/Medical-Event-Data-Standard/eICU_MEDS/issues"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+