Skip to content
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

Add documentation uploading script #1082

Merged
merged 4 commits into from
Dec 23, 2016

Conversation

ghoshbishakh
Copy link
Contributor

upload_docs.py script builds documentation for the current version and uploads it to gh-pages branche of the dipy_web repository

@coveralls
Copy link

coveralls commented Jun 22, 2016

Coverage Status

Coverage remained the same at 82.88% when pulling 765542c on ghoshbishakh:upload_docs_to_dipy_web into 82573c7 on nipy:master.

@codecov-io
Copy link

codecov-io commented Jun 22, 2016

Current coverage is 80.96% (diff: 100%)

Merging #1082 into master will not change coverage

@@             master      #1082   diff @@
==========================================
  Files           205        205          
  Lines         23329      23329          
  Methods           0          0          
  Messages          0          0          
  Branches       2341       2341          
==========================================
  Hits          18889      18889          
  Misses         3958       3958          
  Partials        482        482          

Powered by Codecov. Last update 31bc6fe...b242d97

@quantshah
Copy link
Contributor

@ghoshbishakh
Hi, looks like you're working on documentation. Can you please have a look at #1022.

Running "make ipynbexamples" from the /doc folder generates all the "valid_examples" as .ipynb files in the folder "ipython_notebooks". The notebooks aren't executed though and all that this script does is convert the .py files in the "examples" directory to Ipython notebooks. This is pertaining to #720

@ghoshbishakh
Copy link
Contributor Author

ghoshbishakh commented Jun 22, 2016

@sahmed95 So we have to include the .ipynb files corresponding to each example it in the documentation somehow?

@quantshah
Copy link
Contributor

quantshah commented Jun 22, 2016

As @arokem mentioned in #720

And vice versa: enable writing examples in IPython notebooks, which then get converted into the compliant python + rst to get built into the documentation.
👍 1

However, I would prefer that we automate this, such that the notebooks get automatically generated when we build the documentation. That is, rather than committing all these notebooks to the repository, we would have a script that converts the python examples to jupyter notebooks, and uploads them together with the python example scripts, so they can be downloaded. Even better, a script that would automatically create/update a gist on github and create the nbviewer page would be fantastic.

Would it be possible to do this as a separate instruction in the doc Makefile, rather than part of running the examples?

For now, all I am suggesting is to automate things so that when we run make html it not only produces the .rst versions of the examples, but also the .ipynb versions.

So I wrote the script such that running make ipynbexamples generates the ipython notebooks.

This is the code : 0af58b5

@quantshah
Copy link
Contributor

I guess, the target is to build the ipython notebooks as one runs make html and produce the .rst versions of the examples and .ipynb notebooks and upload them.

Currently ipython notebooks are converted by running make ipynbexamples. So I guess you can help out by making this a part of make html and uploading the ipynb files as well after converting to .rst perhaps.

@ghoshbishakh
Copy link
Contributor Author

Okey.. understood. I will start working on it.

@quantshah
Copy link
Contributor

Thanks for taking this up.

@ghoshbishakh
Copy link
Contributor Author

@Garyfallidis @jchoude In Scikit image and Django website the docs are listed according to release versions and there is one version called "dev".
So in our case should I check if the version number has ".dev" at the end and put it as the latest dev version?

@jchoude
Copy link
Contributor

jchoude commented Jun 27, 2016

Yes I think that would be the bvest. However, I would default to showing the doc for te latest release as the default, since that is what most users will install.

@ghoshbishakh ghoshbishakh changed the title Add documentation uploading script WIP: Add documentation uploading script Jul 8, 2016
@coveralls
Copy link

coveralls commented Jul 8, 2016

Coverage Status

Coverage increased (+0.03%) to 82.908% when pulling 226a101 on ghoshbishakh:upload_docs_to_dipy_web into 82573c7 on nipy:master.

@jchoude
Copy link
Contributor

jchoude commented Jul 22, 2016

Hi @ghoshbishakh this is still set as WIP. What's the status?

@ghoshbishakh
Copy link
Contributor Author

@jchoude It is actually complete. May be we can merge it and make separate PRs later for bug fixes?

@Garyfallidis Garyfallidis changed the title WIP: Add documentation uploading script Add documentation uploading script Aug 10, 2016
@ghoshbishakh
Copy link
Contributor Author

@Garyfallidis can this be merged? If further changes are required in future then I will make separate PRs.


# paths
docs_repo_path = "_build/docs_repo"
docs_repo_url = "git@github.com:ghoshbishakh/dipy_web.git"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probably point to nipy/dipy_web.git

@jchoude
Copy link
Contributor

jchoude commented Aug 19, 2016

Except for my last comment, for me this is +1

upload_docs.py script builds documentation for the current version and uploads it to gh-pages branche of the dipy_web repository
@ghoshbishakh
Copy link
Contributor Author

@jchoude I have changed the repository url

@coveralls
Copy link

coveralls commented Aug 20, 2016

Coverage Status

Coverage remained the same at 83.025% when pulling 978db88 on ghoshbishakh:upload_docs_to_dipy_web into 31bc6fe on nipy:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 83.025% when pulling 978db88 on ghoshbishakh:upload_docs_to_dipy_web into 31bc6fe on nipy:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage remained the same at 83.025% when pulling 978db88 on ghoshbishakh:upload_docs_to_dipy_web into 31bc6fe on nipy:master.

@jchoude
Copy link
Contributor

jchoude commented Aug 22, 2016

Seems good to me. @ghoshbishakh Thanks.

@arokem @Garyfallidis anyone wants to have a quick look? Else I'll merge by the end of the week.

@jchoude
Copy link
Contributor

jchoude commented Aug 26, 2016

@ghoshbishakh Two things

  1. Can you rebase on master, please?

  2. Upon final review and testing, I realize that changing the repo_url to point to the normal dipy_web repo causes an issue: the gh-pages branch doesn't currently exist there. Can you please fix?

@ghoshbishakh
Copy link
Contributor Author

@jchoude I have rebased it on master. And added some error handeling.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 83.025% when pulling b242d97 on ghoshbishakh:upload_docs_to_dipy_web into 31bc6fe on nipy:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage remained the same at 83.025% when pulling b242d97 on ghoshbishakh:upload_docs_to_dipy_web into 31bc6fe on nipy:master.

@Garyfallidis
Copy link
Contributor

This looks good. Thanks for addressing the comments!

@Garyfallidis Garyfallidis merged commit 7a89ef1 into dipy:master Dec 23, 2016
ShreyasFadnavis pushed a commit to ShreyasFadnavis/dipy that referenced this pull request Sep 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants