-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add create_test_data to public testing API #2690
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
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.
Thanks @TomNicholas 🙏
I am slightly reluctant about this because it would mean effectively freezing the output of this helper function. I guess that would probably be OK, but the design was never quite fully considered! |
We could add a |
Or we could have a public |
Why not just encourage users to copy/paste the helper function into their own codebases? This seems like a pretty good use case for copy/paste. Otherwise -- maybe we should think a little more carefully about what to include on the result. Or require explicitly providing a name for the desired dataset structure? E.g., |
Just because they aren't going to know it exists unless we put it in a public place I suppose? Happy to do any of those things, I just think that having some kind of public function/copyable code example etc is a simple thing for us to do that will make it just a bit easier for users who want to build upon xarray. |
I think putting an example that can be copied/pasted somewhere on the docs
in the "extending xarray" section would be a nice way to solve this.
…On Mon, Jan 21, 2019 at 11:18 AM Tom Nicholas ***@***.***> wrote:
Why not just encourage users to copy/paste the helper function into their
own codebases?
Just because they aren't going to know it exists unless we put it in a
public place I suppose?
Happy to do any of those things, I just think that having some kind of
public function/copyable code example etc is a simple thing for us to do
that will make it just a bit easier for users who want to build upon xarray.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2690 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABKS1vAzMMaKanBeW4AkUylnB7YqMg4Jks5vFaHogaJpZM4aHs0n>
.
|
The reason I had liked this was that I'm often creating a dataset manually, either in a repl or as a fixture in a test, and that added an overhead in both time and reduced consistency. But I can empathize re compatibility issues; I defer to @shoyer on the balance, or whether |
Maybe having a simple example available under just That said... if we're going to emesh this in our API lets at least think a little bit to make sure we cover most of the special cases we care about. I think we cover most of the dtypes we care about, but let's also add at least:
Anything else? We might also consider tweaking the names -- |
The only other features I could imagine adding would be a coord over multiple dimensions, and a multi-indexed dimension (but potentially we leave the latter out until we're completely confident about the conventions) Agree on the names! @TomNicholas if you want to split this up at all lmk |
In order to maintain a list of currently relevant issues, we mark issues as stale after a period of inactivity If this issue remains relevant, please comment here or remove the |
this has been unintentionally closed while renaming |
create_test_data()
public API? #2686 and Add simple array creation functions for easier unit testing #1839whats-new.rst
for all changes andapi.rst
for new API