Fix bugs and improve code organization across SimiCPipeline - #1
Draft
irenemaring with Copilot wants to merge 2 commits into
Draft
Fix bugs and improve code organization across SimiCPipeline#1irenemaring with Copilot wants to merge 2 commits into
irenemaring with Copilot wants to merge 2 commits into
Conversation
… guidelines Agent-Logs-Url: https://github.com/ML4BM-Lab/SimiCPipeline/sessions/3f107643-064f-4581-b984-c13d8626f3fd Co-authored-by: irenemaring <72460651+irenemaring@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Refactor code organization and structure for better practices
Fix bugs and improve code organization across SimiCPipeline
Mar 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Several correctness bugs, API hygiene issues, and code organization problems existed across the package. This PR addresses them with surgical, targeted changes.
Bug Fixes
@staticmethodon module-level function (utils/io.py):format_timewas decorated with@staticmethodat module scope, producing astaticmethoddescriptor object instead of a callable — any call would raiseTypeError.__all__typo (simicpipeline/__init__.py):"AUProcessor"was appended instead of"AUCProcessor", so the class was silently missing from the public API.== Noneidentity check (utils/io.py):adata.raw == None→adata.raw is None.load_from_matrix_marketpath handling:genes_path/cells_pathtyped asUnion[str, Path]withNonedefaults but.exists()called directly on them. Fixed type hints toOptional[Union[str, Path]]with explicitis not Noneguard andPath(...)conversion.API / Public Surface
install_package→_install_packageand removed it fromutils/__init__.pyexports. A library package should not expose a pip-installer as public API.setup.cfg— fully redundant withpyproject.toml; settings conflicted (mypy Python3.9vs3.10, line length100vs88).Dead Code & Import Cleanup
core/__init__.py,aucprocessor.py,simicpreprocess.py.osin_jupyter.py;numpy,coo_matrix,Tupleinutils/io.py).print_treedocstring.Tests
Added
tests/directory (previously missing despite pytest being configured) with 14 smoke tests coveringformat_time,write_pickle,print_tree,SimiCBase, and_load_assignment_file.