deepmodeling / deepmodeling/dpti

[Code scan] relax cannot be imported as a package module

Open
#132 0 comments 0 reactions 0 assignees View on GitHub
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
`dpti.relax` imports `lib.*` instead of package-qualified `dpti.lib.*`. This means `import dpti.relax` and `python -m dpti.relax` fail from a normal installed/package context with `ModuleNotFoundError: No module named 'lib'`.

Code references
https://github.com/deepmodeling/dpti/blob/b719828e7eeb571bd26411430197cd74ea78e38c/dpti/relax.py#L6
https://github.com/deepmodeling/dpti/blob/b719828e7eeb571bd26411430197cd74ea78e38c/dpti/relax.py#L7
https://github.com/deepmodeling/dpti/blob/b719828e7eeb571bd26411430197cd74ea78e38c/dpti/relax.py#L8

Reproduction
Run from the repository root or an installed environment:

```bash
python -c "import dpti.relax"
```

Expected result
Package modules should use package-qualified imports and import cleanly outside direct script execution from inside `dpti/`.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.