Skip to content
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

Fix/OpenAlex: abstract_inverted_index field now a JSON structure #183

Merged
merged 3 commits into from
Sep 15, 2023

Conversation

alexmassen-hane
Copy link
Collaborator

A proposed fix for the new structure of the abstract_inverted_index field as it is now a proper JSON object. Also added to the unit tests to make sure it transforms to the desired format.

@codecov
Copy link

codecov bot commented Sep 8, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.01% ⚠️

Comparison is base (9991d03) 95.21% compared to head (04ba403) 95.21%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #183      +/-   ##
===========================================
- Coverage    95.21%   95.21%   -0.01%     
===========================================
  Files           20       20              
  Lines         5209     5206       -3     
  Branches       720      719       -1     
===========================================
- Hits          4960     4957       -3     
  Misses         161      161              
  Partials        88       88              
Files Changed Coverage Δ
...ervatory_workflows/workflows/openalex_telescope.py 92.10% <100.00%> (-0.06%) ⬇️

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

Copy link
Contributor

@jdddog jdddog left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this Alex.

Since we will need to re-run the workflow from scratch to fix this (since we have already loaded the inverted index into our db as a string), we might as well:

  • Load the whole data structure into the Works table, e.g. {IndexLength": 7, "InvertedIndex": {}}.
  • In the Works table, add the type_crossref field.
  • In the Location objects add the is_in_doaj next to the field is_oa.

@jdddog jdddog force-pushed the fix/openalex-abstract-inverted-index-in-json branch from d2c55ef to 04ba403 Compare September 15, 2023 01:45
@jdddog jdddog self-requested a review September 15, 2023 01:45
Copy link
Contributor

@jdddog jdddog left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this Alex!

@jdddog jdddog enabled auto-merge September 15, 2023 01:46
@jdddog jdddog added this pull request to the merge queue Sep 15, 2023
Merged via the queue into develop with commit 6970db5 Sep 15, 2023
@jdddog jdddog deleted the fix/openalex-abstract-inverted-index-in-json branch October 20, 2023 03:52
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.

2 participants