Skip to content

Conversation

@eecavanna
Copy link
Collaborator

@eecavanna eecavanna commented Aug 19, 2025

On this branch, I made three main changes:

  1. I "bumped" the schema version that the ingest script uses by default, to the latest version in the bertron-schema repository.
  2. I updated the data files used by the test suite so that they comply with that schema. This involves removing the has_ prefix from some field names.
  3. I pinned the schema dependency used by the API so that it matches the version that the ingest script uses by default.

I also made these minor changes:

  1. I replaced an invocation of a deprecated function related to timestamp generation, with an invocation of a function that is not deprecated. Now, the pytest output will not show a warning related to the original invocation.
  2. I added instructions for running the test suite from a container shell, which makes it so the pytest output appears in color, like this:
    image

@eecavanna eecavanna self-assigned this Aug 19, 2025
@eecavanna eecavanna requested a review from Copilot August 19, 2025 02:37
Copy link
Contributor

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 updates the project to use a specific version of the bertron-schema dependency and ensures test data files comply with the updated schema. It also includes minor improvements to deprecation warnings and test documentation.

  • Pin bertron-schema dependency to a specific commit hash instead of using the latest version
  • Update JSON test data files to use new schema field names (removing "has_" prefixes)
  • Replace deprecated datetime.utcnow() with datetime.now(UTC) to eliminate pytest warnings

Reviewed Changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pyproject.toml Updates bertron-schema dependency to specific commit with detailed comments
tests/data/nmdc-example.json Updates field names to match new schema (removes "has_" prefixes)
tests/data/monet-example.json Updates field names to match new schema (removes "has_" prefixes)
tests/data/gold-example.json Updates field names to match new schema (removes "has_" prefixes)
mongodb/ingest_data.py Replaces deprecated datetime function and updates schema URL to match dependency
CONTRIBUTING.md Adds instructions for running tests in container with colored output

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Collaborator

@jeff-cohere jeff-cohere left a comment

Choose a reason for hiding this comment

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

Thanks for the helpful comments explaining how to maintain the schema dependencies, Eric!

@eecavanna eecavanna merged commit 0a2c92d into main Aug 19, 2025
1 check passed
@eecavanna eecavanna deleted the 88-update-data-files-in-tests-to-reflect-latest-schema-and-update-schema-version-pin branch August 19, 2025 17:59
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 data files in tests/ to reflect latest schema and update schema version pin

3 participants