-
Notifications
You must be signed in to change notification settings - Fork 23
Unify dpnp public API exports by refactoring __init__.py
#2666
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
View rendered docs @ https://intelpython.github.io/dpnp/index.html |
|
Array API standard conformance tests for dpnp=0.20.0dev1=py313h509198e_60 ran successfully. |
| * 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) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
c125538 to
e17f107
Compare
antonwolfy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @vlad-perevezentsev
This PR removes the remaining wildcard imports and
__all__declarations from internal modules and consolidates the corresponding exports indpnp/__init__.pyas part of the ongoing public API unification.This work follows #2665.