Skip to content

Conversation

@turbomam
Copy link
Member

@turbomam turbomam commented Oct 22, 2025

Addresses #2663 by removing readonly metaslot assertions from generated mixs.yaml.

Replaces this (but keep branch 2663-dont-assert-read-only-slots)

Changes

Apply comprehensive dematerialization pipeline to mixs.yaml generation:

  • Remove all 12 readonly metaslots: source_file, from_schema, owner, domain_of, is_usage_slot, usage_slot_name, alias, definition_uri, imported_from, metamodel_version, source_file_date, source_file_size, generation_date
  • Simplify ExpandedDict → SimpleDict: prefixes, settings, annotations
  • Remove redundant key fields: class names, slot names, enum names, slot_usage names, subset names, permissible_values text
  • Remove 489 redundant aliases that duplicate title field
  • Conditionally remove domain (except MixsCompliantData)

Results

  • 35.9% reduction in lines: 11,837 → 7,587 (4,250 lines removed)
  • 27.9% smaller file size: 344K → 248K (96K saved)
  • Schema remains fully functional - all tests pass
  • SchemaView correctly materializes compact YAML back to full objects on load

Files Changed

  • project.Makefile: Added dematerialization transformations to mixs.yaml build target
  • src/schema/mixs.yaml: Generated output (dematerialized)
  • assets/other_mixs_yaml_files/mixs_template.yaml: Template adjustments

@turbomam turbomam linked an issue Oct 22, 2025 that may be closed by this pull request
@github-actions
Copy link

PR Preview Action v1.6.2

🚀 View preview at
https://microbiomedata.github.io/nmdc-schema/pr-preview/pr-2696/

Built to branch gh-pages at 2025-10-22 00:45 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@turbomam turbomam requested a review from mslarae13 October 22, 2025 20:42
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.

don't assert read-only slots

1 participant