-
Notifications
You must be signed in to change notification settings - Fork 4
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
ICAT to PaNOSC Data Model Conversion #300
ICAT to PaNOSC Data Model Conversion #300
Conversation
- I've moved the code which deals with the parameter value field name list away from this function to make the function more generic/reusable. That code has been moved to applying the WHERE filter, where it'll be used. The mapping will not be reached by an include filter (under a valid API request) because the parameter values are for a field name/attribute, not a related entity
…ter objects for multiple and nested related entities #261
…at-to-panosc-data-model-conversion-#265
…ta-model-conversion-#265
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The overall implementation of this looks to work, although the test failures I came across on my machine suggest there's an issue with the parameter mapping. I've left some comments/suggestions as I've been looking through the code
Little bit unsure why the CI hasn't run on this PR 🤔 it's not a problem until we get a new release of Python ICAT because it'll just fail right now, but note to future us to maybe run it manually. |
Co-authored-by: Matthew Richards <32678030+MRichards99@users.noreply.github.com>
…ithub.com:ral-facilities/datagateway-api into feature/icat-to-panosc-data-model-conversion-#265
I am not sure what happened there, but it is running now 😄 |
298a5b6
to
3f1b2d6
Compare
Codecov Report
@@ Coverage Diff @@
## master #300 +/- ##
==========================================
+ Coverage 90.64% 91.22% +0.58%
==========================================
Files 43 43
Lines 2982 3066 +84
Branches 273 290 +17
==========================================
+ Hits 2703 2797 +94
+ Misses 244 230 -14
- Partials 35 39 +4
Continue to review full report at Codecov.
|
This PR will close #265
Description
This PR implements the conversion from ICAT to PaNOSC data models. It uses the PaNOSC - ICAT mappings define in the
filter-input-conversion
branch which is why that is the base branch. All the commits before b0983bb, with exception of 85c4bfc, are as a result of me merging the changes from the base as well as thefeature/icat-to-panosc-data-model-conversion-#265
branch.The PaNOSC fields that map to
id
fields in ICAT were set to be of typeStrictStr
but because they are integers in ICAT, the creation of the PaNOSC models was failing because they were only accepting strings. To deal with this issue, the type of such PaNOSC fields were changed tostr
instead as this casts integers to strings but still throws aValidationError
ifNone
is passed to it. To keep things consistent and less confusing, the types of all the other fields were made non-strict.A version bump will be made once this is merged.
Testing Instructions
icatdb Generator Script Consistency Test
CI job fails, is this because of a deliberate change made to the script to change generated data (which isn't actually a problem) or is here an underlying issue with the changes made?fix:
,feat:
orBREAKING CHANGE:
so a release is automatically made via GitHub Actions upon merge?Agile Board Tracking
Connect to #265