deepmodeling / deepmodeling/dpti
[Code scan] check_oh_consist cannot run from the repository root
- Dominant language
- Python
- Stars
- 42
- Forks
- 27
- PR merge metrics
- No merged PRs in 30d
Description
Source: Codex global repository scan of deepmodeling/dpti at commit b719828e7eeb571bd26411430197cd74ea78e38c.
Project: https://github.com/orgs/deepmodeling/projects/27
Problem
`tools/check_oh_consist.py` imports `lib.*` instead of `dpti.lib.*`, so it cannot run from the repository root or an installed package context. It also performs hard-coded `dump.hti` file I/O at import time, before any CLI argument parsing or validation.
Code references
https://github.com/deepmodeling/dpti/blob/b719828e7eeb571bd26411430197cd74ea78e38c/tools/check_oh_consist.py#L4
https://github.com/deepmodeling/dpti/blob/b719828e7eeb571bd26411430197cd74ea78e38c/tools/check_oh_consist.py#L10
https://github.com/deepmodeling/dpti/blob/b719828e7eeb571bd26411430197cd74ea78e38c/tools/check_oh_consist.py#L34
Reproduction
Run from the repository root:
```bash
python tools/check_oh_consist.py
```
Observed result starts with `ModuleNotFoundError: No module named 'lib'`.
Expected result
The tool should use package-qualified imports and move file processing behind a CLI entry point that accepts the dump path.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with tools/check_oh_consist.py, especially the imports and the hard-coded dump.hti processing referenced in the issue. Run python tools/check_oh_consist.py from the repository root to reproduce the failure, then verify the tool accepts a dump path and delays file processing until CLI handling. Done means the command runs without the lib import error and no longer assumes dump.hti at import time.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100