-
Notifications
You must be signed in to change notification settings - Fork 39
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
Make datasets more easily loadable #61
base: main
Are you sure you want to change the base?
Conversation
One reason why I like being explicit is because we want users to be able to take the examples in the docs and apply it to their cases, which they can't really do if we are hard-coding specific examples with special methods. So I would personally prefer not to have this kind of convenience provided (to me, the data shouldn't be part of the package itself, it's an example file for the docs). On the other hand, I think we could consider allowing a filename to be passed to compute, which would already simplify a number of examples. |
Ok, you can make the final call here. I like being able to But it's just a preference, and I defer to you. Either way, I agree |
@ChrisBeaumont - I'll look into it a bit more. In this case, the reason why I think copying and pasting verbatim isn't particularly useful is because the user won't learn much more than what's already in the docs. IMHO they are most likely to copy and paste and modify, which means they want to use it on their own files. But I want to take some time to think about it and have a look over the examples you show. |
One likely use case where they won't care about using their own data is to get a handle on the data structure, the API, the impact of pruning parameters, etc. People may want to do that before they dive in with their own data. Just something to think about. |
After thinking about this a bit more, I agree that something like this would be handy, though I think we need to ensure we keep some of the initial examples with the full loading, and that we also make sure we provide links from time to time to say 'if you want to load your own dataset, see X'. I can try and work on this this afternoon based on what you have here. |
@ChrisBeaumont - could you rebase this, then I can open a pull request to your branch with suggestions. |
ok, done |
Oops, it looks like this will need rebasing again. Once you've done that, I'll open a pull request to your branch with suggestions - but in principle I now like this idea. I just think that the first time we show the example we should show the full thing and add a little paragraph explaining where the |
@ChrisBeaumont - here are a couple of ideas:
Then it shows more explicitly that the argument is a path. What do you think? |
I don't like What do you think about a function |
Ok, that sounds like a reasonable compromise - do you want to update the examples to show this? |
Summary of a chat we had at CfA with @ChrisBeaumont and @keflavich:
One option - the first time, show the full thing, then explain that in the rest of the docs, we use a convenience to replace the We decided to delay this until after 0.1 release. |
This is what I had in mind for #60 -- instead of asking users to download files like the Perseus extinction map, why not bundle it with the code with an easy loader function?