Skip to content

Use latest pre-release of the SSSOM schema.#625

Merged
gouttegd merged 2 commits intomapping-commons:masterfrom
gouttegd:update-schema
Oct 8, 2025
Merged

Use latest pre-release of the SSSOM schema.#625
gouttegd merged 2 commits intomapping-commons:masterfrom
gouttegd:update-schema

Conversation

@gouttegd
Copy link
Contributor

@gouttegd gouttegd commented Oct 8, 2025

This PR updates the sssom_schema dependency to use the latest 1.1.0 pre-release, so that we can start using the new slots and enum values in the upcoming version of the specification and ensure that SSSOM-Py is ready to work with them.

Update the sssom_schema dependency to use the latest 1.1.0 pre-release,
so that we can start using the new slots and enum values in the upcoming
version of the specification and ensure that SSSOM-Py is ready to work
with them.
The `inject_metadata_into_df` function (whose entire purpose is very
dubious but that is another matter) needs a list of the slots available
in the mapping class. It gets that list by doing its own loading of the
SSSOM schema. It does so without specifying any encoding for the schema
file, and apparently the default YAML parser, when not provided with an
explicit encoding on Windows, assumes the encoding is CP-1252. This
results in a failure to load the schema if it happens to contain
UTF-8-encoded non-ASCII characters (which in version 1.1.0a2 it does,
because we are no longer in the 1980s).

This commit updates the `inject_metadata_into_df` function so that it
reuses the SSSOMSchemaView class, which is precisely intended to give
access to the contents of the schema.
@gouttegd gouttegd requested a review from matentzn October 8, 2025 11:05
@gouttegd gouttegd self-assigned this Oct 8, 2025
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.

Very awesome, thank you!

@gouttegd gouttegd merged commit 467c62e into mapping-commons:master Oct 8, 2025
6 checks passed
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