API coherence: WorkflowResult return type, public-surface hygiene, config de-dup - #106
Merged
Conversation
main() now returns a WorkflowResult -- a str subclass whose value is the output SDF path (a drop-in for the path string it returned before: isinstance(str), Path(), open(), ==, hashing, pickling all behave identically) that also exposes n_molecules / n_conformers, computed lazily from the output and cached. The CLI run command reads those counts off the result instead of re-opening the SDF, and cli.results.count_from_output now delegates to the single-source core Auto3D.results.count_output. Backwards-compatible.
- Promote get_stable_tautomers/select_tautomers into the public API (Auto3D.__all__) and add a self-describing generate_conformers alias for main(); refactor the lazy __getattr__ into a single name->(module,attr) table. - Add module-level __all__ to SPE.py, ASE/geometry.py, ASE/thermo.py, and tautomer.py to pin each module's exported surface. - Replace hardcoded opt_tol/opt_steps/batchsize_atoms literals in opt_geometry/calc_thermo with the DEFAULT_* constants (same values; the thermo-specific 2e-4 tolerance becomes DEFAULT_THERMO_CONVERGENCE_THRESHOLD), and add a test asserting CLIConfig covers every public Auto3DOptions field so the config layers cannot silently drift.
isayev
added a commit
that referenced
this pull request
Jul 11, 2026
API coherence: WorkflowResult return type, public-surface hygiene, config de-dup
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 deferred API-coherence work from the CLI review. Two independent reviews (architecture + correctness) verified the change set is backwards-compatible and ship-able; the one actionable finding (defensive count read in
run.py) was applied.main()returns aWorkflowResultA
strsubclass whose value is the output SDF path — a verified drop-in for the previous return (isinstance(str),Path(),open(),==, hashing, pickling,json.dumpsall behave identically) — that also exposesn_molecules/n_conformers, computed lazily and cached. The CLI reads these off the result instead of re-opening the SDF;count_from_outputnow delegates to a single-source corecount_output.Public-surface hygiene
get_stable_tautomers/select_tautomerspromoted intoAuto3D.__all__; added a self-describinggenerate_conformersalias formain()(mainstays exported); lazy__getattr__refactored into onename -> (module, attr)table.__all__added toSPE.py,ASE/geometry.py,ASE/thermo.py,tautomer.py.Config coherence
opt_tol/opt_steps/batchsize_atomsliterals inopt_geometry/calc_thermowith theDEFAULT_*constants (same values; thermo's 2e-4 becomesDEFAULT_THERMO_CONVERGENCE_THRESHOLD).CLIConfigcovers every publicAuto3DOptionsfield, so the config layers can't silently drift.All values preserved (no behavior change). Fast gate: 671 passed (+8 new tests); ruff clean on
src/. CHANGELOG updated.Still deferred (CLI/feature, not API coherence): registry-aware
models(models test <engine>), wiringprogress.py's live display into the run loop.