Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors the CLI into a dedicated CliManager, updates packaging and tooling configuration (pyproject, uv.lock, pre-commit, CI), and makes a set of small robustness and documentation fixes across validation logic and tests.
Changes:
- Introduced a
CliManagerfor argument parsing and wired it into the main CLI entrypoint, while re-exporting primary classes from the top-level package. - Updated dependency metadata (including switching dev dependencies to
[dependency-groups]), refreshed locked versions, and expanded/modernized pre-commit hooks. - Improved error messages, logging text, and tests (including more robust regex matching for error messages and minor doc/typo cleanups).
Reviewed changes
Copilot reviewed 19 out of 28 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| uv.lock | Regenerated lock file with updated dependency versions and metadata (including new dev-dependency layout). |
| tests/test_processing/test_validation_manager/test_validate_reaction_smarts.py | Reformatted validator calls for readability; no behavior changes. |
| tests/test_processing/test_validation_manager/test_unescape_string.py | Added blank line after imports to satisfy style. |
| tests/test_processing/test_validation_manager/test_remove_ketcher_flavor_smarts.py | Added commas and minor formatting to assertions for style consistency. |
| tests/test_processing/test_validation_manager/test_cleanup_reaction_smarts.py | Adjusted call formatting and trailing commas; logic unchanged. |
| tests/test_processing/test_validation_manager/test_cleanup_ids.py | Switched to re.escape in pytest.raises(..., match=...) for more robust error-message matching and reformatted JSON mocks. |
| tests/test_processing/test_validation_manager/test_canonicalize_smiles.py | Reordered imports to group third-party vs. local and added spacing. |
| tests/test_processing/test_validation_manager/test_canonicalize_smarts.py | Same as above, plus trailing commas in nested function calls for style. |
| tests/test_processing/test_mite_parser.py | Reordered imports and added commas for style; behavior unchanged. |
| tests/test_processing/test_file_manager.py | Added blank line between third-party and local imports. |
| tests/test_processing/test_data_classes.py | Added blank line after imports for style. |
| tests/test_processing/example_indir_mite/example_valid.json | Ensured file ends with a newline (formatting only). |
| pyproject.toml | Simplified license-files declaration, reordered classifiers, removed argparse/jsonschema from dependencies, added mite-schema>=1.8.4, and replaced extras with [dependency-groups].dev. |
| mite_extras/processing/validation_manager.py | Tidied error strings (commas, wording, f-strings) and improved multi-line call formatting; logic preserved. |
| mite_extras/processing/mite_parser.py | Fixed a docstring typo and corrected f-string quoting when wrapping parse errors. |
| mite_extras/processing/file_manager.py | Improved log messages (grammar/typos) while keeping behavior the same. |
| mite_extras/processing/data_classes.py | Added trailing commas, clarified error messages, fixed a typo in a docstring, and slightly refactored validator calls without changing semantics. |
| mite_extras/main.py | Updated logger formatter call syntax and switched CLI parsing to use the new CliManager. |
| mite_extras/cli/cli_manager.py | New Pydantic-based CLI manager encapsulating argparse setup and argument parsing for input/output dirs and log verbosity. |
| mite_extras/init.py | Re-exported CliManager, FileManager, and MiteParser from the top-level package for easier consumption. |
| README.md | Trimmed trailing whitespace, fixed a “versiom” → “version” typo, but introduced a new “NOW” vs “NWO” acronym typo in the acknowledgements. |
| CODE_OF_CONDUCT.md | Added a trailing newline; no content change. |
| CHANGELOG.md | Corrected typos and minor formatting in change descriptions. |
| .pre-commit-config.yaml | Modernized the hook set (ruff, uv, pyupgrade, deptry, tombi, typos, etc.) and expanded checks; added a typos hook with a broad exclude pattern. |
| .github/workflows/publish_pypi.yml | Whitespace-only update; behavior unchanged. |
| .github/workflows/ci.yml | Kept the existing pip install .[dev] step while adjusting a subsequent run: pytest line; this now conflicts with the removal of the dev extra from pyproject. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.github/workflows/ci.yml
Outdated
| @@ -35,4 +35,4 @@ jobs: | |||
| pip install .[dev] | |||
There was a problem hiding this comment.
The CI step pip install .[dev] will now fail because the dev extra is no longer defined in pyproject.toml (it has been replaced by a [dependency-groups] section), so pip cannot resolve this extra; please either restore a [project.optional-dependencies].dev extra or change the install step to use the new dependency-group mechanism (or a plain pip install . plus an explicit dev requirements spec).
| pip install .[dev] | |
| pip install . | |
| pip install pytest |
|
@mmzdouc ready! |
|
Hey @Adafede I am not sure if we should add Python 3.13 to the workflow matrix because of |
Good, removed it! |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
No description provided.