Skip to content

Document CLI and harden parsing behaviors#14

Merged
danielmcauley merged 6 commits into
mainfrom
codex-fixes-batch-1
Feb 17, 2026
Merged

Document CLI and harden parsing behaviors#14
danielmcauley merged 6 commits into
mainfrom
codex-fixes-batch-1

Conversation

@danielmcauley
Copy link
Copy Markdown
Owner

Summary

  • describe CLI entry point, README fixes, and parsing/SEM adjustments, aligning exports and metadata contracts as in plan
  • note that package metadata and CI now reference Python 3.9+, install dev deps for testing
    Testing
  • Not run (not requested)

@danielmcauley
Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Copy Markdown

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 documents the CLI entrypoint, hardens parsing behaviors, and aligns package metadata with Python 3.9+ requirements. It includes a critical bug fix for mouse exclusion logic and introduces robust path/filename parsing utilities.

Changes:

  • Added CLI module with basic entrypoint structure for future expansion
  • Refactored path parsing to use regex-based pattern matching instead of brittle index-based splitting
  • Fixed critical bug where mouse_ids_to_remove parameter kept excluded mice instead of removing them
  • Hardened SEM calculation to return NaN for edge cases (arrays with ≤1 elements)
  • Updated Python version requirement to 3.9+ and modernized type hints to use PEP 585 style
  • Cleaned up package exports in __all__ and moved pytest-mock to dev dependencies
  • Added comprehensive test coverage for new and modified functionality

Reviewed changes

Copilot reviewed 13 out of 14 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/test_package_exports.py New tests validating __all__ exports exist and are unique
tests/test_fiber_photometry.py Added tests for process_block_path and process_all_blocks with improved mocking
tests/test_data_processing.py Added tests for mouse exclusion, filename parsing validation, and path parsing errors
tests/test_data_loading.py Added tests for absolute path handling and missing day/cohort validation
tests/test_cli.py New tests for CLI help output and invalid argument handling
spout_mouse/cli.py New CLI module with basic argument parser and main entrypoint
spout_mouse/data_loading.py Refactored to use regex-based extract_day_and_cohort_from_path() function
spout_mouse/data_processing.py Fixed mouse exclusion bug, added _extract_mouse_id_from_filename() with validation
spout_mouse/analysis.py Added edge case handling for SEM calculation when array length ≤1
spout_mouse/__init__.py Removed internal API functions and GOOGLE_SHEET_URL from __all__ exports
setup.cfg Updated Python version classifiers to 3.9-3.11, moved pytest-mock to dev extras
requirements.txt Removed pytest-mock (now in dev dependencies only)
.github/workflows/pytest.yml Updated to Python 3.11 and install dev dependencies with editable mode
README.md Added CLI section, updated get_experiment_data example, removed non-existent function references

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@danielmcauley
Copy link
Copy Markdown
Owner Author

@codex fix failing tests

@chatgpt-codex-connector
Copy link
Copy Markdown

To use Codex here, create an environment for this repo.

1 similar comment
@chatgpt-codex-connector
Copy link
Copy Markdown

To use Codex here, create an environment for this repo.

Copy link
Copy Markdown
Collaborator

@molliebernstein molliebernstein left a comment

Choose a reason for hiding this comment

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

lgtm

@danielmcauley danielmcauley merged commit d90d572 into main Feb 17, 2026
2 checks passed
@danielmcauley danielmcauley deleted the codex-fixes-batch-1 branch February 17, 2026 04:19
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.

3 participants