Skip to content

[Code scan] check_oh_consist cannot run from the repository root #146

Description

@njzjz

Source: Codex global repository scan of deepmodeling/dpti at commit b719828.
Project: DeepModeling Agent Code Scan

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

from lib.utils import integrate

import lib.water as water

lines = open('dump.hti').read().split('\n')

Reproduction
Run from the repository root:

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions