Skip to content

Conversation

@TipzCM
Copy link
Contributor

@TipzCM TipzCM commented Jan 8, 2026

No description provided.

@github-actions
Copy link

github-actions bot commented Jan 8, 2026

Formatting check succeeded!

@codecov
Copy link

codecov bot commented Jan 8, 2026

Codecov Report

❌ Patch coverage is 89.47368% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.07%. Comparing base (24bec3f) to head (1bcee10).

Files with missing lines Patch % Lines
.../opencds/cqf/fhir/cql/npm/NpmBackedRepository.java 89.47% 5 Missing and 7 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #884      +/-   ##
============================================
+ Coverage     74.00%   74.07%   +0.06%     
  Complexity      364      364              
============================================
  Files           592      593       +1     
  Lines         28444    28558     +114     
  Branches       3669     3688      +19     
============================================
+ Hits          21049    21153     +104     
- Misses         5592     5596       +4     
- Partials       1803     1809       +6     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@TipzCM TipzCM enabled auto-merge (squash) January 9, 2026 21:58
try {
NpmPackage pkg = NpmPackage.fromFolder(Paths.get(folder, pkgName).toString(), false);
pkg.loadAllFiles();
npmProcessor.getPackageManager().getNpmList().add(pkg);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we sure this is the right way to use the package manager? It seems like the package manager ought to be the thing loading the package?

if (npmProcessor == null) {
// for some reason we require a 'base' sourceig...
// and this base *must be* R5
org.hl7.fhir.r5.model.ImplementationGuide guide = new org.hl7.fhir.r5.model.ImplementationGuide();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason an NpmProcessor needs an IG is to establish the set of dependencies in use, which determines the scope of contents available to that processor. If we know that scope to start with, it should be part of the initialization. In other words, it sets the project scope, and we need to understand what we want the relationship to project scope to be for this implementation. Is the NpmBackedRepository supposed to be used from the perspective of a particular IG, or is it supposed to enable Npm access across all IGs loaded in a repository?


@Override
@SuppressWarnings("unchecked")
public <T extends IBaseResource> List<T> resolveByUrl(@Nonnull Class<T> clazz, String url) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There doesn't seem to be version management here, what are the expectations for versioned and versionless references?


if (hasUrl) {
return resources.stream()
.filter(r -> r.hasCanonicalUrl() && r.getCanonicalUrl().equals(url))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider a hash map here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

continue;
}

List<T> pkgResources = getResourcesFromPkg(pkg, clazz);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be a lazy load on a cache miss. Packages may have literally 1000s of resources of any given type, and loading them all when we only need one is one of the most common scenarios here.

Copy link
Contributor

@barhodes barhodes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the intended use of this class? Is it intended to be a Repository? If so, why is it not using the IRepository interface? If not, perhaps we should consider renaming this to avoid confusion.

@TipzCM TipzCM disabled auto-merge January 20, 2026 15:03
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.

5 participants