Skip to content

Add test suite, CI/codecov, and packaging docs; fix two latent bugs#4

Merged
devonjkohler merged 1 commit into
mainfrom
chore/publication-readiness-phase0
Jul 6, 2026
Merged

Add test suite, CI/codecov, and packaging docs; fix two latent bugs#4
devonjkohler merged 1 commit into
mainfrom
chore/publication-readiness-phase0

Conversation

@devonjkohler

@devonjkohler devonjkohler commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Tests: expand from 52 to 154 passing tests across the package (network, pathway analysis, workflows, repair, prior reconciliation, simulation, and comparison modules).

Fixes:

  • network.py: add missing verbose param to extract_indra_prior (referenced an undefined name -> NameError on every call)
  • models.py: correct node_name not in "Output" substring checks to "Output" not in node_name, matching the read-site predicates

Chore: add CI workflow (lint + pytest + Codecov upload), coverage badge, LICENSE/CONTRIBUTING/CHANGELOG, and point all repo URLs at Vitek-Lab/Causomic.

Motivation and context

This change expands the package with broader analysis, simulation, validation, and workflow support while adding substantial test coverage. It also fixes two latent bugs: an undefined verbose reference in extract_indra_prior, and incorrect "Output" substring checks in the causal model code. In parallel, the repository is made more production-ready with CI, packaging, documentation, and branding updates.

Changes

  • Added CI for linting, pytest, and Codecov upload.
  • Expanded package metadata and tooling:
    • new test/dev extras
    • pytest config
    • updated Black targets
    • MIT license field
  • Updated repository URLs and README branding to Vitek-Lab/Causomic.
  • Added repository docs:
    • LICENSE
    • CONTRIBUTING.md
    • CHANGELOG.md
  • Added/expanded public package exports across:
    • causal_model
    • data_analysis
    • graph_construction
    • simulation
    • validation
  • Added new pathway analysis utilities:
    • ORA
    • pathway library lookup
    • greedy diverse pathway selection
    • Cytoscape export
  • Added verbose flags to multiple workflows and helpers to reduce noisy console output.
  • Fixed extract_indra_prior by adding the missing verbose parameter.
  • Fixed "Output" node detection logic in models.py.
  • Refactored simulation and workflow modules, including removal of several old main() demo entry points.
  • Tightened .gitignore for local dev artifacts.

Tests

Added or expanded coverage for:

  • cyclic network generation and cyclic simulation
  • example graph constructors
  • network helpers and INDRA prior extraction
  • pathway analysis utilities
  • pathway correlation analysis
  • prior data reconciliation
  • proteomics simulation and processing
  • random network generation
  • repair utilities
  • search-path diagnostics
  • workflow helper functions

Coding guidelines violated

None identified.

Tests: expand from 52 to 154 passing tests across the package
(network, pathway analysis, workflows, repair, prior reconciliation,
simulation, and comparison modules).

Fixes:
- network.py: add missing `verbose` param to extract_indra_prior
  (referenced an undefined name -> NameError on every call)
- models.py: correct `node_name not in "Output"` substring checks to
  `"Output" not in node_name`, matching the read-site predicates

Chore: add CI workflow (lint + pytest + Codecov upload), coverage badge,
LICENSE/CONTRIBUTING/CHANGELOG, and point all repo URLs at Vitek-Lab/Causomic.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@devonjkohler devonjkohler merged commit bdca531 into main Jul 6, 2026
0 of 4 checks passed
@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2b7b1418-754c-49cf-88c1-92094361d745

📥 Commits

Reviewing files that changed from the base of the PR and between ff1c3f6 and f49d174.

📒 Files selected for processing (48)
  • .github/workflows/ci.yml
  • .gitignore
  • CHANGELOG.md
  • CONTRIBUTING.md
  • LICENSE
  • README.md
  • pyproject.toml
  • src/causomic/causal_model/LVM.py
  • src/causomic/causal_model/__init__.py
  • src/causomic/causal_model/models.py
  • src/causomic/data_analysis/__init__.py
  • src/causomic/data_analysis/gene_set.py
  • src/causomic/data_analysis/pathway_analysis.py
  • src/causomic/data_analysis/pathway_correlation_analysis.py
  • src/causomic/data_analysis/proteomics_data_processor.py
  • src/causomic/graph_construction/__init__.py
  • src/causomic/graph_construction/neo4j_indra_queries.py
  • src/causomic/graph_construction/prior_data_reconciliation.py
  • src/causomic/graph_construction/repair.py
  • src/causomic/graph_construction/search_path_diagnostic.py
  • src/causomic/graph_construction/utils_neo4j.py
  • src/causomic/graph_construction/utils_nx.py
  • src/causomic/network.py
  • src/causomic/simulation/__init__.py
  • src/causomic/simulation/cyclic_network.py
  • src/causomic/simulation/example_graphs.py
  • src/causomic/simulation/proteomics_simulator.py
  • src/causomic/simulation/random_network.py
  • src/causomic/validation/__init__.py
  • src/causomic/validation/benchmark_workflow.py
  • src/causomic/validation/network_comparison.py
  • src/causomic/workflows.py
  • tests/conftest.py
  • tests/test_cyclic_network.py
  • tests/test_example_graphs.py
  • tests/test_gene_set.py
  • tests/test_network.py
  • tests/test_network_comparison.py
  • tests/test_pathway_analysis.py
  • tests/test_pathway_correlation_analysis.py
  • tests/test_prior_data_reconciliation.py
  • tests/test_proteomics_processor.py
  • tests/test_proteomics_simulator.py
  • tests/test_random_network.py
  • tests/test_repair.py
  • tests/test_search_path_diagnostic.py
  • tests/test_utils_nx.py
  • tests/test_workflows.py

📝 Walkthrough

Walkthrough

This PR adds CI/packaging infrastructure and project docs, introduces a new pathway over-representation/diversity-selection/Cytoscape-export module, fixes an output-node gating bug in causal models, threads a verbose flag through most analysis/simulation/graph-construction/validation/network functions to gate print output, removes several demo main() entrypoints, expands package __init__.py exports, and adds a large new test suite.

Changes

Project Infrastructure and Packaging

Layer / File(s) Summary
CI workflow setup
.github/workflows/ci.yml
Adds lint (black/isort) and test (pytest matrix + Codecov) CI jobs triggered on pushes/PRs to main.
Packaging, licensing, and documentation updates
.gitignore, CHANGELOG.md, CONTRIBUTING.md, LICENSE, README.md, pyproject.toml
Adds changelog/contributing/license docs, updates README branding and supported Python versions, and updates pyproject metadata, dependencies, extras, and tool config.

Library Verbose Flags, Pathway Analysis, and Cleanup

Layer / File(s) Summary
Package public API exports
src/causomic/*/__init__.py
Populates package __init__.py files with docstrings and re-exported public symbols.
New pathway ORA/diversity/Cytoscape export module
src/causomic/data_analysis/pathway_analysis.py, tests/test_pathway_analysis.py
Adds gene-set enrichment, Jaccard-based diverse pathway selection, and Cytoscape export utilities with tests.
Causal model bugfix and LVM cleanup
src/causomic/causal_model/models.py, src/causomic/causal_model/LVM.py
Fixes output-node gating condition, hardcodes device to CPU, and removes LVM's demo entrypoint.
Gene set and pathway correlation verbose flags
src/causomic/data_analysis/gene_set.py, src/causomic/data_analysis/pathway_correlation_analysis.py, tests
Adds verbose parameter gating progress prints in shared analysis functions.
Proteomics data processor verbose flag and cleanup
src/causomic/data_analysis/proteomics_data_processor.py, tests/conftest.py, tests/test_proteomics_processor.py
Adds verbose to normalize_median and removes the module's demo entrypoint.
Graph construction verbose flags and repair
src/causomic/graph_construction/*.py, related tests
Adds verbose parameters, reformats several modules, and adds new unit tests for reconciliation/repair/diagnostic helpers.
Network module verbose flags
src/causomic/network.py, tests/test_network.py
Adds verbose to extract_indra_prior, estimate_posterior_dag, and repair_confounding.
Cyclic network verbose flag and example graphs cleanup
src/causomic/simulation/cyclic_network.py, src/causomic/simulation/example_graphs.py, tests
Adds verbose to simulate_cyclic_data and removes example_graphs' demo entrypoint.
Proteomics simulator vectorization
src/causomic/simulation/proteomics_simulator.py, tests/test_proteomics_simulator.py
Vectorizes generate_features, adds verbose to simulate_data, and removes its demo entrypoint.
Random network verbose flag
src/causomic/simulation/random_network.py, tests/test_random_network.py
Adds verbose to run_graph_sim and reformats DAG generation helpers.
Validation module verbose flags
src/causomic/validation/benchmark_workflow.py, src/causomic/validation/network_comparison.py, tests
Adds verbose to reconcile_network/validate_model and removes benchmark_workflow's demo entrypoint.
Toxicity workflow reformatting
src/causomic/workflows.py, tests/test_workflows.py
Reformats run_toxicity_detection_workflow and removes its demo entrypoint.

Estimated code review effort: 4 (Complex) | ~75 minutes

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant workflows as run_toxicity_detection_workflow
    participant graph_construction as query_forward_paths
    participant network as estimate_posterior_dag
    participant repair as repair_confounding

    User->>workflows: call with input_data, verbose
    workflows->>graph_construction: build INDRA prior
    graph_construction-->>workflows: prior graph
    workflows->>network: estimate_posterior_dag(verbose=verbose)
    network-->>workflows: posterior_network
    workflows->>repair: repair_confounding(verbose=verbose)
    repair-->>workflows: repaired_network
    workflows-->>User: (indra_prior, posterior_network, repaired_network)
Loading

Poem

A rabbit hopped through code so vast,
Verbose flags whispered soft at last.
Pathways bloomed in Cytoscape's light,
Old mains retired into the night.
CI hums green, the tests all cheer —
🐇 Hop hop hooray, the release draws near!

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/publication-readiness-phase0

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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