mapping-commons / sssom-py

Python toolkit for SSSOM mapping format
https://mapping-commons.github.io/sssom-py/index.html#
MIT License
49 stars 12 forks source link

Consolidate mapping metadata setting #455

Closed cthoyt closed 11 months ago

cthoyt commented 11 months ago

This PR consolidates metadata handling functionality. Mainly it does two things:

  1. Use a chainmap to ensure default metadata in _init_mapping_set()
  2. Calls to _set_metadata_in_mapping_set to be directly inside _init_mapping_set()

Unfortunately, _set_metadata_in_mapping_set can't be completely deleted since it's used in one other place, but this is still a good reduction of complexity.