-
-
Notifications
You must be signed in to change notification settings - Fork 719
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
Should utils_test.py
be considered public API?
#6806
Comments
cc: @jrbourbeau, @graingert |
Apart from the question whether we should consider the contents of
|
Thanks for raising this @hendrikmakait. While I definitely don't think all the contents of
Do you have a sense for how much friction there is here? To be clear, I think being more intentional about what we consider public is a good thing. I'm just wondering how big of a problem this is today |
I wouldn't consider them to be public to users necessarily, but certainly they're public to other dask libraries and other friends-of-dask like Xarray. From my perspective those libraries are within the bounds of Dask. If we change internals in utils_test then I would expect us to also reach out to and fix their use elsewhere, or at least collaborate with those libraries. |
Honestly, I can't really quantify this. What I can say is that I have stumbled across this twice this week and when talking to other developers they were either unhappy with the situation or uncertain about answering that question. It sounds like we might profit from moving most of the functions and fixtures elsewhere and reimporting those that others rely on back into @graingert also might have some interesting thoughts on all this. |
Given that we rely on these things in a bunch of places I would argue that today this is effectively a public API and we should treat it as such (no breaks, use deprecations, etc). However there is probably way more in there than there should be, so maybe we should try and be more intentional about what we expose going forwards. Other libraries I've used recently like |
@jacobtomlinson: Thanks for your input and for linking |
+1 for a dedicated |
My usecase for these testing utilities is kind of subtle, I like to be able to make changes to the testing infrastructure to increase strictness eg we now test that it's possible to run |
As an aside it's really painful for us to add new fixture dependencies to our 'exported' fixtures because they need to be re-imported completely in a way that appears to violate flake8. Which is why I'd like this new API to use contextmanagers in place of fixtures |
I also support this. I don't consider exporting fixtures a "sane" API. It's way too difficult to control imo. |
This reflects my view, I don't think we should attempt all that much stability in this API but we should still encourage people to use it for their CI. If you use it in CI, when we make a change:
|
Agreed, @graingert. What I would like is some distinction between a smaller module where changes might break stuff for others and a larger module where things will only break +1 on getting rid of fixtures in the public API. |
We should also help friends-of-dask enable |
We currently expose a number of functions and fixtures in
distributed.utils_test
. While I would consider these implementation details of our tests, and not part of any stable user-facing API, other projects, includingdask/dask
rely on them for their test suites (https://github.com/dask/dask/blob/ac74939697c328bd6456aa9fad7d9520328db6e5/dask/tests/test_distributed.py#L11-L14, #5300, #6775, #6802 (review)). This creates friction between the stability requirements of downstream users and our ability to adjust the contents ofutils_test
to fit our internal testing needs. For example, we cannot easily move functionality around without breaking things for downstream users (#6802 (review)).This leads me to several questions:
Should the contents of
utils_test.py
be considered part of the public API?If so:
If not:
The text was updated successfully, but these errors were encountered: