Skip to content

Conversation

gouttegd
Copy link
Contributor

@gouttegd gouttegd commented Sep 1, 2025

This PR adds a new method to the MappingSetDataFrame class to automatically determine the minimum version of the SSSOM specification the set is compatible with – that is, the earliest version that defines all the slots and all the enum values present in the set.

This method could later be used to implement the behaviour recommended by the spec: automatically inserting the sssom_version slot when a set is written, if the set requires another version than 1.0. This could simply look like:

# Assuming msdf is the mapping set we have to write
min_version = msdf.get_compatible_version()
if min_version != "1.0":
    msdf.metadata["sssom_version"] = min_version
# Now we can actually write the msdf

Add a new method to the MappingSetDataFrame class to automatically
determine the minimum version of the SSSOM specification the set is
compatible with -- that is, the earliest version that defines all the
slots and all the enum values present in the set.
@gouttegd gouttegd self-assigned this Sep 1, 2025
@gouttegd
Copy link
Contributor Author

gouttegd commented Sep 1, 2025

⚠️ This cannot work for now because the latest released version of sssom is still the 1.0.0 from last year, in which the sssom_version_enum does not exist.

Fix wrong slot name when looking for "composed entity expression".

Let Python compare version numbers as tuples of integers.

Use `max(list)` instead of `sorted(list)[-1]`.
Copy link
Collaborator

@matentzn matentzn left a comment

Choose a reason for hiding this comment

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

I just want to say a huge THANK YOU for these PRs.. Much appreciated.

I dont see any red flags, lgtm!

@gouttegd gouttegd marked this pull request as draft September 3, 2025 18:00
@gouttegd
Copy link
Contributor Author

gouttegd commented Sep 3, 2025

Marking as draft to prevent inadvertent premature merging.

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.

3 participants