Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 0 additions & 29 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
############################
# Common settings that generally should always be used with your language specific settings
############################

# Auto detect text files and perform LF normalization
* text=auto

#
# The above will handle all files NOT found below
#

# Documents
*.bibtex text diff=bibtex
*.doc diff=astextplain
Expand All @@ -33,7 +29,6 @@
*.txt text
*.sql text
*.epub diff=astextplain

# Graphics
*.png binary
*.jpg binary
Expand All @@ -48,7 +43,6 @@
# use the following line instead.
# *.svg binary
*.eps binary

# Scripts
*.bash text eol=lf
*.fish text eol=lf
Expand All @@ -58,35 +52,25 @@
*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=crlf

# Serialisation
*.json text
*.toml text
*.xml text
*.yaml text
*.yml text

# Archives
*.7z binary
*.gz binary
*.tar binary
*.tgz binary
*.zip binary

# Text files where line endings should be preserved
*.patch -text

#
# Exclude files from exporting
#
.gitattributes export-ignore
.gitignore export-ignore
.gitkeep export-ignore

############################
# Web
############################

# These files are text and should be normalized (Convert crlf => lf)
*.css text diff=css
*.scss text diff=css
Expand All @@ -103,22 +87,16 @@
*.tag text
*.tagx text
*.xml text


# Common build-tool wrapper scripts ('.cmd' versions are handled by 'Common.gitattributes')
mvnw text eol=lf
gradlew text eol=lf

############################
# Java sources
############################
*.java text diff=java
*.kt text diff=kotlin
*.groovy text diff=java
*.scala text diff=java
*.gradle text diff=java
*.gradle.kts text diff=kotlin

# These files are binary and should be left untouched (and ideally not checked in)
# (binary is a macro for -text -diff)
*.class binary
Expand All @@ -128,10 +106,3 @@ gradlew text eol=lf
*.so binary
*.war binary
*.jks binary


############################
# Custom Binaries
############################
**/*.zip filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
54 changes: 54 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Build Workflow

run-name: 'Build Workflow -- ${{ github.head_ref || github.ref_name }}'

# Pipeline/Workflow Triggers
on:
push:
pull_request:
workflow_dispatch:


jobs:
pr-verification:
name: Pull Request Validation
runs-on: ubuntu-24.04
if: github.event_name == 'pull_request'
steps:
- name: Pull Request Version Validation
uses: ikmdev/maven-pull-request-version-validation-action@v2.1.0

build-job:
name: Build Job
runs-on: ubuntu-24.04
steps:
- name: Maven Settings File
uses: whelk-io/maven-settings-xml-action@v22
with:
servers: '[{"id": "tinkar-nexus", "username": "${{secrets.NEXUS_USER}}", "password": "${{secrets.NEXUS_PASSWORD}}"}]'
mirrors: '[{"id": "tinkar-nexus", "mirrorOf": "*", "url": "${{secrets.NEXUS_URL}}/repository/maven-public/"}]'
repositories: '
[
{
"id": "tinkar-nexus",
"name": "tinkar-nexus",
"url": "${{secrets.NEXUS_URL}}/repository/maven-public/",
"releases": {
"enabled": "true",
"updatePolicy": "always",
"checksumPolicy": "fail"
},
"snapshots": {
"enabled": "true",
"updatePolicy": "always",
"checksumPolicy": "fail"
}
}
]'
output_file: ../.m2/tinkar-settings.xml

- name: Build Data Pipeline
uses: ikmdev/maven-clean-install-build-action@v3.5.0
with:
branch_name: ${{github.ref_name}}
mvn_additional_args: " -s '/home/runner/work/${{github.event.repository.name}}/.m2/tinkar-settings.xml'"
58 changes: 58 additions & 0 deletions .github/workflows/post_build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Post Build Action

run-name: 'Post Build Action -- ${{github.event.workflow_run.head_branch}}'

on:
workflow_run:
workflows:
- Build Workflow
types:
- completed

permissions:
contents: write

jobs:
post-build:
name: Post Build Actions
runs-on: ubuntu-24.04
if: github.event.workflow_run.conclusion == 'success' && github.repository_owner == 'ikmdev'
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
repository: ${{github.event.workflow_run.head_repository.full_name}}
ref: ${{github.event.workflow_run.head_branch}}
fetch-depth: 0

- name: Maven Settings File
uses: whelk-io/maven-settings-xml-action@v22
with:
servers: '
[
{"id": "tinkar-nexus-private", "username": "admin", "password": "${{secrets.EC2_NEXUS_PASSWORD}}"},
{"id": "maven-snapshots", "username": "admin", "password": "${{secrets.EC2_NEXUS_PASSWORD}}"}
]'
mirrors: '[{"id": "tinkar-nexus-private", "mirrorOf": "*", "url": "https://nexus.tinkarbuild.com/repository/maven-private/"}]'
output_file: ../.m2/tinkar-settings.xml

- name: Build Plugins
uses: ikmdev/maven-clean-install-build-action@v3.5.0
with:
branch_name: ${{github.ref_name}}
mvn_additional_args: " -f plugin"

- name: Deploy To Nexus
shell: bash
run: |
./mvnw clean deploy \
--batch-mode \
-U \
-e \
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
-DskipTests \
-DskipITs \
-s '/home/runner/work/${{github.event.repository.name}}/.m2/tinkar-settings.xml'\
-DaltDeploymentRepository='maven-snapshots::https://nexus.tinkarbuild.com/repository/maven-snapshots/' \
-Dmaven.build.cache.enabled=false \
-PgenerateData
1 change: 0 additions & 1 deletion .mvn/jvm.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
--enable-preview
--enable-native-access=ALL-UNNAMED
--add-modules jdk.incubator.vector
-Xmx12g
Expand Down
5 changes: 3 additions & 2 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
wrapperVersion=3.3.2
distributionType=only-script
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.11/apache-maven-3.9.11-bin.zip
72 changes: 47 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,64 @@
# rxnorm-data
# RxNorm Pipeline

### Team Ownership - Product Owner
Data Team
**Prerequisites**

## Getting Started

Follow these instructions to generate a rxnorm dataset:
* JDK 24+
* Maven 3.9.9+
* Nexus Repository (optional)
* SnomedCt Pipeline Artifact (see [snomed-ct-data repository](https://github.com/ikmdev/snomed-ct-data))

**Clone Project and Configure Maven Settings**

1. Clone the [rxnorm-data repository](https://github.com/ikmdev/rxnorm-data)

```bash
git clone [Rep URL]
```
```
git clone https://github.com/ikmdev/rxnorm-data.git
```

2. Configure Maven settings.xml based on the [provided sample](https://ikmdev.atlassian.net/wiki/spaces/IKDT/pages/1036648449/Centralized+Documentation+for+Maven+Settings+File+Configuration).

3. Change local directory to `rxnorm-data`

**Run Origin Packaging**

The following source data is required for this pipeline:

2. Change local directory to `rxnorm-data`
* Pilot-Defined-RxNorm-with-SNCT-classes-2024-04-10-with-custom-annotations.owl

3. Download RxNorm File from National Library of Medicine (RxNorm-in-OWL/RxNorm Files): https://www.nlm.nih.gov/research/umls/rxnorm/index.html
More information can be found on National Library of Medicine (RxNorm-in-OWL/RxNorm Files): https://www.nlm.nih.gov/research/umls/rxnorm/index.html

4. Place the downloaded Pilot-Defined-RxNorm_*_.owl in your local Downloads directory.
1. Place the downloaded file in your ~/Downloads directory.

5. Ensure the rxnorm-data/pom.xml contains the proper tags containing source filename for the downloaded files such as:
<source.zip>, <source.version>, <snomed.source.zip>, <starterSet>, etc.
2. Ensure the properties defined in rxnorm-data/pom.xml are set to the correct file names:
- <rxnormOwl>
- <source.zip>

6. Create a ~/Solor directory and ensure ~/Solor/generated-data does not exist or is empty.
3. Run origin packaging and deployment.

7. You can create a reasoned or unreasoned dataset by either including or commenting out the rxnorm-data/pom.xml <module>rxnorm-reasoner</module>
To deploy origin artifact to a shared Nexus repository, run the following command, specifying the repository ID and URL in `-DaltDeploymentRepository`
```
mvn clean deploy --projects rxnorm-origin --also-make -Ptinkarbuild -DaltDeploymentRepository=tinkar-snapshot::https://nexus.tinkar.org/repository/maven-snapshots/ -Dmaven.build.cache.enabled=false
```

8. Enter the following command to build the dataset:
To install origin artifact to a local M2 repository, run the following command:
```
mvn clean install --projects rxnorm-origin --also-make -Ptinkarbuild,generateDataLocal -Dmaven.build.cache.enabled=false
```

```bash
mvn clean install -U "-DMaven.build.cache.enable=false"
```
**Run Transformation Pipeline**

9. Enter the following command to deploy the dataset:
The transformation pipeline can be built after origin data is available in Nexus or a local M2 repository.

```bash
mvn deploy -f rxnorm-export "-DdeployToNexus=true" "-Dmaven.deploy.skip=true" "-Dmaven.build.cache.enabled=false"
```
1. Ensure the rxnorm-data/pom.xml contains the proper tags containing source filename for the downloaded files such as:
<source.zip>, <source.version>, <snomedct.version>, <starterSet>, etc.

- NOTE. This repo is built on top of an unreasoned spined array DB from snomed-ct-data. Therefore, make sure you have it built before running step #8.
2. Build the pipeline with the following command:
```
mvn clean install -U -Ptinkarbuild -Dmaven.build.cache.enabled=false
```

3. Deploy transformed data artifacts to Nexus, run the following command:
```
mvn deploy --projects rxnorm-export --also-make -Ptinkarbuild -DaltDeploymentRepository=tinkar-snapshot::https://nexus.tinkar.org/repository/maven-snapshots/ -Dmaven.build.cache.enabled=false
```

1 change: 0 additions & 1 deletion plugin/rxnorm-transformation-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>${maven-plugin-plugin.version}</version>
<executions>
<execution>
<id>mojo-descriptor</id>
Expand Down
Loading
Loading