chore: Python 3.10+, remove legacy code, clean repo#67
Merged
ericchansen merged 2 commits intomasterfrom Mar 19, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR modernizes the repository into a leaner Python SDK by raising the minimum supported Python version to 3.10+, updating typing annotations to PEP 585 style, removing archived tooling/data, and tightening repo hygiene (CI, .gitignore, VS Code debug configs, fixtures/examples).
Changes:
- Require Python 3.10+ (packaging metadata, Ruff target version, CI matrix).
- Replace legacy
typing.List/Tupleannotations with built-in generics (list[...],tuple[...]). - Remove
scripts/archived/and consolidate SN2 QM data generation; add/track new fixtures and example data; simplify.gitignoreand update.vscode/launch.json.
Reviewed changes
Copilot reviewed 43 out of 50 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| test/test_linear_algebra.py | Updates typing annotations to built-in generics. |
| test/fixtures/optimization_golden.json | Adds a pinned “golden” optimization fixture for regression testing. |
| scripts/validate_against_upstream.py | Modernizes typing import (Callable from collections.abc). |
| scripts/archived/tools/sumq.py | Removes archived script. |
| scripts/archived/tools/submit.py | Removes archived script. |
| scripts/archived/tools/setup_sh_from_com.py | Removes archived script. |
| scripts/archived/tools/setup_qm.py | Removes archived script. |
| scripts/archived/tools/many_sumq.py | Removes archived script. |
| scripts/archived/tools/invert-chirality.py | Removes archived script. |
| scripts/archived/tools/format-ff.py | Removes archived script. |
| scripts/archived/tools/file_converter.py | Removes archived script. |
| scripts/archived/tools/count_steps.py | Removes archived script. |
| scripts/archived/tools/clean_mae_same_update.py | Removes archived script. |
| scripts/archived/tools/clean_mae_same_restart.py | Removes archived script. |
| scripts/archived/tools/clean_mae_same.py | Removes archived script. |
| scripts/archived/tools/clean_mae.py | Removes archived script. |
| scripts/archived/tools/change_mae_atom_type.py | Removes archived script. |
| scripts/archived/smiles_to_catvs_example/template_diphos.mae | Removes archived example data. |
| scripts/archived/smiles_to_catvs_example/smi/strem_bisphosphines.smi | Removes archived example data. |
| scripts/archived/smiles_to_catvs_example/run | Removes archived example runner. |
| scripts/archived/smiles_to_catvs_example/atom.typ | Removes archived example data. |
| scripts/archived/smiles_to_catvs_example/allyl6.mae | Removes archived example data. |
| scripts/archived/smiles_to_catvs/scripts/search.py | Removes archived script. |
| scripts/archived/smiles_to_catvs/scripts/sdf_to_mae.py | Removes archived script. |
| scripts/archived/smiles_to_catvs/scripts/prepare.py | Removes archived script. |
| scripts/archived/smiles_to_catvs/scripts/finish.py | Removes archived script. |
| scripts/archived/README.md | Removes archived docs. |
| q2mm/parsers/mm3.py | Updates annotations to list[...] and adjusts internal typing. |
| q2mm/parsers/base.py | Updates annotations to list[...] in base parser APIs. |
| q2mm/parsers/amber_ff.py | Updates annotations to list[...] in Amber FF parser. |
| q2mm/models/hessian.py | Updates annotations (list[...], tuple[...]) in Hessian helpers. |
| q2mm/linear_algebra.py | Updates return type annotation to tuple[...]. |
| pyproject.toml | Bumps requires-python to 3.10; Ruff target-version to py310; adjusts ignore list comments. |
| examples/sn2-test/test_pipeline.py | Adds a pipeline demo script using the “clean” model layer. |
| examples/sn2-test/generate_qm_data_v2.py | Removes v2 generator (merged into v1). |
| examples/sn2-test/generate_qm_data.py | Merges/improves QM data generation workflow (diffuse basis + complex). |
| examples/sn2-test/README.md | Updates docs to reflect renamed scripts and workflow. |
| examples/ethane/TS.mol2 | Adds tracked TS mol2 example data. |
| examples/ethane/GS.mol2 | Adds tracked GS mol2 example data. |
| .vscode/launch.json | Replaces legacy debug configs with configs targeting current scripts/tools. |
| .gitignore | Removes overly broad ignores; keeps only generated artifacts and standard tooling output. |
| .github/workflows/ci.yml | Drops Python 3.9 from the CI matrix. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Python 3.10+ minimum: - Update requires-python and ruff target-version to py310 - Drop Python 3.9 from CI matrix - Enable UP006/UP035 ruff rules, auto-fix typing.List/Tuple to builtins - Remove dead typing imports from 7 files Remove legacy/archived code: - Delete scripts/archived/ (26 files, Schrodinger-dependent tools) - Delete psi4-output.dat and psi4-output-v2.dat (2.7 MB raw logs) - Merge generate_qm_data_v2.py into generate_qm_data.py - Rename test_new_pipeline.py to test_pipeline.py Clean .gitignore: - Rewrite from 238 lines to 55 — remove overly broad globs (*.fld, *.mol2, *.log, *.txt, etc. were hiding example data) - Ethane example files now tracked (GS/TS .fchk, .log, .mol2) - Test fixture JSON now tracked Update .vscode/launch.json: - Replace 7 legacy configs referencing old CLI scripts - Add 5 new configs for current API (pipeline, tests, benchmarks) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
810a620 to
147102e
Compare
- Switch .vscode/launch.json SN2 config from module to program path (hyphenated directory is not a valid Python module name) - Populate examples/ethane/TS.mol2 with real coordinates from TS.fchk (was all zeros — physically invalid structure) - Fix list[Param] annotations to list[Param] | None in mm3.py and amber_ff.py where default is None - Update F402 ignore comment (archived scripts are deleted) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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
Require Python 3.10+, remove all legacy/archived code, clean up .gitignore, and modernize the repo for a lean SDK.
Changes
Python 3.10+ minimum
requires-pythonbumped from>=3.9to>=3.10target-versionupdated topy310UP006/UP035ruff rules -- auto-fixtyping.List/Tupleto builtins in 7 filesRemove legacy code (-72K lines)
scripts/archived/entirely (26 files -- Schrodinger-dependent tools)psi4-output.datandpsi4-output-v2.dat(2.7 MB raw Psi4 logs; extracted.npy/.txt/.xyzdata remains)generate_qm_data_v2.pyintogenerate_qm_data.py(remove v1)test_new_pipeline.pytotest_pipeline.pyClean .gitignore (238 lines -> 55)
*.fld,*.mol2,*.log,*.txt,*.fchk,*.mae, etc.) that were hiding legitimate example dataGS.fchk,GS.log,GS.mol2,TS.*) now properly trackedoptimization_golden.jsonnow trackedUpdate .vscode/launch.json
q2mm/loop.py,q2mm/seminario.py,q2mm/just_compare.py)Testing
ruff check .-- all checks passedruff format --check-- 71 files already formattedpytest -q-- 153 passed, 8 skipped, 1 xfailedmkdocs build --strict-- clean build