deepmodeling / deepmodeling/dftio

[Code scan] Restore vendored xitorch sampled quadrature imports

Open
#42 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
16
Forks
14
PR merge metrics
No merged PRs in 30d

Description

This issue comes from a Codex global repository scan.

## Problem
The vendored sampled quadrature module imports the vendored package root and subclasses `xt.EditableModule`:

https://github.com/deepmodeling/dftio/blob/c9d128f24a74ef2911e1a28f5640357488beb196/dftio/dep/_xitorch/_impls/integrate/samples_quad.py#L1-L11

But `dftio/dep/_xitorch/__init__.py` is empty, so `EditableModule` is not exported there. Importing the module raises:

```text
AttributeError: module 'dftio.dep._xitorch' has no attribute 'EditableModule'
```

## Suggested fix
Either import `EditableModule` directly from `dftio.dep._xitorch._core.editable_module`, or re-export it from the vendored package root.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.