Skip to content

Standardize naming conventions and reorganize test directory structure#28

Merged
timenick merged 5 commits into
mainfrom
zhiwang/naming-and-test-structure-cleanup
Mar 31, 2026
Merged

Standardize naming conventions and reorganize test directory structure#28
timenick merged 5 commits into
mainfrom
zhiwang/naming-and-test-structure-cleanup

Conversation

@timenick
Copy link
Copy Markdown
Collaborator

Summary

  • Acronym casing unified across 9 class names (18 source files): OnnxOPONNXOp, OP*Op*, Ep*EP*, Qdq*QDQ*, OnnxConfigNotFoundErrorONNXConfigNotFoundError, OnnxModelOutputONNXModelOutput
  • Test directory reorganized: moved 18 flat module dirs from tests/ root into tests/unit/, merged duplicate onnx/ and sysinfo/ dirs, renamed dataset_tests/ to datasets/
  • CI workflow updated: test group paths in modelkit-ci.yml aligned to new structure
  • Naming convention documented: added docs/naming-convention.md (referenced from CLAUDE.md) and tests/CLAUDE.md for test directory rules

Details

Naming fixes

Before After Acronym
OnnxOP ONNXOp ONNX + Op
OnnxConfigNotFoundError ONNXConfigNotFoundError ONNX
OnnxModelOutput ONNXModelOutput ONNX
EpContextNodeChecker EPContextNodeChecker EP
EpPackage EPPackage EP
QdqFixResult QDQFixResult QDQ
OPOptionalInputSupportError OpOptionalInputSupportError Op
OPLackOfRequiredInformationError OpLackOfRequiredInformationError Op
OPUnsupportedError OpUnsupportedError Op

Test structure (before → after)

tests/                          tests/
├── build/          ──→         ├── unit/
├── cache/          ──→         │   ├── analyze/
├── commands/       ──→         │   ├── build/
├── compiler/       ──→         │   ├── cache/
├── config/         ──→         │   ├── commands/
├── core/           ──→         │   ├── compiler/
├── dataset_tests/  ──→         │   ├── config/
├── eval/           ──→         │   ├── core/
├── export/         ──→         │   ├── datasets/
├── inspect/        ──→         │   ├── eval/
├── loader/         ──→         │   ├── export/
├── models/         ──→         │   ├── inspect/
├── onnx/           ──→         │   ├── loader/
├── optim/          ──→         │   ├── models/
├── optracing/      ──→         │   ├── onnx/
├── session/        ──→         │   ├── optim/
├── sysinfo/        ──→         │   ├── optracing/
├── unit/           ──→         │   ├── session/
│   ├── analyze/                │   ├── sysinfo/
│   ├── onnx/                   │   └── utils/
│   └── sysinfo/                ├── integration/
├── integration/                ├── e2e/
├── e2e/                        ├── regression/
├── regression/                 ├── assets/
├── test_cli.py     ──→        ├── fixtures/
└── test_text_...   ──→        └── mock_data/

- Unify acronym casing in class names: OnnxOP→ONNXOp, Ep*→EP*, Qdq*→QDQ*,
  OP*→Op*, OnnxConfigNotFoundError→ONNXConfigNotFoundError,
  OnnxModelOutput→ONNXModelOutput (9 classes, 18 source files)
- Move all flat module test dirs from tests/ root into tests/unit/ to follow
  test-type-first organization (unit/integration/e2e/regression)
- Merge duplicate test dirs: tests/onnx/ + tests/unit/onnx/,
  tests/sysinfo/ + tests/unit/sysinfo/
- Rename tests/dataset_tests/ to tests/unit/datasets/ to match source module
- Update CI workflow test group paths to reflect new structure
- Add docs/naming-convention.md and tests/CLAUDE.md for ongoing enforcement
- Rename docs/pytest_complete_best_practices_guide.md to kebab-case
@timenick timenick requested a review from a team as a code owner March 31, 2026 03:34
Comment thread tests/unit/analyze/core/model_validators/test_validators.py Fixed
Comment thread tests/CLAUDE.md Outdated
Comment thread tests/CLAUDE.md Outdated
@timenick timenick merged commit e120e67 into main Mar 31, 2026
9 checks passed
@timenick timenick deleted the zhiwang/naming-and-test-structure-cleanup branch March 31, 2026 04:28
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