The-Academic-Observatory / academic-observatory-workflows

Telescopes, Workflows and Data Services for the Academic Observatory
https://academic-observatory-workflows.readthedocs.io
Apache License 2.0
16 stars 0 forks source link

Fix/OpenAlex: Account for new top level field when merging generated schemas #209

Closed alexmassen-hane closed 5 months ago

alexmassen-hane commented 6 months ago

The merge schema function in the OpenAlex telescope only accounted for sub/nested fields in incoming the data structure. This fix accounts for new top level fields that are not present in the "old" schema and simply adds them to the merged schema object. I have also added this specific case to the unit test files.

Please review and edit as needed.

codecov[bot] commented 6 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (8c94d2e) 93.27% compared to head (e344e47) 93.28%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #209 +/- ## ======================================= Coverage 93.27% 93.28% ======================================= Files 23 23 Lines 5714 5716 +2 Branches 805 806 +1 ======================================= + Hits 5330 5332 +2 Misses 225 225 Partials 159 159 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.