Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Templates and Keep modules #1403

Merged
merged 2 commits into from
Dec 19, 2023
Merged

Templates and Keep modules #1403

merged 2 commits into from
Dec 19, 2023

Conversation

dehall
Copy link
Contributor

@dehall dehall commented Dec 12, 2023

This PR supports two "new" categories of modules:

Templates

Templates are snippets of modules intended to help authors create a new module quickly. A corresponding change to the module builder (synthetichealth/module-builder#329) adds the ability to load these templates. After submitting this PR I will put together some documentation on how to use these to create a new module.

Keep Modules

Keep modules have been supported for a while; this PR adds a set of built-in keep modules and updates the -k flag to support either arbitrary paths or these built-in ones. We had two already must_have_cabg.json and must_have_cardiac_surgery.json which I moved from the repo root to this new directory so any existing scripts that reference them can still work without changes. This should work both running via gradle/run_synthea or as a JAR file.

Tech Notes:

  • I migrated Module.fixPathFromJar into the Utilities class since I was using it in App as well now
  • Changed Generator.keepPatientsModulePath from File to Path since you can't reference files in a zip/jar as a File

Copy link

codecov bot commented Dec 12, 2023

Codecov Report

Attention: 15 lines in your changes are missing coverage. Please review.

Comparison is base (85673df) 76% compared to head (649eb82) 77%.

Files Patch % Lines
...main/java/org/mitre/synthea/helpers/Utilities.java 11% 7 Missing and 1 partial ⚠️
src/main/java/App.java 0% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master   #1403    +/-   ##
=========================================
  Coverage        76%     77%            
- Complexity     3850    3873    +23     
=========================================
  Files           178     178            
  Lines         24997   25002     +5     
  Branches       3535    3536     +1     
=========================================
+ Hits          19136   19274   +138     
+ Misses         4735    4615   -120     
+ Partials       1126    1113    -13     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@eedrummer eedrummer merged commit 96f4e79 into master Dec 19, 2023
5 of 6 checks passed
@eedrummer eedrummer deleted the templates branch December 19, 2023 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants