Skip to content

Commit 7e1a353

Browse files
author
Donglai Wei
committed
clean up testing
1 parent 394b5ab commit 7e1a353

16 files changed

+261
-1703
lines changed

connectomics/training/lit/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ def setup_config(args) -> Config:
216216
if hasattr(cfg.model, "mednext_size"):
217217
cfg.model.mednext_size = "S"
218218
# Keep CellMap shapes in sync with the smaller debug patch
219-
if hasattr(cfg.data, "cellmap"):
219+
if getattr(cfg.data, "cellmap", None):
220220
cfg.data.cellmap["input_array_info"]["shape"] = [64, 64, 64]
221221
cfg.data.cellmap["target_array_info"]["shape"] = [64, 64, 64]
222222

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,8 @@ testpaths = ["tests"]
178178
python_files = ["test_*.py"]
179179
python_classes = ["Test*"]
180180
python_functions = ["test_*"]
181-
addopts = "-v --cov=connectomics --cov-report=html --cov-report=term"
181+
# Keep default invocation lightweight; enable coverage locally via CLI when pytest-cov is installed.
182+
addopts = "-v"
182183

183184
[tool.mypy]
184185
python_version = "3.8"

tests/INTEGRATION_STATUS.md

Lines changed: 0 additions & 231 deletions
This file was deleted.

tests/README.md

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ tests/
99
├── unit/ # Unit tests (fast, isolated)
1010
├── integration/ # Integration tests (multiple components)
1111
├── e2e/ # End-to-end tests (complete workflows)
12-
└── test_banis_features.py # BANIS Phase 12 integration tests
12+
└── test_banis_features.py # BANIS feature smoke tests
1313
```
1414

1515
## Test Categories
@@ -18,6 +18,8 @@ tests/
1818

1919
Fast, isolated tests for individual components:
2020
- **test_hydra_config.py** - Configuration system (dataclasses, validation)
21+
- **test_lit_utils.py** - Lightning CLI utilities (setup_config, path expansion)
22+
- **test_connectomics_module.py** - Lightning module training/validation hooks
2123
- **test_architecture_registry.py** - Model registry system
2224
- **test_registry_basic.py** - Basic registry functionality
2325
- **test_loss_functions.py** - Loss function implementations
@@ -36,7 +38,6 @@ Tests for multiple components working together:
3638
- **test_config_integration.py** - Config system + training pipeline smoke
3739
- **test_dataset_multi.py** - Multi-dataset loading and mixing
3840
- **test_auto_config.py** - Auto-configuration system
39-
- **test_auto_tuning.py** - Hyperparameter auto-tuning
4041
- **test_affinity_cc3d.py** - Connected components and post-processing
4142

4243
Run integration tests only:
@@ -47,8 +48,7 @@ pytest tests/integration/
4748
### End-to-End Tests (`e2e/`)
4849

4950
Complete workflow tests (slowest, most comprehensive):
50-
- **test_lucchi_training.py** - Full training run on Lucchi dataset
51-
- **test_main_lightning.py** - Complete main.py workflow
51+
- **test_lucchi_training.py** - Synthetic Lucchi-style training pipeline
5252

5353
Run e2e tests only:
5454
```bash
@@ -81,7 +81,7 @@ pytest tests/e2e/ # End-to-end tests
8181
### Run Specific Test File
8282
```bash
8383
pytest tests/unit/test_hydra_config.py
84-
pytest tests/integration/test_lightning_integration.py
84+
pytest tests/unit/test_lit_utils.py
8585
```
8686

8787
### Run with Coverage
@@ -166,19 +166,3 @@ Use `-k` to run specific tests:
166166
```bash
167167
pytest tests/ -k "not training" # Skip training tests
168168
```
169-
170-
## Phase 12 Completion
171-
172-
**Completed:**
173-
- Reorganized tests into `unit/`, `integration/`, `e2e/` directories
174-
- Created `__init__.py` documentation for each category
175-
- Added `test_banis_features.py` for BANIS Phase 6-12 features
176-
- Updated test structure documentation
177-
178-
**Test Coverage:**
179-
- Unit: 7 test files
180-
- Integration: 6 test files
181-
- E2E: 3 test files
182-
- BANIS: 1 test file
183-
184-
Total: **17 test files** organized by category

0 commit comments

Comments
 (0)