Skip to content

Conversation

@vlad-perevezentsev
Copy link
Contributor

@vlad-perevezentsev vlad-perevezentsev commented Nov 14, 2025

This PR removes the remaining wildcard imports and __all__ declarations from internal modules and consolidates the corresponding exports in dpnp/__init__.py as part of the ongoing public API unification.

This work follows #2665.

  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to an issue with a reproducer?
  • Have you tested your changes locally for CPU and GPU devices?
  • Have you made sure that new changes do not introduce compiler warnings?
  • Have you checked performance impact of proposed changes?
  • Have you added documentation for your changes, if necessary?
  • Have you added your changes to the changelog?

@github-actions
Copy link
Contributor

github-actions bot commented Nov 14, 2025

View rendered docs @ https://intelpython.github.io/dpnp/index.html

@github-actions
Copy link
Contributor

github-actions bot commented Nov 14, 2025

Array API standard conformance tests for dpnp=0.20.0dev1=py313h509198e_60 ran successfully.
Passed: 1229
Failed: 0
Skipped: 7

* Redesigned `dpnp.modf` function to be a part of `ufunc` and `vm` pybind11 extensions [#2654](https://github.com/IntelPython/dpnp/pull/2654)
* Refactored `dpnp.fft` and `dpnp.random` submodules by removing wildcard imports and defining explicit public exports [#2649](https://github.com/IntelPython/dpnp/pull/2649)
* Added support for the `out` keyword to accept a tuple, bringing ufunc signatures into alignment with those in NumPy [#2664](https://github.com/IntelPython/dpnp/pull/2664)
* Unified `dpnp` public API exports by consolidating function exports in `__init__.py` and removing wildcard imports [#2665](https://github.com/IntelPython/dpnp/pull/2665) [#2666](https://github.com/IntelPython/dpnp/pull/2666)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove "--disable=c-extension-no-member" from .pre-commit-config.yaml now?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And E501 skipping in .flake8

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably you meant F403 : ‘from module import *’ used
Since some files that are to be removed in the future still contain wildcard imports I would prefer not to change flake8 config

dpnp/dpnp_algo/__init__.py:29:1: F403 'from dpnp.dpnp_algo.dpnp_algo import *' used; unable to detect undefined names
from dpnp.dpnp_algo.dpnp_algo import *
^
dpnp/dpnp_utils/__init__.py:29:1: F403 'from dpnp.dpnp_utils.dpnp_algo_utils import *' used; unable to detect undefined names
from dpnp.dpnp_utils.dpnp_algo_utils import *
^
dpnp/random/dpnp_iface_random.py:44:1: F403 'from dpnp.dpnp_algo import *' used; unable to detect undefined names
from dpnp.dpnp_algo import *
^
dpnp/random/dpnp_iface_random.py:45:1: F403 'from dpnp.dpnp_utils import *' used; unable to detect undefined names
from dpnp.dpnp_utils import *
^
dpnp/random/dpnp_iface_random.py:47:1: F403 'from .dpnp_algo_random import *' used; unable to detect undefined names
from .dpnp_algo_random import *
^
5     F403 'from dpnp.dpnp_algo.dpnp_algo import *' used; unable to detect undefined names
5

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine to remove that in the follow up PR

Base automatically changed from refactor_public_api_exports to master December 17, 2025 11:39
Copy link
Contributor

@antonwolfy antonwolfy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@coveralls
Copy link
Collaborator

Coverage Status

coverage: 81.429% (+0.002%) from 81.427%
when pulling e17f107 on clean_init_exports
into 167c3e6 on master.

@vlad-perevezentsev vlad-perevezentsev merged commit 225b0db into master Dec 17, 2025
86 of 119 checks passed
@vlad-perevezentsev vlad-perevezentsev deleted the clean_init_exports branch December 17, 2025 14:42
github-actions bot added a commit that referenced this pull request Dec 17, 2025
This PR removes the remaining wildcard imports and `__all__`
declarations from internal modules and consolidates the corresponding
exports in `dpnp/__init__.py` as part of the ongoing public API
unification.
This work follows #2665 225b0db
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants