Tier 1 cleanup: unused deps, pressure setpoint bug, doc/config tidy - #191
Closed
skearnes wants to merge 1 commit into
Closed
Tier 1 cleanup: unused deps, pressure setpoint bug, doc/config tidy#191skearnes wants to merge 1 commit into
skearnes wants to merge 1 commit into
Conversation
Low-risk, mostly zero-behavior-change cleanup: Dependencies - Remove unused `docopt` (zero imports) from pyproject.toml; refresh uv.lock. - Remove 6 unused npm deps (axios, zod, @hookform/resolvers, react-hook-form, @headlessui/react, @heroicons/react) plus the mismatched @types/react-router-dom (v5 stub against react-router v7, which ships its own types); refresh package-lock.json. Bug fix - filters.py `_pressure_conditions_html`: the setpoint block was gated on `atmosphere.type != UNSPECIFIED`, so a reaction with a pressure setpoint but no atmosphere never displayed the setpoint. Gate on the setpoint's presence instead (shown bare when there is no atmosphere, parenthetically otherwise), matching the temperature filter. Adds filters_test.py with a regression case. Docs / config - .gitignore: add `.pytype/` (stale output from the abandoned pytype checker; `ty` is the checker now). - api/README.md: the "Vue interface" section is post-migration React; fix the heading and the stale `src/ketcher` path (the app loads ketcher from `public/ketcher`). - search.py: add docstrings to the get_input_stats / get_product_stats endpoints (project style requires them). Also reflows two lines in view.py/view_test.py that #187 introduced over 88 chars after #188 landed (no ruff-format gate in CI caught them). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Member
Author
|
Superseding this in favor of #186, which already landed the same Tier 1 work on main (unused-dep removal, the The one piece not covered by #186 — reformatting the two over-88 lines in Analysis performed with Claude Code (Claude Opus 4.7). |
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.
What
The Tier 1 batch from the cleanup plan — low-risk, mostly zero-behavior-change. One genuine bug fix.
Dependencies
docopt(zero imports anywhere) from pyproject.toml;uv.lockrefreshed.axios,zod,@hookform/resolvers,react-hook-form,@headlessui/react,@heroicons/react— plus@types/react-router-dom(a v5 type stub mismatched against react-router v7, which ships its own types). Each verified with a grep for import sites (0).package-lock.jsonrefreshed;npm run lintandnpm run buildstill pass.Bug fix
filters.py
_pressure_conditions_html: the setpoint block was gated onatmosphere.type != UNSPECIFIED, so a reaction with a pressure setpoint but no atmosphere never displayed the setpoint. Now gated on the setpoint's presence (shown bare when there's no atmosphere, parenthetically otherwise), matching the text filter and_temperature_conditions_html. New filters_test.py covers it (the without-atmosphere case fails before the fix).Docs / config
.pytype/(stale output from the abandoned pytype checker;tyis the checker now).src/ketcherpath (the app loads ketcher frompublic/ketcher, perModalKetcher).get_input_stats/get_product_statsendpoints (project style requires them).Also fixes red CI on main
Reflows two lines in
view.py/view_test.pythat #187 introduced over 88 chars after #188 (line-length) merged. Thecheck_pythonjob inchecks.ymlalready runsruff format --check ord_interface, and it has been failing onmainsince #187 because that PR didn't rebase on #188's line-length change before merging. Merging this PR turnsmaingreen again.Notes / skipped
pyproject.tomland the Dockerfile), so no change there.interface.pyflask_talisman cleanup was skipped: that file is the editor entrypoint, which is off-limits until its scheduled August 2026 deletion.Verification
ruff check .clean; tree isruff format-stable.uv run pytest ord_interface/api ord_interface/visualization— 61 passed (incl. the new regression).npm run lint+npm run buildclean.🤖 Generated with Claude Code
Greptile Summary
This PR is a low-risk "Tier 1" cleanup batch: one genuine bug fix, removal of unused Python and JS dependencies, documentation corrections, and line-length formatting fixes.
filters.py): the pressure-conditions HTML renderer previously gated the setpoint display onatmosphere.type != UNSPECIFIED, silently dropping the setpoint whenever no atmosphere was set. The fix moves the setpoint check outside the atmosphere guard and shows it bare when there is no atmosphere text, or parenthetically otherwise. A newfilters_test.pyadds three regression cases that cover all combinations.docoptfrompyproject.toml/uv.lock(no import sites), and removes six unused JS packages (axios,react-hook-form,@hookform/resolvers,@headlessui/react,@heroicons/react) plus the mismatched@types/react-router-domv5 stub frompackage.json/package-lock.json.src/ketcherpath topublic/ketcher; adds docstrings to two API endpoints; adds.pytype/to.gitignore; reformats two over-length lines inview.pyandview_test.py.Confidence Score: 5/5
Safe to merge — all changes are either additive (tests, docstrings) or clearly bounded removals (unused deps, dead gate condition).
The bug fix is straightforward and fully covered by new regression tests. Every removed dependency was verified to have zero import sites, and the lock files are consistent with their manifests. The formatting and documentation changes carry no behavioural risk.
No files require special attention.
Important Files Changed
Reviews (1): Last reviewed commit: "Tier 1 cleanup: drop unused deps, fix pr..." | Re-trigger Greptile