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
developer contributing docs - llvm, sqlite3, sphinx-rtd-theme, and make html #7367
Changes from 6 commits
c727f0c
ad41a7b
75da906
363d9e8
51dba44
6e979d2
f4a67ef
9431bf3
3f408db
59e6da1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,10 +91,11 @@ recommend you use `conda <http://conda.pydata.org/miniconda.html>`_ to | |
create a dedicated development environment and install precompiled versions | ||
of those dependencies there. | ||
|
||
First add the Anaconda Cloud ``numba`` channel so as to get development builds | ||
of the llvmlite library:: | ||
First add the Anaconda Cloud ``numba`` and ``numba/label/dev`` | ||
channels so as to get development builds of the llvmlite library:: | ||
|
||
$ conda config --add channels numba | ||
$ conda config --add channels numba/label/dev | ||
|
||
Then create an environment with the right dependencies:: | ||
|
||
|
@@ -118,7 +119,7 @@ Once the environment is activated, you have a dedicated Python with the | |
required dependencies:: | ||
|
||
$ python | ||
Python 3.8.5 (default, Sep 4 2020, 07:30:14) | ||
Python 3.8.5 (default, Sep 4 2020, 07:30:14) | ||
[GCC 7.3.0] :: Anaconda, Inc. on linux | ||
Type "help", "copyright", "credits" or "license" for more information. | ||
|
||
|
@@ -260,6 +261,11 @@ and then running:: | |
from the root of the Numba repository. Now ``flake8`` will be run each time | ||
you commit changes. You can skip this check with ``git commit --no-verify``. | ||
|
||
.. note:: | ||
To use these pre-commit hooks on Windows, it may be necessary to copy | ||
``sqlite3.dll`` from ``C:\Users\<USER>\anaconda3\Library\bin`` to | ||
``C:\Users\<USER>\anaconda3\DLLs`` or modify your PATH (`source <https://stackoverflow.com/a/55642416/13697228>`_). | ||
|
||
Numba has started the process of using `type hints <https://www.python.org/dev/peps/pep-0484/>`_ in its code base. This | ||
will be a gradual process of extending the number of files that use type hints, as well as going from voluntary to | ||
mandatory type hints for new features. `Mypy <http://mypy-lang.org/>`_ is used for automated static checking. | ||
|
@@ -415,12 +421,12 @@ It is built with `Sphinx <http://sphinx-doc.org/>`_ and | |
`numpydoc <https://numpydoc.readthedocs.io/>`_, which are available using | ||
conda or pip; i.e. ``conda install sphinx numpydoc``. | ||
|
||
To build the documentation, you need the bootstrap theme:: | ||
To build the documentation, you need the bootstrap and rtd themes:: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this still accurate? RTD doesn't seem to install There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think it needs |
||
|
||
$ pip install sphinx_bootstrap_theme | ||
$ pip install sphinx_bootstrap_theme sphinx-rtd-theme | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Two comments here. First, I thought this was mis-spelling, since my personal makefile contains Judging from downloads, I would tend to argue that Also, I am not sure we actually need And it builds fine. IIRC I think we switched from the bootstrap to the rtd theme some time ago but the docs were not updated. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Interestingly, when I read this, I even though it was a mispelling on my part, but when I went to https://github.com/readthedocs/sphinx_rtd_theme it turns out their instructions state There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, I though this was There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, probably change this to |
||
|
||
You can edit the source files under ``docs/source/``, after which you can | ||
build and check the documentation:: | ||
build and check the documentation under ``docs/``:: | ||
|
||
$ make html | ||
$ open _build/html/index.html | ||
|
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.
I can't verify this due to lack of a developmental machine, is there anyone who can confirm this work?
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.
I'm assuming anyone means core devs, but for reference, this was necessary for me to do on Windows to get pre-commit hooks working after following the contrib directions as closely as possible.
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.
Well, yes, core devs (on a loose definition of the term), would be ideal. But I think we would also be satisfied with anyone other than the author confirming this. Thank you!
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.
I can't replicate the issue on Windows - this seems like a little bit of an odd situation to have got into, and I'd suggest we shouldn't include the note on the basis that the linked source doesn't provide enough background about what's going on here for it to be clear that this is generally good advice.
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.
Ok, maybe something weird on my end, then. Sounds good!
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.
Are you planning to remove this note?
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.
Sorry, yes, forgot about this one.
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.
pre-commit hooks in a conda environment on Windows have still been a huge pain. Unfortunately, my workaround has just been to uninstall the hooks in many cases.