test: Introduce isolated package-level unit testing architecture#46
Open
aviralsaxena16 wants to merge 7 commits intoOSIPI:mainfrom
Open
test: Introduce isolated package-level unit testing architecture#46aviralsaxena16 wants to merge 7 commits intoOSIPI:mainfrom
aviralsaxena16 wants to merge 7 commits intoOSIPI:mainfrom
Conversation
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.
Resolves #45
Context
This PR represents Phase 4 of the structured testing roadmap:
#21 - Phase 1: CI pipeline foundation
#22 - Phase 2: End-to-end backend regression fixtures
#33 - Phase 3: Coverage visibility in CI
This PR - Phase 4: Isolated package-level unit testing
Note: This branch is stacked on top of #21, #22, and #33. The diff currently includes cumulative changes and will reduce once earlier PRs are merged.
Motivation
While Phases 1–3 secured the FastAPI integration layer through deterministic regression testing and coverage reporting, the core
pyaslreportpackage was still being exercised as a black box.This created three architectural limitations:
As we prepare for DCE/DSC expansion and increased architectural complexity, fast and isolated unit validation becomes essential.
What This PR Introduces
Package-Level Test Architecture
New directory structure: package/tests/unit/
Deterministic Unit Tests for Core Components
Initial coverage targets:
UnitConverterUtilsModalityTypeValuesMODALITY_REGISTRYConfigloader logicThese tests:
Layered CI Execution
The CI workflow is now structured into two stages:
This improves:
Architectural Impact
This PR formally separates:
The result:
This directly supports the GSoC objective of preparing a structure
“so that further testing files for all modules can be easily uploaded.”
Additional Fix Identified During Phase 4
While setting up isolated tests, a broken internal import in
enums/__init__.pywas discovered and corrected.This reinforces the value of separating package-level validation from integration tests.
Forward Direction
With this structure in place, we can now:
Best,
Aviral