Refactor workflow to DAG architecture with expanded testing, CI modernisation, and validated numerical equivalence#281
Open
harryswift01 wants to merge 110 commits intomainfrom
Open
Refactor workflow to DAG architecture with expanded testing, CI modernisation, and validated numerical equivalence#281harryswift01 wants to merge 110 commits intomainfrom
harryswift01 wants to merge 110 commits intomainfrom
Conversation
- Renamed `CodeEntropy/levels/structual_analysis.py` -> `CodeEntropy/levels/dihedral_analysis.py` to more accuatly define what this Class does - Introduced a new class within the module `CodeEntropy/levels/neighbours.py`
- `VibrationalEntropy` class -> own dedicated file within `CodeEntropy/entropy/nodes/vibrational_entropy.py` - `ConformationalEntropy` class -> own dedicated file within `CodeEntropy/entropy/nodes/configurational_entropy.py` - `OrientationalEntropy` class -> own dedicated file within `CodeEntropy/entropy/nodes/orientational_entropy.py` - Created a placeholder for the new graph builder `CodeEntropy/entropy/entropy_graph.py`
…xecution of entropy calculations
…y.select_levels()`
…er than `LevelGraph`
- Arguments are added to the `output_file.json` - Provenance added to the `output_file.json` - Tidied output logging in the `output_file.json`
Implement regression framework with: - baseline JSON comparisons - automatic dataset download from filestore - .testdata cache - slow test markers - config-driven system tests - CI workflows for quick PR checks and weekly full regression This provides reproducible validation of scientific results across releases.
…ession: Run unit tests across all supported OS and Python versions, add quick regression suite to PRs with .testdata caching, and configure weekly workflow to run full regression including slow tests. Simplify docs builds to latest environment.
- Add badges for PR checks, daily tests, weekly regression, and weekly docs. - Remove obsolete workflow badges and align README with current CI setup.
- Replace black, flake8, and isort with Ruff for linting and formatting. - Update pre-commit configuration and dependencies, add Ruff config to pyproject.toml, and apply automatic fixes across the codebase.
…or handling: - Avoid double logging of exceptions by centralising traceback reporting in the CLI. - Runtime now raises clean errors while preserving original exception chaining.
- Add ResultsReporter progress context manager - Propagate optional progress sink through workflow orchestration - Add progress reporting for: - Conformational state construction (per group) - Frame processing stage (per frame) - Keep entropy graph execution silent due to fast runtime - Update runtime tests to reflect wrapped RuntimeError behavior
…tooling: - Add instructions for unit vs regression test suites - Document slow test markers and how to run them - Explain automatic regression dataset downloads via filestore - Add guidance for updating regression baselines - Update coding standards to use Ruff instead of Black/Flake8/isort - Document multi-OS and multi-Python CI workflows - Clarify developer setup and testing commands - Remove outdated tooling references
This was
linked to
issues
Feb 25, 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.
Summary
This PR introduces a major architectural refactor that transitions CodeEntropy to a DAG-based execution model while preserving numerical behaviour. The refactor improves modularity, maintainability, and testability, and modernises the project’s testing, CI, and tooling infrastructure.
All systems and component-level contributions match the previous implementation within floating-point tolerance (maximum absolute difference 2.45e-08).
No breaking changes to user-facing behaviour are expected.
Motivation
The previous workflow was primarily procedural, which made it harder to reason about execution order, extend functionality, and test individual stages. Moving to a DAG model improves separation of concerns, enables clearer data flow, and provides a stronger foundation for future development while maintaining numerical equivalence.
Changes
DAG-based workflow architecture
Frame-level covariance computation
FrameCovarianceNodefor per-frame second-moment matrices.axes_manager.CLI and job-folder execution model
ResultsReporter improvements
groups: { "": { components: {...}, total: ... } }
Example output JSON.
Testing architecture overhaul
Regression dataset system
.testdata/.Quick vs slow regression separation
Developer and tooling improvements
--update-baselinesworkflow.CI/CD modernisation
Documentation pipeline
Logging and error handling improvements
Impact
Regression validation results
CodeEntropy Graph Implementation.xlsx
Entropy outputs from the refactored DAG workflow were compared against the previous implementation across all systems and component types. All values agree within floating-point tolerance.
Maximum absolute difference across all systems: 2.45e-08
This comparison confirms agreement across all individual contributions, not only group totals. Observed differences are consistent with expected floating-point variation introduced by consolidating numerical operations into NumPy.