I have a small but very infuriating problem with uploading ReadTheDoc and it is eating a lot of my travis-ci credits!
My project with the following architecture:
|-PyMieSim-|-tests-|-test0.py
| | |-test1.py
| | |-test2.py
| |
| |-docs-|-conf.py
| |-index.rst
In the index.rst files I would like to include the test0.py, test1.py and test2.py files. So in the index.rst I put something like:
.. literalinclude:: ../tests/test0.py
:language: python
:linenos:
Although it does compile and work locally with a "make html" it does not on ReadTheDocs. I know that RDT suggest to use relative path but as I can see the architecture change when upload and build remotely. So it becomes quite difficult to get the relative path if it won't be the same as locally. Is there a way to get the project root (PyMieSim folder) absolute path? Or maybe can I link the test files somewhere in the conf.py?
The best would be a method that works locally and remotely. If someone could help a bit with that I would be infinitely grateful!
EDIT:
Okay I finally got it to work, first thing is, my stupid browser was always looking into cache when looking at the new build of RTD, so it never really updated my git pushes (duh!). Shame on me for this one.
Also look like adding a __init__.py file into the tests directory and sub-directory helped to make it work. Shame on me for that one too!