Skip to content

Commit

Permalink
Change the listing of eotasks to a table that has eo tasks descriptions.
Browse files Browse the repository at this point in the history
  • Loading branch information
tomislijepcevic committed Jul 16, 2018
1 parent 9e2eae6 commit 3be7dd5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 20 deletions.
5 changes: 1 addition & 4 deletions docs/environment.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: eolearn-docs3

name: eolearn-docs
channels:
- conda-forge
- defaults

dependencies:
- python>=3.5
- rasterio
Expand Down
30 changes: 14 additions & 16 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
'sphinx.ext.inheritance_diagram',
'sphinx.ext.autosummary',
'nbsphinx',
'IPython.sphinxext.ipython_console_highlighting'
]
Expand Down Expand Up @@ -209,28 +210,25 @@ def get_eotasks():
import eolearn.core
import eolearn.coregistration
import eolearn.features
# import eolearn.geometry
# import eolearn.io
# import eolearn.mask
import eolearn.geometry
import eolearn.io
import eolearn.mask
import eolearn.ml_tools

return eolearn.core.EOTask.__subclasses__()


eotasks_str = " ".join([
eotask.__module__ + "." + eotask.__name__
for eotask in get_eotasks()
])

eotasks_file_content = '''
with open('eotasks.rst', 'w') as f:
f.write('''
********
EO Tasks
********
.. inheritance-diagram:: %s
:top-classes: eolearn.core.EOTask
:parts: 3
'''
.. currentmodule:: eolearn
.. autosummary::
:nosignatures:
''')

with open("eotasks.rst", "w") as f:
f.write(eotasks_file_content % eotasks_str)
for eotask in get_eotasks():
eotask_name = eotask.__module__[8:] + "." + eotask.__name__
f.write('\t' + eotask_name + '\n')

0 comments on commit 3be7dd5

Please sign in to comment.