Rename the CLI's WorkflowResults to RunSummary - #171
Merged
Merged
Conversation
`Auto3D.cli.results.WorkflowResults` was one trailing `s` away from `Auto3D.results.WorkflowResult`, which is a different kind of thing entirely -- `main()`'s return value, a `str` subclass that *is* the output SDF path -- living in a module also called `results.py`. Nothing converted between them; they were never related types. Importing either into a file that held the other read as a typo in both directions. `RunSummary` names what it is: the counts, timing and failure list the CLI prints after a run. The API's `WorkflowResult` is untouched. The guard is a rule rather than a forbidden name. `test_no_class_name_ differs_from_another_only_by_a_trailing_s` rejects *any* such pair anywhere in `src/`, because the defect is the near-collision, not this particular one -- the same treatment `test_only_one_class_in_the_package_is_named_tautomer_engine` already gives the `TautomerEngine` collision beside it. Mutation-tested by introducing an unrelated pair (`FailedMolecule`/`FailedMolecules`), which it catches and names. The rename used a word-boundary pattern, which matters here more than usual: `WorkflowResults` contains `WorkflowResult` as a prefix, so an unanchored replace of the shorter name would have corrupted every site of the longer one. Only the longer name changed. Not a documentation change: the name appears nowhere under `docs/source`. It is still an importable public name, so it gets a CHANGELOG table like the `isomer_engine` split, and no shim. Verification: - 1770 passed, 1 skipped, 74 deselected (+1 new guard), randomized order. - mypy: 68 errors in 22 files, 75 checked -- unchanged. - Zero residual references to the old name in `src/` or `tests/`.
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.
The collision
WorkflowResultAuto3D/results.pymain()'s return value — astrsubclass that is the output SDF pathWorkflowResultsAuto3D/cli/results.pyOne trailing
sapart, in two modules both namedresults.py, and not related types — nothing converts between them. Importing either into a file that held the other read as a typo in both directions.RunSummarynames what it is rather than where it came from.Auto3D.results.WorkflowResult— the one the Python API returns — is untouched.The guard is a rule, not a forbidden name
test_no_class_name_differs_from_another_only_by_a_trailing_srejects any such pair anywhere insrc/, because the defect is the near-collision rather than this particular instance. Same treatmenttest_only_one_class_in_the_package_is_named_tautomer_enginealready gives theTautomerEnginecollision sitting beside it.Mutation-tested by introducing an unrelated pair (
FailedMolecule/FailedMolecules), which it catches and names — so it is checking the property, not remembering an answer.One mechanical detail worth flagging
The rename used a word-boundary pattern, which matters more than usual here:
WorkflowResultscontainsWorkflowResultas a prefix, so an unanchored replace of the shorter name would have silently corrupted every site of the longer one. Only the longer name changed, and there are zero residual references to the old name insrc/ortests/.Compatibility
Still an importable public name, so it gets a CHANGELOG table like the
isomer_enginesplit, and no shim. It appears nowhere underdocs/source, so no documentation changes.Verification
Context
First piece of wave 9. The remaining two are the layer-layout regroup and splitting
ASE/thermo.py(1895 lines — now the largest file in the tree).