Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 11, 2025

Task: Create test_rbcL.py test script

All Tasks Completed! ✓

  • Explore repository structure and understand test_bge.py pattern
  • Locate rbcL multi-fasta file (tests/bge/data/rbcl_barcodes_YG-4378.fasta)
  • Understand Galaxy BLAST configuration (was hardcoded in galaxy_blast.py)
  • Add galaxy_blast.database configuration option to schema.yaml
  • Modify galaxy_blast.py to use configurable database
  • Create test_rbcL.py based on test_bge.py pattern
  • Set marker to rbcL
  • Configure taxon validator to use "Genbank rbcL (2023-11-15)" database
  • Add .gitignore entries for test output files and auto-generated files
  • Fix import compatibility issues with different nbitk versions
  • Add Galaxy credential checks to test
  • Test the implementation
  • Fix CI test failures

Summary of Changes:

  1. Enhanced Galaxy BLAST Configuration (schema.yaml)

    • Added new galaxy_blast.database configuration option
    • Allows specifying different databases per marker
    • Default: "BOLD species only no duplicates"
  2. Updated Galaxy BLAST Service (galaxy_blast.py)

    • Made database configurable via config parameter
    • Fixed import compatibility: tries module-level import (older nbitk), falls back to class attributes (newer nbitk)
    • Maintains backward compatibility
  3. Created test_rbcL.py

    • Tests rbcL marker with 72 sequences
    • Configures Galaxy BLAST with "Genbank rbcL (2023-11-15)" database
    • Skips when Galaxy credentials unavailable
  4. Updated .gitignore

    • Added test output file patterns
    • Added barcode_validator/_version.py

CI Fix:

The test failures were caused by different nbitk versions exporting OutputFormat/TaxonomyMethod differently. Fixed with try/except import that works with both old and new nbitk versions.

Original prompt

Make a test script like test_bge.py but call it test_rbcL.py and make it use the rbcL multi-fasta file from one of the recent commits. Set the marker name to rbcL. Make it so that the taxon validator uses the database Genbank rbcL (2023-11-15) from the Galaxy blast service. When testing the test, skip the other unit tests because they take a long time.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Add test script for rbcL validation Add configurable Galaxy BLAST database support and rbcL test Dec 11, 2025
Copilot AI requested a review from rvosa December 11, 2025 00:22
@rvosa
Copy link
Member

rvosa commented Dec 11, 2025

@copilot the tests failed

Copy link
Contributor Author

Copilot AI commented Dec 11, 2025

@copilot the tests failed

Fixed in commit 7c9a0d6. The test failures were caused by incompatibility between different nbitk versions - older versions export OutputFormat/TaxonomyMethod at module level, while newer versions have them as class attributes. Added try/except import logic to support both.

@rvosa rvosa marked this pull request as ready for review December 12, 2025 16:50
@rvosa rvosa merged commit 6a52b38 into main Dec 12, 2025
4 checks passed
@rvosa rvosa deleted the copilot/create-test-script-for-rbcl branch December 12, 2025 16:50
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