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
Documentation #2
Comments
I get the fact its its sphinx, and that leads to problem of knocking out documentation on a machine with all libs installed, Am thinking of setting up a server to compile stuff and upload, as part of the open-geotechnical project which is all sphinx.. |
Taking a closer look I can see how building the docs can be confusing... or even impossible with the info that I've given! It is a little bit convoluted and I did it a while ago but having dug up some old notes here goes... Firstly on the python package index page for geotecha https://pypi.python.org/pypi/geotecha/0.1.4#building-the-docs I simply say "The geotecha docs can be build by running the following in the docs directory:" Within the docs folder read the readme.txt and create the symlink to the examples folder. (I've only ever done this on windows so have no idea how it would work on other systems). If the symlink already exists from the github clone/download, then I would delete it and create it again. I think you actually have to have geotecha installed because the sphinxext either uses some geotecha functionality, makes a directory of all the modules from the installed package, or both. Note I have tried building geotecha itself on python3.5 and python 3.6 but have so far failed so I'm sticking with python 3.4 for the moment (I have a py34 anaconda env). FYI on python 3.4 I've found it easiest to build geotecha after installing mingwpy (currently only working on python3.4 but apparently the way of the future of building fortran etc. extensions such as I have in geotecha; see few minutes of this Steve Dower PyCon2017 talk ) with the following run in the 'geotecha' folder containing setup.py:
OK now back to the docs. Delete the "docs_build" directory if it exists. Open the docs\api folder and delete everything in it (should just be rst files). These last steps are not strictly necessary but make for a clean build from scratch. Open a cmd prompt (again I've only done this on windows). In the docs folder containing make.bat use: You should now have a local copy of the html documentation in the _build directory. Open the geotecha\docs_build\html\index.html file to check. The real magic happens in the sphinxext py files for which I've long forgotten exactly what I did. A lot of adapting/copying from the matplotlib documentation I seem to remember. You will probably have to wade through them if you really want to know what is happening. I think docs_static\default.css is straight from matplotlib (at some point in the past???). Look for any rst file with an old modified/created date; these are likely hardcoded with all others generated through the sphinxext. Teh might be some customoisation of the docs\conf.py file. There are some python scripts in the geotecha\tools folder that do some doc operations manually. As for getting the docs (and the package itself) on pypi... In home directory create ".pyrc" file. (In windows name it ".pyrc." and the last "." will be removed.)
-note that if the password lines are missing, you will be prompted to enter one. However this will then throw an error. http://bugs.python.org/issue18454 . So basically you need the password in there. Now you need to register your package and upload to the test pypi site (run all this in the geotecha directory containing setup.py):
Test that pip can find the package by installing from pipy: Uploading docs to pypi (note the workarounds might not be needed any more???). We will upload to testpypi first to see if anything goes wrong.
I made a bat file upload_to_pypi.bat with the following commands (note this assumes py27 and py34 environments from Anaconda/conda): When ready remove the "test" from all references to testpypi and repeat the above commands for real! Useful links: |
umm.. ok captain, message recieved,, Its easier than u think it is.. |
I threw everything in for my own records as much as anything else. It boils down to 1. install geotecha, 2. run |
What is the current technique used for generating the documentation at http://pythonhosted.org//geotecha/
Want to contribute to the docs, and build them as am good at that..
The text was updated successfully, but these errors were encountered: