carrot-transform 0.3.3__tar.gz → 0.3.5__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.5/PKG-INFO +106 -0
- carrot_transform-0.3.5/README.md +88 -0
- carrot_transform-0.3.5/carrottransform/_version.py +6 -0
- carrot_transform-0.3.5/carrottransform/cli/subcommands/run.py +748 -0
- carrot_transform-0.3.5/carrottransform/examples/test/inputs/Covid19_test.csv +801 -0
- carrot_transform-0.3.5/carrottransform/examples/test/inputs/Demographics.csv +1001 -0
- carrot_transform-0.3.5/carrottransform/examples/test/inputs/Symptoms.csv +801 -0
- carrot_transform-0.3.5/carrottransform/examples/test/inputs/covid19_antibody.csv +1001 -0
- carrot_transform-0.3.5/carrottransform/examples/test/inputs/vaccine.csv +501 -0
- carrot_transform-0.3.5/carrottransform/examples/test/rules/rules_14June2021.json +300 -0
- carrot_transform-0.3.5/carrottransform/tools/click.py +21 -0
- carrot_transform-0.3.5/carrottransform/tools/file_helpers.py +41 -0
- {carrot_transform-0.3.3 → carrot_transform-0.3.5}/carrottransform/tools/mappingrules.py +13 -10
- carrot_transform-0.3.5/carrottransform/tools/metrics.py +301 -0
- {carrot_transform-0.3.3 → carrot_transform-0.3.5}/carrottransform/tools/omopcdm.py +17 -5
- carrot_transform-0.3.5/pyproject.toml +35 -0
- carrot_transform-0.3.3/PKG-INFO +0 -48
- carrot_transform-0.3.3/README.md +0 -30
- carrot_transform-0.3.3/carrottransform/_version.py +0 -2
- carrot_transform-0.3.3/carrottransform/cli/subcommands/run.py +0 -496
- carrot_transform-0.3.3/carrottransform/tools/file_helpers.py +0 -15
- carrot_transform-0.3.3/carrottransform/tools/metrics.py +0 -129
- carrot_transform-0.3.3/pyproject.toml +0 -20
- {carrot_transform-0.3.3 → carrot_transform-0.3.5}/LICENSE +0 -0
- {carrot_transform-0.3.3 → carrot_transform-0.3.5}/carrottransform/__init__.py +0 -0
- {carrot_transform-0.3.3 → carrot_transform-0.3.5}/carrottransform/cli/__init__.py +0 -0
- {carrot_transform-0.3.3 → carrot_transform-0.3.5}/carrottransform/cli/command.py +0 -0
- {carrot_transform-0.3.3 → carrot_transform-0.3.5}/carrottransform/cli/subcommands/__init__.py +0 -0
- {carrot_transform-0.3.3 → carrot_transform-0.3.5}/carrottransform/config/OMOPCDM_postgresql_5.3_ddl.sql +0 -0
- {carrot_transform-0.3.3 → carrot_transform-0.3.5}/carrottransform/config/omop.json +0 -0
- {carrot_transform-0.3.3 → carrot_transform-0.3.5}/carrottransform/tools/__init__.py +0 -0
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: carrot_transform
|
|
3
|
+
Version: 0.3.5
|
|
4
|
+
Summary:
|
|
5
|
+
Author: anwarfg
|
|
6
|
+
Author-email: 913028+anwarfg@users.noreply.github.com
|
|
7
|
+
Requires-Python: >=3.10,<4.0
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
13
|
+
Requires-Dist: click (>=8.1.7,<9.0.0)
|
|
14
|
+
Requires-Dist: jinja2 (>=3.1.4,<4.0.0)
|
|
15
|
+
Requires-Dist: numpy (<2)
|
|
16
|
+
Requires-Dist: pandas (>=2.2.3,<3.0.0)
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
|
|
19
|
+
<p align="center">
|
|
20
|
+
<a href="https://carrot.ac.uk/" target="_blank">
|
|
21
|
+
<picture>
|
|
22
|
+
<source media="(prefers-color-scheme: dark)" srcset="/images/logo-dark.png">
|
|
23
|
+
<img alt="Carrot Logo" src="/images/logo-primary.png" width="280"/>
|
|
24
|
+
</picture>
|
|
25
|
+
</a>
|
|
26
|
+
</p>
|
|
27
|
+
|
|
28
|
+
<p align="center">
|
|
29
|
+
|
|
30
|
+
<a href="https://github.com/Health-Informatics-UoN/carrot-transform/releases">
|
|
31
|
+
<img src="https://img.shields.io/github/v/release/Health-Informatics-UoN/carrot-transform" alt="Release">
|
|
32
|
+
</a>
|
|
33
|
+
<a href="https://opensource.org/license/mit">
|
|
34
|
+
<img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License">
|
|
35
|
+
</a>
|
|
36
|
+
</p>
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
<div align="center">
|
|
40
|
+
<strong>
|
|
41
|
+
<h2>Streamlined Data Transformation to OMOP</h2><br />
|
|
42
|
+
<a href="https://carrot.ac.uk/">Carrot Transform</a> automates data transformation processes and facilitates the standardisation of datasets to the OMOP vocabulary, simplifying the integration of diverse data sources.
|
|
43
|
+
<br />
|
|
44
|
+
</strong>
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
<p align="center">
|
|
48
|
+
<br />
|
|
49
|
+
<a href="https://carrot.ac.uk/transform" rel="dofollow"><strong>Explore the docs »</strong></a>
|
|
50
|
+
<br />
|
|
51
|
+
<br />
|
|
52
|
+
|
|
53
|
+
<a href="https://carrot.ac.uk/">Carrot Mapper</a> is a webapp which allows the user to use the metadata (as output by [WhiteRabbit](https://github.com/OHDSI/WhiteRabbit)) from a dataset to produce mapping rules to the OMOP standard, in the JSON format. These can be ingested by [Carrot Transform](https://carrot.ac.uk/transform/quickstart) to perform the mapping of the contents of the dataset to OMOP.
|
|
54
|
+
|
|
55
|
+
Carrot Transform transforms input data into tab separated variable files of standard OMOP tables, with concepts mapped according to the provided rules (generated from Carrot Mapper).
|
|
56
|
+
|
|
57
|
+
## Quick Start for Developers
|
|
58
|
+
|
|
59
|
+
To have the project up and running, please follow the [Quick Start Guide](https://carrot.ac.uk/transform/quickstart).
|
|
60
|
+
|
|
61
|
+
## Release Procedure
|
|
62
|
+
To release a new version of `carrot-transform` follow these steps:
|
|
63
|
+
|
|
64
|
+
### 1. Prepare the repository
|
|
65
|
+
- First ensure that repository is clean and all required changes have been merged.
|
|
66
|
+
- Pull the latest changes from `main` with `git pull origin main`.
|
|
67
|
+
|
|
68
|
+
### 2. Create a release branch
|
|
69
|
+
|
|
70
|
+
- Now create a new feature branch name `release/v<NEW-VERSION>` (e.g. `release/v0.2.0`).
|
|
71
|
+
|
|
72
|
+
### 3. Update the version number
|
|
73
|
+
- Use poetry to bump the version. For example, for a minor version update invoke:
|
|
74
|
+
```bash
|
|
75
|
+
poetry version minor
|
|
76
|
+
```
|
|
77
|
+
- Commit and push the changes (to the release feature branch):
|
|
78
|
+
```bash
|
|
79
|
+
NEW_VERSION=$(poetry version -s)
|
|
80
|
+
git add pyproject.toml
|
|
81
|
+
git commit -m "Bump version to $NEW_VERSION"
|
|
82
|
+
git push --set-upstream origin release/v$NEW_VERSION
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### 4. Create pull request
|
|
86
|
+
- Open a pull request from `release/v$NEW_VERSION` to `main` and await approval.
|
|
87
|
+
### 5. Merge and tag
|
|
88
|
+
- After approval merge the the feature branch to `main`.
|
|
89
|
+
- Checkout to `main`, pull updates, and create a tag corresponding to the new version number.
|
|
90
|
+
```bash
|
|
91
|
+
git checkout main
|
|
92
|
+
git pull origin main
|
|
93
|
+
git tag -a "$NEW_VERSION" -m "Release $NEW_VERSION"
|
|
94
|
+
git push origin "$NEW_VERSION"
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### 6. Create a release
|
|
98
|
+
- We must now link the tag to a release in the GitHub repository. To do this from the command line first install GitHub command line tools `gh` and then invoke:
|
|
99
|
+
```bash
|
|
100
|
+
gh release create "$TAG" --title "$TAG" --notes "Release for $VERSION"
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
- Alternatively, follow the instructions in the [GitHub documentation](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository) to manually create a release.
|
|
104
|
+
## License
|
|
105
|
+
|
|
106
|
+
This repository's source code is available under the [MIT license](LICENSE).
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://carrot.ac.uk/" target="_blank">
|
|
3
|
+
<picture>
|
|
4
|
+
<source media="(prefers-color-scheme: dark)" srcset="/images/logo-dark.png">
|
|
5
|
+
<img alt="Carrot Logo" src="/images/logo-primary.png" width="280"/>
|
|
6
|
+
</picture>
|
|
7
|
+
</a>
|
|
8
|
+
</p>
|
|
9
|
+
|
|
10
|
+
<p align="center">
|
|
11
|
+
|
|
12
|
+
<a href="https://github.com/Health-Informatics-UoN/carrot-transform/releases">
|
|
13
|
+
<img src="https://img.shields.io/github/v/release/Health-Informatics-UoN/carrot-transform" alt="Release">
|
|
14
|
+
</a>
|
|
15
|
+
<a href="https://opensource.org/license/mit">
|
|
16
|
+
<img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License">
|
|
17
|
+
</a>
|
|
18
|
+
</p>
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
<div align="center">
|
|
22
|
+
<strong>
|
|
23
|
+
<h2>Streamlined Data Transformation to OMOP</h2><br />
|
|
24
|
+
<a href="https://carrot.ac.uk/">Carrot Transform</a> automates data transformation processes and facilitates the standardisation of datasets to the OMOP vocabulary, simplifying the integration of diverse data sources.
|
|
25
|
+
<br />
|
|
26
|
+
</strong>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<p align="center">
|
|
30
|
+
<br />
|
|
31
|
+
<a href="https://carrot.ac.uk/transform" rel="dofollow"><strong>Explore the docs »</strong></a>
|
|
32
|
+
<br />
|
|
33
|
+
<br />
|
|
34
|
+
|
|
35
|
+
<a href="https://carrot.ac.uk/">Carrot Mapper</a> is a webapp which allows the user to use the metadata (as output by [WhiteRabbit](https://github.com/OHDSI/WhiteRabbit)) from a dataset to produce mapping rules to the OMOP standard, in the JSON format. These can be ingested by [Carrot Transform](https://carrot.ac.uk/transform/quickstart) to perform the mapping of the contents of the dataset to OMOP.
|
|
36
|
+
|
|
37
|
+
Carrot Transform transforms input data into tab separated variable files of standard OMOP tables, with concepts mapped according to the provided rules (generated from Carrot Mapper).
|
|
38
|
+
|
|
39
|
+
## Quick Start for Developers
|
|
40
|
+
|
|
41
|
+
To have the project up and running, please follow the [Quick Start Guide](https://carrot.ac.uk/transform/quickstart).
|
|
42
|
+
|
|
43
|
+
## Release Procedure
|
|
44
|
+
To release a new version of `carrot-transform` follow these steps:
|
|
45
|
+
|
|
46
|
+
### 1. Prepare the repository
|
|
47
|
+
- First ensure that repository is clean and all required changes have been merged.
|
|
48
|
+
- Pull the latest changes from `main` with `git pull origin main`.
|
|
49
|
+
|
|
50
|
+
### 2. Create a release branch
|
|
51
|
+
|
|
52
|
+
- Now create a new feature branch name `release/v<NEW-VERSION>` (e.g. `release/v0.2.0`).
|
|
53
|
+
|
|
54
|
+
### 3. Update the version number
|
|
55
|
+
- Use poetry to bump the version. For example, for a minor version update invoke:
|
|
56
|
+
```bash
|
|
57
|
+
poetry version minor
|
|
58
|
+
```
|
|
59
|
+
- Commit and push the changes (to the release feature branch):
|
|
60
|
+
```bash
|
|
61
|
+
NEW_VERSION=$(poetry version -s)
|
|
62
|
+
git add pyproject.toml
|
|
63
|
+
git commit -m "Bump version to $NEW_VERSION"
|
|
64
|
+
git push --set-upstream origin release/v$NEW_VERSION
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### 4. Create pull request
|
|
68
|
+
- Open a pull request from `release/v$NEW_VERSION` to `main` and await approval.
|
|
69
|
+
### 5. Merge and tag
|
|
70
|
+
- After approval merge the the feature branch to `main`.
|
|
71
|
+
- Checkout to `main`, pull updates, and create a tag corresponding to the new version number.
|
|
72
|
+
```bash
|
|
73
|
+
git checkout main
|
|
74
|
+
git pull origin main
|
|
75
|
+
git tag -a "$NEW_VERSION" -m "Release $NEW_VERSION"
|
|
76
|
+
git push origin "$NEW_VERSION"
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### 6. Create a release
|
|
80
|
+
- We must now link the tag to a release in the GitHub repository. To do this from the command line first install GitHub command line tools `gh` and then invoke:
|
|
81
|
+
```bash
|
|
82
|
+
gh release create "$TAG" --title "$TAG" --notes "Release for $VERSION"
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
- Alternatively, follow the instructions in the [GitHub documentation](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository) to manually create a release.
|
|
86
|
+
## License
|
|
87
|
+
|
|
88
|
+
This repository's source code is available under the [MIT license](LICENSE).
|