Skip to content

Conversation

turbomam
Copy link
Member

@turbomam turbomam commented Jul 9, 2025

We need to determine when the script would be run and what benefit we get, when the content of the individual src/data/valid/Database*.yaml files will all be checked by linkml-run-examples anyway

It does provide one fiel that can serve as a mock database

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances the interleave_yaml script to detect and resolve duplicate item IDs during interleaving and updates the Makefile to use the new interleaved file name.

  • Introduces an increment_id helper for generating unique IDs
  • Adds duplicate ID tracking, automatic resolution, and reporting in process_yaml
  • Updates Makefile target from Database-interleaved-new.yaml to Database-interleaved.yaml

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/scripts/interleave_yaml.py Added increment_id, duplicate ID detection/resolution logic, and reporting
project.Makefile Updated the interleaved YAML target filename
Comments suppressed due to low confidence (1)

src/scripts/interleave_yaml.py:105

  • Consider adding unit tests for the duplicate ID resolution logic and the increment_id function to ensure edge cases (e.g., '9'→'10', 'z'→'za') are handled correctly.
                    # Check for duplicate IDs within this slot and resolve them

Copy link

github-actions bot commented Jul 9, 2025

PR Preview Action v1.6.2

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

Built to branch gh-pages at 2025-07-09 02:41 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

turbomam and others added 2 commits July 8, 2025 22:38
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@turbomam
Copy link
Member Author

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.

update src/scripts/interleave_yaml.py so that it doesn't create duplicate outer keys
1 participant