Refactoring to separate out RM-specific code from generic.#589
Open
wolandscat wants to merge 20 commits into
Open
Refactoring to separate out RM-specific code from generic.#589wolandscat wants to merge 20 commits into
wolandscat wants to merge 20 commits into
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #589 +/- ##
============================================
- Coverage 71.80% 70.32% -1.48%
- Complexity 6956 6995 +39
============================================
Files 663 686 +23
Lines 22691 23299 +608
Branches 3676 3703 +27
============================================
+ Hits 16294 16386 +92
- Misses 4664 5167 +503
- Partials 1733 1746 +13 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
added 18 commits
April 11, 2024 16:35
…ion lookup singleton.
Remove contents of referencemodels, but retain tests (forn now). Package moves to org.openehr to facilitate new RM addition to Archie. Some class renames for clarity. Revert change to OpenEhrRmInfoLookup.addTypes() OpenEhrRmMetaModelsInitialiser.getNativeRms() probably not safe for Android.
Use MetaModels during parsing of CPrimitiveObjects to get access to the correct ModelNamingStrategy. Currently conditional since ADLParser can be created with no MetaModels as well. In PrimitivesConstraintParser, if the ModelNamingStrategy object can be found, write in the correct RmTypeNames into CPrimitiveObjects (CTerminologyCode and so on). Rename ArchieModelNamingStrategy to OpenEhrModelNamingStrategy.
Move tests with static dependencies on openEHR RM classes from tools to openehr-rm. Move or copy other test resources to openehr-rm as needed. Create tools/src/testFixtures area for test helper classes shared across projects.
…ss CkmRepositoryBuilder in openehr-rm. Use this for any access to the CKM-mirror copy.
…ument so as to use the correct /resources area. TODO: there might be a better way to do this, but it seems the safest way to share /resources across projects given the Java model of class loading.
…now take a 'class' arg to ensure the corect /resources area is access (i.e. the caller's area, which could be in the same project or another).
…nd Assert. Not sure if this matters functionally - probably just an efficiency thing. TODO: check whether this change introduces any errors, or whether it can be reverted by some other simple change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This set of changes is renames and some class moves, to more systematically group openEHR RM specific classes, including xml/json/odin specific adaptations in the
openehr-rmmodule.The design intent is to be able to add other RMs to Archie in a more straightforward way.
Quite a few renames of classes that were openEHR RM specific to names like
OpenehrRmXXXXwhereXXXXwas the original name. This makes it easier to know at a glance whether something is specific to one RM or not.The dependency of
OpenEHRTypeNaming(renamed toArchieTypeNameResolver) on openEHR RM has been removed by giving it an extra constructor parameter.The class
JacksonUtilclass (renamed toOpenehrRmJacksonUtilsince it is RM-specific) has a small change to correspond with the above, i.e. injecting the OpenEhrRmInfoLookup.getInstance()singleton intoArchieTypeNameResolver`.Some
build.gradledependencies adjusted. No semantic changes.Changes all compile and tests run normally.
Further code improvements are possible so DON'T MERGE this yet!