carrot-transform 0.3__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.
Potentially problematic release.
This version of carrot-transform might be problematic. Click here for more details.
- carrot_transform-0.3/.github/workflows/pypi.publish.yml +55 -0
- carrot_transform-0.3/.gitignore +12 -0
- carrot_transform-0.3/LICENSE +21 -0
- carrot_transform-0.3/MANIFEST.in +2 -0
- carrot_transform-0.3/PKG-INFO +28 -0
- carrot_transform-0.3/README.md +16 -0
- carrot_transform-0.3/carrot_transform.egg-info/PKG-INFO +28 -0
- carrot_transform-0.3/carrot_transform.egg-info/SOURCES.txt +25 -0
- carrot_transform-0.3/carrot_transform.egg-info/dependency_links.txt +1 -0
- carrot_transform-0.3/carrot_transform.egg-info/entry_points.txt +2 -0
- carrot_transform-0.3/carrot_transform.egg-info/top_level.txt +1 -0
- carrot_transform-0.3/carrot_transform.py +4 -0
- carrot_transform-0.3/carrottransform/__init__.py +5 -0
- carrot_transform-0.3/carrottransform/_version.py +2 -0
- carrot_transform-0.3/carrottransform/cli/__init__.py +0 -0
- carrot_transform-0.3/carrottransform/cli/command.py +21 -0
- carrot_transform-0.3/carrottransform/cli/subcommands/__init__.py +0 -0
- carrot_transform-0.3/carrottransform/cli/subcommands/run.py +484 -0
- carrot_transform-0.3/carrottransform/config/OMOPCDM_postgresql_5.3_ddl.sql +508 -0
- carrot_transform-0.3/carrottransform/config/omop.json +61 -0
- carrot_transform-0.3/carrottransform/tools/__init__.py +17 -0
- carrot_transform-0.3/carrottransform/tools/file_helpers.py +14 -0
- carrot_transform-0.3/carrottransform/tools/mappingrules.py +157 -0
- carrot_transform-0.3/carrottransform/tools/metrics.py +127 -0
- carrot_transform-0.3/carrottransform/tools/omopcdm.py +182 -0
- carrot_transform-0.3/pyproject.toml +20 -0
- carrot_transform-0.3/setup.cfg +4 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# This workflow will upload a Python Package using Twine when a release is created
|
|
2
|
+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
|
|
3
|
+
|
|
4
|
+
name: Upload Python Package
|
|
5
|
+
|
|
6
|
+
# on:
|
|
7
|
+
# release:
|
|
8
|
+
# types: [published]
|
|
9
|
+
on: push
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
build:
|
|
16
|
+
name: Build distribution
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v4
|
|
21
|
+
- name: Set up Python
|
|
22
|
+
uses: actions/setup-python@v3
|
|
23
|
+
with:
|
|
24
|
+
python-version: '3.x'
|
|
25
|
+
- name: Install dependencies
|
|
26
|
+
run: |
|
|
27
|
+
python -m pip install --upgrade pip
|
|
28
|
+
pip install build
|
|
29
|
+
- name: Build package
|
|
30
|
+
run: python -m build
|
|
31
|
+
- name: Store the distribution packages
|
|
32
|
+
uses: actions/upload-artifact@v4
|
|
33
|
+
with:
|
|
34
|
+
name: python-package-distributions
|
|
35
|
+
path: dist/
|
|
36
|
+
|
|
37
|
+
publish-to-pypi:
|
|
38
|
+
name: Publish Python distribution to PyPI
|
|
39
|
+
needs:
|
|
40
|
+
- build
|
|
41
|
+
runs-on: ubuntu-latest
|
|
42
|
+
environment:
|
|
43
|
+
name: pypi
|
|
44
|
+
url: https://pypi.org/p/carrot-transform
|
|
45
|
+
permissions:
|
|
46
|
+
id-token: write
|
|
47
|
+
|
|
48
|
+
steps:
|
|
49
|
+
- name: Download all the dists
|
|
50
|
+
uses: actions/download-artifact@v4
|
|
51
|
+
with:
|
|
52
|
+
name: python-package-distributions
|
|
53
|
+
path: dist/
|
|
54
|
+
- name: Publish distribution 📦 to PyPI
|
|
55
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) [2024] [Philip Duncan Appleby]
|
|
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,28 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: carrot-transform
|
|
3
|
+
Version: 0.3
|
|
4
|
+
Summary: Carrot somple transformer, input rules and data csvs, output OMOP
|
|
5
|
+
Author-email: PD Appleby <pdappleby@gmail.com>
|
|
6
|
+
Classifier: Programming Language :: Python :: 3
|
|
7
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
8
|
+
Classifier: Operating System :: OS Independent
|
|
9
|
+
Requires-Python: >=3.9
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
|
|
13
|
+
# carrot-transform
|
|
14
|
+
|
|
15
|
+
TODO:
|
|
16
|
+
* Document carrot-transform
|
|
17
|
+
* Add more comments in-code
|
|
18
|
+
* Handle capture of ddl and json config via the command-line as optional args
|
|
19
|
+
|
|
20
|
+
Reduction in complexity over the original CaRROT-CDM version for the Transform part of *ETL* - In practice *Extract* is always
|
|
21
|
+
performed by Data Partners, *Load* by database bulk-load software.
|
|
22
|
+
|
|
23
|
+
Statistics
|
|
24
|
+
|
|
25
|
+
External libraries imported (approximate)
|
|
26
|
+
|
|
27
|
+
carrot-cdm 61
|
|
28
|
+
carrot-transform 12
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# carrot-transform
|
|
2
|
+
|
|
3
|
+
TODO:
|
|
4
|
+
* Document carrot-transform
|
|
5
|
+
* Add more comments in-code
|
|
6
|
+
* Handle capture of ddl and json config via the command-line as optional args
|
|
7
|
+
|
|
8
|
+
Reduction in complexity over the original CaRROT-CDM version for the Transform part of *ETL* - In practice *Extract* is always
|
|
9
|
+
performed by Data Partners, *Load* by database bulk-load software.
|
|
10
|
+
|
|
11
|
+
Statistics
|
|
12
|
+
|
|
13
|
+
External libraries imported (approximate)
|
|
14
|
+
|
|
15
|
+
carrot-cdm 61
|
|
16
|
+
carrot-transform 12
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: carrot-transform
|
|
3
|
+
Version: 0.3
|
|
4
|
+
Summary: Carrot somple transformer, input rules and data csvs, output OMOP
|
|
5
|
+
Author-email: PD Appleby <pdappleby@gmail.com>
|
|
6
|
+
Classifier: Programming Language :: Python :: 3
|
|
7
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
8
|
+
Classifier: Operating System :: OS Independent
|
|
9
|
+
Requires-Python: >=3.9
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
|
|
13
|
+
# carrot-transform
|
|
14
|
+
|
|
15
|
+
TODO:
|
|
16
|
+
* Document carrot-transform
|
|
17
|
+
* Add more comments in-code
|
|
18
|
+
* Handle capture of ddl and json config via the command-line as optional args
|
|
19
|
+
|
|
20
|
+
Reduction in complexity over the original CaRROT-CDM version for the Transform part of *ETL* - In practice *Extract* is always
|
|
21
|
+
performed by Data Partners, *Load* by database bulk-load software.
|
|
22
|
+
|
|
23
|
+
Statistics
|
|
24
|
+
|
|
25
|
+
External libraries imported (approximate)
|
|
26
|
+
|
|
27
|
+
carrot-cdm 61
|
|
28
|
+
carrot-transform 12
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
.gitignore
|
|
2
|
+
LICENSE
|
|
3
|
+
MANIFEST.in
|
|
4
|
+
README.md
|
|
5
|
+
carrot_transform.py
|
|
6
|
+
pyproject.toml
|
|
7
|
+
.github/workflows/pypi.publish.yml
|
|
8
|
+
carrot_transform.egg-info/PKG-INFO
|
|
9
|
+
carrot_transform.egg-info/SOURCES.txt
|
|
10
|
+
carrot_transform.egg-info/dependency_links.txt
|
|
11
|
+
carrot_transform.egg-info/entry_points.txt
|
|
12
|
+
carrot_transform.egg-info/top_level.txt
|
|
13
|
+
carrottransform/__init__.py
|
|
14
|
+
carrottransform/_version.py
|
|
15
|
+
carrottransform/cli/__init__.py
|
|
16
|
+
carrottransform/cli/command.py
|
|
17
|
+
carrottransform/cli/subcommands/__init__.py
|
|
18
|
+
carrottransform/cli/subcommands/run.py
|
|
19
|
+
carrottransform/config/OMOPCDM_postgresql_5.3_ddl.sql
|
|
20
|
+
carrottransform/config/omop.json
|
|
21
|
+
carrottransform/tools/__init__.py
|
|
22
|
+
carrottransform/tools/file_helpers.py
|
|
23
|
+
carrottransform/tools/mappingrules.py
|
|
24
|
+
carrottransform/tools/metrics.py
|
|
25
|
+
carrottransform/tools/omopcdm.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
carrottransform
|
|
File without changes
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Package entry point - sets up the "run" subcommand
|
|
2
|
+
from .subcommands.run import run
|
|
3
|
+
|
|
4
|
+
import carrottransform as c
|
|
5
|
+
import click
|
|
6
|
+
|
|
7
|
+
@click.group(invoke_without_command=True)
|
|
8
|
+
@click.option("--version","-v",is_flag=True)
|
|
9
|
+
@click.pass_context
|
|
10
|
+
def transform(ctx,version):
|
|
11
|
+
if ctx.invoked_subcommand == None :
|
|
12
|
+
if version:
|
|
13
|
+
click.echo(c.__version__)
|
|
14
|
+
else:
|
|
15
|
+
click.echo(ctx.get_help())
|
|
16
|
+
return
|
|
17
|
+
|
|
18
|
+
transform.add_command(run, "run")
|
|
19
|
+
|
|
20
|
+
if __name__ == "__main__":
|
|
21
|
+
transform()
|
|
File without changes
|