[GSOC 2018 Project Thread]: Rotation formalism in 3 dimensions
Hi all, This will serve as the discussion thread for this year's GSoC project. In the spirit of hitting the ground running: 1. Development environment has been set up. No worries there. 2. I had initially created a sample implementation of the rotation API. However, due to community feedback and mentor feedback the design was overhauled and I thought it best to start the implementation from scratch. I do need some help: 1. Since this project will include documentation, I'm trying to build the docs. However, from the Makefile at scipy/doc it appears that python3.6 is required, whereas only python3.5 is available for my platform (Ubuntu 16.04 LTS). I generally try to avoid adding third-party repos unless absolutely required, so I am asking for help here. Is installing python3.6 the only solution, or will changing the PYVERS variable in the Makefile work? 2. Regarding the GSOC blog that needs to be set up, what is the preferred method/site/url for scipy? And what exactly should a blog post contain? I'm a bit unclear on those details. Regards, Aditya
Hi Aditya, About Python 3.6, you can set up a user (non-local) installation with Anaconda <https://www.anaconda.com/download/>, it's what I use to set up multiple different interpreters, one for each project. You won't need to modify or touch your system Python installation. If you want something more minimal, you can also go for Miniconda <https://conda.io/miniconda.html>. The latest version of conda doesn't require you to edit the path. Feel free to e-mail me personally if you need any more help. Hameer Abbasi On Tue, Apr 24, 2018 at 12:50 PM, Aditya Bharti <adibhar97@gmail.com> wrote:
Hi all, This will serve as the discussion thread for this year's GSoC project.
In the spirit of hitting the ground running:
1. Development environment has been set up. No worries there. 2. I had initially created a sample implementation of the rotation API. However, due to community feedback and mentor feedback the design was overhauled and I thought it best to start the implementation from scratch.
I do need some help:
1. Since this project will include documentation, I'm trying to build the docs. However, from the Makefile at scipy/doc it appears that python3.6 is required, whereas only python3.5 is available for my platform (Ubuntu 16.04 LTS). I generally try to avoid adding third-party repos unless absolutely required, so I am asking for help here. Is installing python3.6 the only solution, or will changing the PYVERS variable in the Makefile work? 2. Regarding the GSOC blog that needs to be set up, what is the preferred method/site/url for scipy? And what exactly should a blog post contain? I'm a bit unclear on those details.
Regards, Aditya
_______________________________________________ SciPy-Dev mailing list SciPy-Dev@python.org https://mail.python.org/mailman/listinfo/scipy-dev
1. Since this project will include documentation, I'm trying to build the docs. However, from the Makefile at scipy/doc it appears that python3.6 is required, whereas only python3.5 is available for my platform (Ubuntu 16.04 LTS). I generally try to avoid adding third-party repos unless absolutely required, so I am asking for help here. Is installing python3.6 the only solution, or will changing the PYVERS variable in the Makefile work?
I suspect 3.5 should work once you get it to use your Python binaries. I
doubt we have anything that is Python-3.6 specific (though there very well be some Python 3-isms that will not work on 2.7).
1. Regarding the GSOC blog that needs to be set up, what is the preferred method/site/url for scipy? And what exactly should a blog post contain? I'm a bit unclear on those details.
You can choose any blogging platform you want. Usually people use it to
give approximately weekly updates about progress, difficulties, successes, cool tricks, etc. See how it's mentioned here (and elsewhere in the student guide): https://google.github.io/gsocguides/student/time-management-for-students Eric
On Tue, Apr 24, 2018 at 8:40 AM, Eric Larson <larson.eric.d@gmail.com> wrote:
1. Since this project will include documentation, I'm trying to build the docs. However, from the Makefile at scipy/doc it appears that python3.6 is required, whereas only python3.5 is available for my platform (Ubuntu 16.04 LTS). I generally try to avoid adding third-party repos unless absolutely required, so I am asking for help here. Is installing python3.6 the only solution, or will changing the PYVERS variable in the Makefile work?
I suspect 3.5 should work once you get it to use your Python binaries. I doubt we have anything that is Python-3.6 specific (though there very well be some Python 3-isms that will not work on 2.7).
There's a PYVER=3.6 at the top of the Makefile. Simply doing `make html PYVER=3.5` should build the docs with your 3.5 install (if not, change that one line in the Makefile to say 3.5). Ralf
Regarding building the documentation, I was able to figure out that I needed to install sphinx separately. The HACKING.rst.txt file only mentions Numpy Cython and pytest as dependencies. I was able to get the make command running with `make html PYVER=3.5`, but I'm getting the follwing error:
Could not import extension numpydoc (exception: cannot import name 'Directive')
I'm sure I have the extension installed, since it's listed in the sphinx directory. Any idea what the problem is? On 24 April 2018 at 21:51, Ralf Gommers <ralf.gommers@gmail.com> wrote:
On Tue, Apr 24, 2018 at 8:40 AM, Eric Larson <larson.eric.d@gmail.com> wrote:
1. Since this project will include documentation, I'm trying to build the docs. However, from the Makefile at scipy/doc it appears that python3.6 is required, whereas only python3.5 is available for my platform (Ubuntu 16.04 LTS). I generally try to avoid adding third-party repos unless absolutely required, so I am asking for help here. Is installing python3.6 the only solution, or will changing the PYVERS variable in the Makefile work?
I suspect 3.5 should work once you get it to use your Python binaries. I doubt we have anything that is Python-3.6 specific (though there very well be some Python 3-isms that will not work on 2.7).
There's a PYVER=3.6 at the top of the Makefile. Simply doing `make html PYVER=3.5` should build the docs with your 3.5 install (if not, change that one line in the Makefile to say 3.5).
Ralf
_______________________________________________ SciPy-Dev mailing list SciPy-Dev@python.org https://mail.python.org/mailman/listinfo/scipy-dev
On Tue, Apr 24, 2018 at 11:36 AM, Aditya Bharti <adibhar97@gmail.com> wrote:
Regarding building the documentation, I was able to figure out that I needed to install sphinx separately. The HACKING.rst.txt file only mentions Numpy Cython and pytest as dependencies. I was able to get the make command running with `make html PYVER=3.5`, but I'm getting the follwing error:
Could not import extension numpydoc (exception: cannot import name 'Directive')
I'm sure I have the extension installed, since it's listed in the sphinx directory. Any idea what the problem is?
There seems to be something wrong with your install of either Sphinx or numpydoc. If it's missing completely, the traceback says: Could not import extension numpydoc (exception: No module named 'numpydoc') rather than complaining about "Directive". Possibly a mixup with versions? Also note that you're saying that you see numpydoc in the sphinx directory - did you mean in site-packages instead? That's where it should be: In [1]: import numpydoc In [2]: numpydoc.__file__ Out[2]: '/home/rgommers/anaconda3/lib/python3.6/site-packages/numpydoc/__init__.py' Ralf
On 24 April 2018 at 21:51, Ralf Gommers <ralf.gommers@gmail.com> wrote:
On Tue, Apr 24, 2018 at 8:40 AM, Eric Larson <larson.eric.d@gmail.com> wrote:
1. Since this project will include documentation, I'm trying to build the docs. However, from the Makefile at scipy/doc it appears that python3.6 is required, whereas only python3.5 is available for my platform (Ubuntu 16.04 LTS). I generally try to avoid adding third-party repos unless absolutely required, so I am asking for help here. Is installing python3.6 the only solution, or will changing the PYVERS variable in the Makefile work?
I suspect 3.5 should work once you get it to use your Python binaries. I doubt we have anything that is Python-3.6 specific (though there very well be some Python 3-isms that will not work on 2.7).
There's a PYVER=3.6 at the top of the Makefile. Simply doing `make html PYVER=3.5` should build the docs with your 3.5 install (if not, change that one line in the Makefile to say 3.5).
Ralf
_______________________________________________ SciPy-Dev mailing list SciPy-Dev@python.org https://mail.python.org/mailman/listinfo/scipy-dev
_______________________________________________ SciPy-Dev mailing list SciPy-Dev@python.org https://mail.python.org/mailman/listinfo/scipy-dev
There seems to be something wrong with your install of either Sphinx or numpydoc. If it's missing completely, the traceback says:
Could not import extension numpydoc (exception: No module named 'numpydoc')
rather than complaining about "Directive". Possibly a mixup with versions? Also note that you're saying that you see numpydoc in the sphinx directory - did you mean in site-packages instead? That's where it should be:
You're right, I meant in the site-packages directory. For me it's here: '/home/aditya/scipy-dev/lib/python3.5/site-packages/numpydoc/__init__.py'. /home/aditya/scipy-dev is my virtualenv for scipy. It uses python3.5. I tried making the docs outside the virtual environment, I'm getting the same error. For reference, I'm using: - python 3.5.2 - Sphinx version 1.7.3 - numpydoc version 0.8.0 - scipy version 1.0.0 / version 1.2.0.dev0+3988d44 (virtualenv)
On 24.04.2018 20:36, Aditya Bharti wrote:
Regarding building the documentation, I was able to figure out that I needed to install sphinx separately. The HACKING.rst.txt file only mentions Numpy Cython and pytest as dependencies. I was able to get the make command running with `make html PYVER=3.5`, but I'm getting the follwing error:
Could not import extension numpydoc (exception: cannot import name 'Directive')
Hello Aditya, I had the same problem with my setup. I'm still a little bit confused but I think the error was due to an old version of numpydoc trying use an import that didn't work with new versions of sphinx. I think got the old version with the git-submodules included in the doc-dirctory (can be downloaded with `git submodule update`). Anyway I got it to work by modifying the faulty import itself. Try to find the file numpydoc/numpydoc.py and try to find the line: from sphinx.util.compat import Directive If you can find that line you may be in luck because replacing that line with: from docutils.parsers.rst import Directive fixed it for me. I hope this helps. By the way, perhaps it would be useful to extend the doc/README.txt with a more thorough explanation of the build process and mention that the submodules can be downloaded with `git submodule update`. I only found out because I looked at guide for NumPy https://github.com/numpy/numpy/blob/master/doc/source/docs/howto_build_docs.... while trying to figure out the build process myself. Best regards, Lars
So I finally got the docs built. Couple of points which I think might be helpful to people building docs in the future: - You need to have sphinx installed in your working environment (native installation, virtualenv, conda, whatever). I did not see sphinx listed as a dependency online. Maybe it should be included in the HACKING.rst.txt file? - You do *NOT* need to have numpydoc installed on your system. Irrespective of where it is installed, the build process only uses the numpydoc package present under the sphinxext directory. I wasted a lot of hours trying to find which version of numpydoc was being used as I had it installed both in my virtualenv, and native installation; neither of those had the faulty import line. - After using `git submodule update` to get the latest sphinxext directory and numpydoc installation, the faulty import line in file doc/sphinxext/numpydoc/numpydoc.py needs to be changed. From
from sphinx.util.compat import Directive
to
from docutils.parsers.rst import Directive
Thank you Lars for pointing that out. - Finally, and this was my fault entirely, I had my virtual environment running python version 3.5.2, but as python3 or python. Calling python3.5 (as the Makefile was doing when I set PYVER=3.5) called the python executable in /usr/bin/python3.5, which couldn't find the sphinx module itself (as I didn't install it along with my native installation). Setting PYVER=3, or PYTHON=/path/to/python/in/virtualenv fixed this. On 25 April 2018 at 03:40, Lars G. <lagru@mailbox.org> wrote:
On 24.04.2018 20:36, Aditya Bharti wrote:
Regarding building the documentation, I was able to figure out that I needed to install sphinx separately. The HACKING.rst.txt file only mentions Numpy Cython and pytest as dependencies. I was able to get the make command running with `make html PYVER=3.5`, but I'm getting the follwing error:
Could not import extension numpydoc (exception: cannot import name 'Directive')
Hello Aditya,
I had the same problem with my setup. I'm still a little bit confused but I think the error was due to an old version of numpydoc trying use an import that didn't work with new versions of sphinx. I think got the old version with the git-submodules included in the doc-dirctory (can be downloaded with `git submodule update`).
Anyway I got it to work by modifying the faulty import itself. Try to find the file numpydoc/numpydoc.py and try to find the line:
from sphinx.util.compat import Directive
If you can find that line you may be in luck because replacing that line with:
from docutils.parsers.rst import Directive
fixed it for me. I hope this helps.
By the way, perhaps it would be useful to extend the doc/README.txt with a more thorough explanation of the build process and mention that the submodules can be downloaded with `git submodule update`. I only found out because I looked at guide for NumPy https://github.com/numpy/numpy/blob/master/doc/source/ docs/howto_build_docs.rst while trying to figure out the build process myself.
Best regards, Lars
_______________________________________________ SciPy-Dev mailing list SciPy-Dev@python.org https://mail.python.org/mailman/listinfo/scipy-dev
Blog update: I just got an email from PSF regarding the blogging. It appears that all blogs this year must be on the python-gsoc blogs site itself. So the blog for this project will live at https://blogs.python-gsoc.org/aditya-bharti/ . Regards, Aditya On 29 April 2018 at 09:40, Aditya Bharti <adibhar97@gmail.com> wrote:
So I finally got the docs built. Couple of points which I think might be helpful to people building docs in the future:
- You need to have sphinx installed in your working environment (native installation, virtualenv, conda, whatever). I did not see sphinx listed as a dependency online. Maybe it should be included in the HACKING.rst.txt file? - You do *NOT* need to have numpydoc installed on your system. Irrespective of where it is installed, the build process only uses the numpydoc package present under the sphinxext directory. I wasted a lot of hours trying to find which version of numpydoc was being used as I had it installed both in my virtualenv, and native installation; neither of those had the faulty import line. - After using `git submodule update` to get the latest sphinxext directory and numpydoc installation, the faulty import line in file doc/sphinxext/numpydoc/numpydoc.py needs to be changed. From
from sphinx.util.compat import Directive
to
from docutils.parsers.rst import Directive
Thank you Lars for pointing that out. - Finally, and this was my fault entirely, I had my virtual environment running python version 3.5.2, but as python3 or python. Calling python3.5 (as the Makefile was doing when I set PYVER=3.5) called the python executable in /usr/bin/python3.5, which couldn't find the sphinx module itself (as I didn't install it along with my native installation). Setting PYVER=3, or PYTHON=/path/to/python/in/virtualenv fixed this.
On 25 April 2018 at 03:40, Lars G. <lagru@mailbox.org> wrote:
On 24.04.2018 20:36, Aditya Bharti wrote:
Regarding building the documentation, I was able to figure out that I needed to install sphinx separately. The HACKING.rst.txt file only mentions Numpy Cython and pytest as dependencies. I was able to get the make command running with `make html PYVER=3.5`, but I'm getting the follwing error:
Could not import extension numpydoc (exception: cannot import name 'Directive')
Hello Aditya,
I had the same problem with my setup. I'm still a little bit confused but I think the error was due to an old version of numpydoc trying use an import that didn't work with new versions of sphinx. I think got the old version with the git-submodules included in the doc-dirctory (can be downloaded with `git submodule update`).
Anyway I got it to work by modifying the faulty import itself. Try to find the file numpydoc/numpydoc.py and try to find the line:
from sphinx.util.compat import Directive
If you can find that line you may be in luck because replacing that line with:
from docutils.parsers.rst import Directive
fixed it for me. I hope this helps.
By the way, perhaps it would be useful to extend the doc/README.txt with a more thorough explanation of the build process and mention that the submodules can be downloaded with `git submodule update`. I only found out because I looked at guide for NumPy https://github.com/numpy/numpy/blob/master/doc/source/docs/ howto_build_docs.rst while trying to figure out the build process myself.
Best regards, Lars
_______________________________________________ SciPy-Dev mailing list SciPy-Dev@python.org https://mail.python.org/mailman/listinfo/scipy-dev
Hi Aditya, About Blogging, I would suggest a GitHub fork with GitHub issues relating to what you are doing is an excellent way to keep track of what you’ve done and what you have yet to do. Best regards, Hameer Abbasi Sent from Astro <https://www.helloastro.com> for Mac On Apr 24, 2018 at 12:50, Aditya Bharti <adibhar97@gmail.com> wrote: Hi all, This will serve as the discussion thread for this year's GSoC project. In the spirit of hitting the ground running: 1. Development environment has been set up. No worries there. 2. I had initially created a sample implementation of the rotation API. However, due to community feedback and mentor feedback the design was overhauled and I thought it best to start the implementation from scratch. I do need some help: 1. Since this project will include documentation, I'm trying to build the docs. However, from the Makefile at scipy/doc it appears that python3.6 is required, whereas only python3.5 is available for my platform (Ubuntu 16.04 LTS). I generally try to avoid adding third-party repos unless absolutely required, so I am asking for help here. Is installing python3.6 the only solution, or will changing the PYVERS variable in the Makefile work? 2. Regarding the GSOC blog that needs to be set up, what is the preferred method/site/url for scipy? And what exactly should a blog post contain? I'm a bit unclear on those details. Regards, Aditya _______________________________________________ SciPy-Dev mailing list SciPy-Dev@python.org https://mail.python.org/mailman/listinfo/scipy-dev
participants (5)
-
Aditya Bharti
-
Eric Larson
-
Hameer Abbasi
-
Lars G.
-
Ralf Gommers