-
Notifications
You must be signed in to change notification settings - Fork 16
Refactor codebase #56
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
Conversation
Reorganized codebase into modular subpackages: moved API logic to cytetype/api/, core logic to cytetype/core/, and preprocessing to cytetype/preprocessing/. Improved error handling with specific exceptions, enhanced server communication, and updated imports. Removed legacy modules and tests, and updated version to 0.13.0.
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||||||||||||||||||
Updated pyproject.toml to exclude build, dist, and egg-info directories from mypy checks. Added explicit return type annotations to test fixtures in tests/conftest.py for improved type safety.
PR Type
Enhancement, Tests
Description
Reorganized codebase into modular subpackages (api, core, preprocessing)
Refactored main.py to use new modular imports and simplified logic
Added comprehensive integration tests with fixtures and mocking
Improved error handling with specific exception types and better messages
Enhanced API client with transport layer, progress display, and result fetching
Updated dependencies and Python version requirement to 3.12
Diagram Walkthrough
File Walkthrough
12 files
Refactored to use modular subpackage importsNew API client module with public exportsCore API client functions for job submission and pollingHTTP transport layer with error handlingTerminal progress display during job pollingAdded error response and job status schemasPayload building and validation logicResult storage and retrieval functionsPreprocessing module public API exportsAnnData validation with gene symbol checkingMarker gene and coordinate extraction functionsExpression percentage and metadata aggregation1 files
Comprehensive exception hierarchy for API errors1 files
Core module initialization with documentation2 files
Pytest fixtures for mock AnnData and API responsesComprehensive integration tests for CyteType class1 files
Updated version to 0.13.01 files
Updated dependencies and Python version to 3.1213 files