Skip to content

remove spectra_utils #616

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kelle
Copy link
Collaborator

@kelle kelle commented May 24, 2025

Removes all of the ingest_spectra scripts.

@kelle kelle requested review from Copilot and canavarrete01 May 24, 2025 00:02
Copy link

@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 removes the ingest_spectra test suite, fully deleting tests/test_spectra_utils.py.

  • Deletes all tests validating the ingest_spectrum utility
  • Cleans up test artifacts related to spectra ingestion
Comments suppressed due to low confidence (1)

tests/test_spectra_utils.py:1

  • [nitpick] Removing the entire ingest_spectrum test file will eliminate coverage for that functionality. Ensure the associated code is also removed or refactored and update CI/test configs accordingly to prevent coverage failures.
# temp_db and logger is defined in conftest.py

@kelle kelle requested a review from Copilot May 27, 2025 22:06
Copy link

@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 removes all ingest_spectra scripts and their associated tests while updating the database schema to enforce non-null constraints and adjust unique constraints for the spectra data.

  • Removed tests for ingest_spectra functionality.
  • Updated simple/schema.yaml by setting "nullable: false" for the instrument mode and adding mode to the unique constraint columns.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
tests/test_spectra_utils.py Removed tests for ingest_spectrum functions, consistent with the removal of spectra_utils.
simple/schema.yaml Updated the schema: set mode as non-null and added it to a composite constraint.
Comments suppressed due to low confidence (1)

simple/schema.yaml:1042

  • Ensure that existing data complies with the new non-null constraint for the instrument mode column or that a migration strategy is provided to update existing null values.
+      nullable: false

@@ -1072,6 +1073,7 @@ tables:
columns:
- "#Spectra.source"
- "#Spectra.regime"
- "#Spectra.mode"
Copy link
Preview

Copilot AI May 27, 2025

Choose a reason for hiding this comment

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

Verify that including '#Spectra.mode' in the composite unique constraint aligns with the intended data integrity rules and doesn't unintentionally restrict valid spectra entries.

Copilot uses AI. Check for mistakes.

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.

1 participant