Template#1
Conversation
|
@lucyleeow you'll want to set up CircleCI to do a build so we can see artifacts |
|
(let's start with getting that to work so we can easily iterate and review, we'll want it as part of the template anyway) |
|
@larsoner how do I get circleci to work on this PR....? I added a basic circleci |
|
You have to tell it to "build forked pull requests" in the settings on the circle site. Let me know if you can't find it and I can do it |
|
Next steps it would be good to have:
|
|
Should we merge this, or wait until that stuff is in place? I'm fine either way |
|
I can add to this PR and merge as one. Thanks! |
|
@larsoner I am a little lost as to how why the function Also I don't know why an empty backreferences_dir examples file is made for the function but seems to work perfect for the class (at least locally). |
|
Probably |
|
@larsoner The layout of the autodoc was fixed by adding 'sphinx.ext.napoleon' and 'sphinx.ext.intersphinx'. I did notice however, that The backreferences file for the function in the |
|
@larsoner backreferences works also if I import the function in the |
|
I'm not sure if this is a bug or if I am just doing it wrong. I think the case that doesn't work for me works in sklearn documentation. |
|
@lucyleeow these sound like bugs/limitations in the parsing code, somewhere in these functions: These are often a pain to debug, I think last time I needed to do it I added some |
|
Last thing I wanted to add was dealing with data files (discussed in sphinx-gallery/sphinx-gallery#565 (comment)). Not sure how best to do this. My plan would be to download data from a url (with urllib2) and save to a |
|
What |
How does this happen?
Sorry confused with what |
|
(I'm not very familiar with this area) |
|
See docs: https://mne.tools/dev/generated/mne.datasets.sample.data_path.html Eventually it gets set with set_config https://github.com/mne-tools/mne-python/blob/master/mne/datasets/utils.py#L212 This code is dense because we have a lot of datasets, you probably want to start with something simpler if possible |
|
Not confident I've done it right but I added a module with functions to download data to a file and save this location in a config file. Copied sklearn. |
|
Looks like it's working! This seems like a reasonable start to me. Things for an eventual todo (subsequent PRs when people want):
Someday packages that use dataset downloading (mne, nilearn, sklearn) should think about outsourcing data file downloading duties to a new third-party module. I think all packages have benefitted greatly from In any case, @lucyleeow I would say let's merge this and iterate in subsequent PRs |
|
I think all packages have benefitted greatly from sphinx-gallery being
a package, having some dataset_downloader (datasetter?) package that we
all could vendor
+1 on a single-file package that we can vendor. There are a lot of
goodies across the various packages. It might be hard to satisfy all,
though.
|
|
Optimistically I think that the sklearn/nilearn/MNE maintainers could fight amongst themselves long enough to make it happen :) I guess a natural place for this to live would be |
|
@larsoner added your suggestions in an issue. I'll merge then! |
|
@larsoner to clarify:
How does CircleCI relate to whether people (user?) have downloaded data locally? |
|
I'm thinking about the script output, which could give download status updates and also gives a time estimate for running the script. If the data file is downloaded during the script run, then the time estimate of the example is affected as is the output (it would eventually show "downloading..." or whatever if we made the downloader actually give updates). Downloading all example data before building docs will more accurately reflect what a user will experience if they have already downloaded the data. Also, downloading data first has been very helpful for MNE because then our 1.5 hr doc build will fail 10 minutes in if it can't download all of the necessary data, rather than it taking the full 1.5 hr for SG to fail and report the error. |
|
Yes that sounds useful. I was confused about how changing CircleCI affects doc building locally but I realise you mean building in CircleCI. |
Basic template.
Should I add:
Suggestions welcome.