[Code scan] Fix invalid dftio.data __all__ exports

Open Beginner friendly
#35 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
90/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
python
Domain
data

Research direction

Open dftio/data/init.py at the all definition linked in the issue. Run from dftio.data import * to reproduce the TypeError, then verify that all entries are string names, the duplicate feature_to_block is removed, and the wildcard import succeeds.

Written by the indexing model from the issue text.

Description

This issue comes from a Codex global repository scan.

Problem

dftio.data.__all__ contains imported objects instead of string names:

https://github.com/deepmodeling/dftio/blob/c9d128f24a74ef2911e1a28f5640357488beb196/dftio/data/__init__.py#L15-L29

Python expects every __all__ entry to be a string. As written, wildcard imports fail instead of exporting the public API.

Reproduction

Run:

from dftio.data import *

This raises TypeError: Item in dftio.data.__all__ must be str.

Suggested fix

Change entries to string names and remove the duplicate feature_to_block entry.

Dominant language
Jupyter Notebook
Stars
16
Forks
14
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from deepmodeling/dftio

All issues in deepmodeling/dftio

Similar issues

More Data Engineering issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.