slowbackspace / pygithub-labeler

MIT License
0 stars 0 forks source link

Docs build #4

Open hroncok opened 7 years ago

hroncok commented 7 years ago

Can I build the docs without API token?

slowbackspace commented 7 years ago

I don't think so (I was too lazy to use betamax again).

hroncok commented 7 years ago

The docs about how to build the docs are quite incomplete:

(env) [slowbackspace ((v0.5) %)]$ sphinx-apidoc -f -o docs pygithublabeler
bash: sphinx-apidoc: command not found
(env) [slowbackspace ((v0.5) %)]$ pip install sphinx
...
(env) [slowbackspace ((v0.5) %)]$ sphinx-apidoc -f -o docs pygithublabeler
Creating file docs/pygithublabeler.rst.
Creating file docs/modules.rst.
(env) [slowbackspace ((v0.5) %)]$ cd docs
(env) [docs ((v0.5) %)]$ export GITHUB_TOKEN=xxx
(env) [docs ((v0.5) %)]$ make doctest
sphinx-build -b doctest -d _build/doctrees   . _build/doctest
Running Sphinx v1.4.8
making output directory...

Extension error:
Could not import extension sphinxcontrib.napoleon (exception: No module named 'sphinxcontrib')
Makefile:199: „doctest“ failed
make: *** [doctest] Error 1
(env) [docs ((v0.5) %)]$ pip install sphinxcontrib-napoleon
...
(env) [docs ((v0.5) %)]$ make doctest
sphinx-build -b doctest -d _build/doctrees   . _build/doctest
Running Sphinx v1.4.8
loading pickled environment... not yet created
building [mo]: targets for 0 po files that are out of date
building [doctest]: targets for 5 source files that are out of date
updating environment: 5 added, 0 changed, 0 removed
reading sources... [100%] usage                                                                                                                                                                                                    
docs/pygithublabeler.rst:10: WARNING: autodoc: failed to import module 'pygithublabeler.run'; the following exception was raised:
Traceback (most recent call last):
  File "env/lib64/python3.5/site-packages/sphinx/ext/autodoc.py", line 519, in import_object
    __import__(self.modname)
  File "pygithublabeler/run.py", line 13, in <module>
    import requests
ImportError: No module named 'requests'
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
running tests...

Document: usage
---------------
**********************************************************************
File "usage.rst", line 4, in default (setup code)
Failed example:
    import pygithublabeler.run as l
    import os
    token = os.environ['GITHUB_TOKEN']
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib64/python3.5/doctest.py", line 1321, in __run
        compileflags, 1), test.globs)
      File "<doctest default (setup code)[0]>", line 1, in <module>
        import pygithublabeler.run as l
      File "pygithublabeler/run.py", line 13, in <module>
        import requests
    ImportError: No module named 'requests'
**********************************************************************
1 items had failures:
   1 of   1 in default (setup code)
***Test Failed*** 1 failures.

Doctest summary
===============
    0 tests
    0 failures in tests
    1 failure in setup code
    0 failures in cleanup code
build finished with problems, 1 warning.
Makefile:199: „doctest“ failed
make: *** [doctest] Error 1