Skip to content

Commit 8452a9c

Browse files
committed
Get the documantation build process running
Adjust the package layout and script in a way, that they work within the readthedocs build process.
1 parent 9f2b7e3 commit 8452a9c

File tree

12 files changed

+106
-17
lines changed

12 files changed

+106
-17
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ __pycache__
33
*.pyc
44
/dist/
55
/build/
6-
/docs/
6+
/documentation/
77
_build/
88
latest.txt
99
next.txt

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ include challenges/version.txt
55
include HelloWorld/sample.txt
66
include HelloWorld/result.txt
77
recursive-include docs *
8+
recursive-include documentation *

README.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1+
12
==================
23
README: Challenges
34
==================
45

56
Library to assist programming, testing and execution of solutions for coding
67
challenges like those on stepik.org
78

9+
Find the full documentation at Readthedocs_.
10+
11+
.. _Readthedocs: http://challenges.readthedocs.io
12+
813
A Minimal Hello World Class <Add>
914
=================================
1015

bin/release

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,16 @@ def main():
88
# pathes
99
here = os.path.abspath(os.path.dirname(__file__))
1010
root = os.path.abspath(os.path.join(here, '..'))
11-
sphinx = os.path.join(root, 'sphinx/')
12-
docs = os.path.join(root, 'docs/')
11+
sphinx = os.path.join(root, 'docs/')
12+
docs = os.path.join(root, 'documentation/')
1313
dist = os.path.join(root, 'dist/')
14-
html_source = os.path.join(root, 'sphinx/_build/html/')
15-
html_target = os.path.join(root, 'docs/html/')
16-
epub_source = os.path.join(root, 'sphinx/_build/epub/')
17-
epub_target = os.path.join(root, 'docs/epub/')
18-
rst_challenges = os.path.join(sphinx, 'challenges.rst')
19-
rst_modules = os.path.join(sphinx, 'modules.rst')
20-
rst_hello = os.path.join(sphinx, 'HelloWorld.rst')
14+
html_source = os.path.join(sphinx, '_build/html/')
15+
html_target = os.path.join(docs, 'html/')
16+
epub_source = os.path.join(sphinx, '_build/epub/')
17+
epub_target = os.path.join(docs, 'epub/')
2118

2219
# commands
23-
genapi = 'sphinx-apidoc --doc-project="API" --force -o sphinx . setup.py ' \
24-
'release.py '
20+
genapi = 'sphinx-apidoc --doc-project="API" --force -o docs . setup.py'
2521
genhtml = 'make html'
2622
genepub = 'make epub'
2723
gendist = './setup.py sdist'
@@ -57,11 +53,6 @@ def main():
5753
with cd(root):
5854
os.system(gendist)
5955

60-
# cleanup autogenerated rst files
61-
os.remove(rst_challenges)
62-
os.remove(rst_hello)
63-
os.remove(rst_modules)
64-
6556
# Upload test
6657
print('Trying upload on TESTPYPI')
6758
with cd(root):

docs/HelloWorld.rst

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
HelloWorld package
2+
==================
3+
4+
Submodules
5+
----------
6+
7+
HelloWorld.HelloWorld module
8+
----------------------------
9+
10+
.. automodule:: HelloWorld.HelloWorld
11+
:members:
12+
:undoc-members:
13+
:show-inheritance:
14+
15+
HelloWorld.HelloWorldTestCase module
16+
------------------------------------
17+
18+
.. automodule:: HelloWorld.HelloWorldTestCase
19+
:members:
20+
:undoc-members:
21+
:show-inheritance:
22+
23+
24+
Module contents
25+
---------------
26+
27+
.. automodule:: HelloWorld
28+
:members:
29+
:undoc-members:
30+
:show-inheritance:
File renamed without changes.
File renamed without changes.

docs/challenges.rst

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
challenges package
2+
==================
3+
4+
Submodules
5+
----------
6+
7+
challenges.challenge module
8+
---------------------------
9+
10+
.. automodule:: challenges.challenge
11+
:members:
12+
:undoc-members:
13+
:show-inheritance:
14+
15+
challenges.conf module
16+
----------------------
17+
18+
.. automodule:: challenges.conf
19+
:members:
20+
:undoc-members:
21+
:show-inheritance:
22+
23+
challenges.main module
24+
----------------------
25+
26+
.. automodule:: challenges.main
27+
:members:
28+
:undoc-members:
29+
:show-inheritance:
30+
31+
challenges.runner module
32+
------------------------
33+
34+
.. automodule:: challenges.runner
35+
:members:
36+
:undoc-members:
37+
:show-inheritance:
38+
39+
challenges.scaffold module
40+
--------------------------
41+
42+
.. automodule:: challenges.scaffold
43+
:members:
44+
:undoc-members:
45+
:show-inheritance:
46+
47+
48+
Module contents
49+
---------------
50+
51+
.. automodule:: challenges
52+
:members:
53+
:undoc-members:
54+
:show-inheritance:
File renamed without changes.

0 commit comments

Comments
 (0)