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

Update to latest SSSOM(v0.4.x) #681

Closed
wants to merge 3 commits into from
Closed

Update to latest SSSOM(v0.4.x) #681

wants to merge 3 commits into from

Conversation

hrshdhgd
Copy link
Collaborator

@hrshdhgd hrshdhgd commented Nov 20, 2023

Refactors done:

  • from sssom.context import get_default_metadata => from sssom.constants import get_default_metadata
  • from sssom.typehints import Metadata => from sssom.constants import MetadataType
    • Older Metadata had the metadata attribute which is now collapsed
      • e.g. meta: Metadata
                mapping_set_id = meta.metadata[MAPPING_SET_ID]
                license = meta.metadata[LICENSE]
        
        is now meta: MetadataType
                mapping_set_id = meta[MAPPING_SET_ID]
                license = meta[LICENSE]
        
  • doc = MappingSetDocument(prefix_map=metadata[PREFIX_MAP_KEY], mapping_set=mset)
    •   converter = curies.chain([
           Converter.from_prefix_map(metadata.pop(CURIE_MAP_KEY, {})),
           ensure_converter(prefix_map, use_defaults=False)
       ])
        doc = MappingSetDocument(converter=converter, mapping_set=mset)
      
  • metadata = get_metadata_and_prefix_map(MATCHER_META_YML) => converter, metadata = get_metadata_and_prefix_map(MATCHER_META_YML)

@hrshdhgd hrshdhgd marked this pull request as draft November 20, 2023 18:44
@matentzn
Copy link
Contributor

Thanks! Looks sane, so far!

@codecov-commenter
Copy link

codecov-commenter commented Nov 20, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (c069273) 76.48% compared to head (4329934) 76.49%.

Files Patch % Lines
src/oaklib/utilities/mapping/sssom_utils.py 50.00% 2 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #681      +/-   ##
==========================================
+ Coverage   76.48%   76.49%   +0.01%     
==========================================
  Files         252      252              
  Lines       29385    29387       +2     
==========================================
+ Hits        22474    22480       +6     
+ Misses       6911     6907       -4     

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

@hrshdhgd hrshdhgd marked this pull request as ready for review November 20, 2023 20:31
@cthoyt
Copy link
Collaborator

cthoyt commented Nov 20, 2023

@hrshdhgd did you miss all the effort I put into doing this? #666

@hrshdhgd
Copy link
Collaborator Author

Apparently I did, sorry about that. Should have been mentioned in mapping-commons/sssom-py#441

@hrshdhgd hrshdhgd closed this Nov 20, 2023
@hrshdhgd
Copy link
Collaborator Author

Duplication of effort with #666 . Closing for that reason.

@cthoyt
Copy link
Collaborator

cthoyt commented Nov 20, 2023

Apparently I did, sorry about that. Should have been mentioned in mapping-commons/sssom-py#441

It was - see mapping-commons/sssom-py#441 (comment)

@cthoyt cthoyt deleted the sssom-0.4 branch December 6, 2023 13:47
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.

4 participants