Giter Site home page Giter Site logo

Comments (11)

grahamegrieve avatar grahamegrieve commented on August 25, 2024

@jamesagnew would we consider a change of that magnitude?

@Boereck we need a worked test case

from org.hl7.fhir.core.

Boereck avatar Boereck commented on August 25, 2024

I realized that there are way, way more places in the code where canonicals are split into URL and version. This would be a herculean task, if test cases shall be provided for each of those changes.

I could start with a PR replacing just the faulty methods with the use of CanonicalPair with test cases for these changes. I need some time, however, to find out how to test these changes in the best way. When looking into the other places where CanonicalPair could be used, I realized that a few more helper methods (around the availability of version) on that class would be nice. I could include them (with test cases) in that PR as well.

Further changes to replace splitting in other places could be done bit by bit (maybe module by module). I think this would make the PRs also easier to review.

from org.hl7.fhir.core.

grahamegrieve avatar grahamegrieve commented on August 25, 2024

I'm not sure how extensive the changes we'd consider. Just let's start with a worked test case for the supplement issue. In the test-cases repository, a validation test case

from org.hl7.fhir.core.

Boereck avatar Boereck commented on August 25, 2024

Alright. Do you mean a new test case in org.hl7.fhir.validation.ResourceValidationTests with a new resource in org.hl7.fhir.r4/src/test/resources? Or is there another testing harness that I did not find? Sorry, I am new to this repository and all of it's bells an whistles.

from org.hl7.fhir.core.

Boereck avatar Boereck commented on August 25, 2024

Ah, I think I get it: The tests are loaded from the fhir-test-cases dependency, and the according repository is https://github.com/FHIR/fhir-test-cases/. Should I add the example to the r5 folder only, or also for r4?

from org.hl7.fhir.core.

grahamegrieve avatar grahamegrieve commented on August 25, 2024

Just R5

from org.hl7.fhir.core.

Boereck avatar Boereck commented on August 25, 2024

I created PR #1614, just with the changes to make the validation work for CodeSystem.supplement canonical with a version.

from org.hl7.fhir.core.

Boereck avatar Boereck commented on August 25, 2024

Hello, I realized that the commit message of 5a9ef0b said that the supplement version test case was moved to a normal test case. However, I only see that the test case was removed from ResourceValidationTests. I don't see the test case where added to a different file. @grahamegrieve , did you forget to commit the file it was added to? Or was the test moved to a completely different place?

from org.hl7.fhir.core.

grahamegrieve avatar grahamegrieve commented on August 25, 2024

It was moved to the test-cases repo, which is where those type of tests belong

from org.hl7.fhir.core.

Boereck avatar Boereck commented on August 25, 2024

I see, it is then picked up by org.hl7.fhir.validation.tests.ValidationTests in this repository. Thanks for this insight!

from org.hl7.fhir.core.

Boereck avatar Boereck commented on August 25, 2024

All actual errors in the code we've found are taken care of in #1614 and #1663 . There is still a lot of duplication of code where the splitting logic of canonicals into url and version is implemented again and again. As stated in the comments of this issue, changing this would be a big change, and big changes are risky. Maybe this can be tackled piece by piece when code in a file has to be changed anyway, following the "boy scout rule": Leave the code cleaner than you found it.

Since the bugs related to url splitting are now all fixed, I close this issue.

If there is still interest in dedicated PRs replacing duplicate canonical splitting code by the usage of CanonicalPair, let me know. I could also split the canges into smaller PRs, if desired.

from org.hl7.fhir.core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.