diff --git a/.gitignore b/.gitignore index 7417b864cb64e5f15899515fc9dfb9c1e4d5a4a7..b1fd13b1f195c4de0f39acc367862f88596dabd6 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ __pycache__/ /dist/ *.egg-info/ .eggs/ +/doc/_generated # Unittest / coverage *.py,cover diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3861fa77dae9aca2a6f592c197b9a951f86e2c81..2f28b8ca3b9a6dfc1ffe20ca779db10cc226a954 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,3 +3,9 @@ include: test-3.6: extends: ".test-3.6" + +deploy_docs: + extends: ".sphinx_and_artifacts" + +pages: + extends: ".pages" diff --git a/README.md b/README.md index 4fca54cb0fb95b6f2a8680259a134094ae248f79..b70839c6d5c68889385b954eda67ff8452979977 100644 --- a/README.md +++ b/README.md @@ -1 +1,20 @@ # EwoksDask: Dask binding for Ewoks + +ewoskdask provides distributed task scheduling for Ewoks workflows. + +## Install + +```bash +python -m pip install ewoksdask[test] +``` + +## Test + +```bash +pytest --pyargs ewoksdask.tests +``` + +## Documentation + +https://workflow.gitlab-pages.esrf.fr/ewoks/ewoksdask/ + diff --git a/doc/_templates/autosummary/class.rst b/doc/_templates/autosummary/class.rst new file mode 100644 index 0000000000000000000000000000000000000000..16ebb2f3386d241198f4c0c214561a1154170f9d --- /dev/null +++ b/doc/_templates/autosummary/class.rst @@ -0,0 +1,32 @@ +{{ fullname | escape | underline}} + +.. currentmodule:: {{ module }} + +.. autoclass:: {{ objname }} + :members: + :show-inheritance: + :inherited-members: + + {% block methods %} + .. automethod:: __init__ + + {% if methods %} + .. rubric:: {{ _('Methods') }} + + .. autosummary:: + {% for item in methods %} + ~{{ name }}.{{ item }} + {%- endfor %} + {% endif %} + {% endblock %} + + {% block attributes %} + {% if attributes %} + .. rubric:: {{ _('Attributes') }} + + .. autosummary:: + {% for item in attributes %} + ~{{ name }}.{{ item }} + {%- endfor %} + {% endif %} + {% endblock %} \ No newline at end of file diff --git a/doc/_templates/autosummary/module.rst b/doc/_templates/autosummary/module.rst new file mode 100644 index 0000000000000000000000000000000000000000..c0a391d420adf8f5727e695bb55f7d2b02f4b5c2 --- /dev/null +++ b/doc/_templates/autosummary/module.rst @@ -0,0 +1,64 @@ +{{ fullname | escape | underline}} + +.. automodule:: {{ fullname }} + + {% block attributes %} + {% if attributes %} + .. rubric:: Module Attributes + + .. autosummary:: + :toctree: + {% for item in attributes %} + {{ item }} + {%- endfor %} + {% endif %} + {% endblock %} + + {% block functions %} + {% if functions %} + .. rubric:: {{ _('Functions') }} + + .. autosummary:: + :toctree: + {% for item in functions %} + {{ item }} + {%- endfor %} + {% endif %} + {% endblock %} + + {% block classes %} + {% if classes %} + .. rubric:: {{ _('Classes') }} + + .. autosummary:: + :toctree: + {% for item in classes %} + {{ item }} + {%- endfor %} + {% endif %} + {% endblock %} + + {% block exceptions %} + {% if exceptions %} + .. rubric:: {{ _('Exceptions') }} + + .. autosummary:: + :toctree: + {% for item in exceptions %} + {{ item }} + {%- endfor %} + {% endif %} + {% endblock %} + +{% block modules %} +{% if modules %} +.. rubric:: Modules + +.. autosummary:: + :toctree: + :recursive: +{% for item in modules %} + {{ item }} +{%- endfor %} +{% endif %} +{% endblock %} \ No newline at end of file diff --git a/doc/api.rst b/doc/api.rst new file mode 100644 index 0000000000000000000000000000000000000000..9b51d07f109c3c8197f3e8034a80bcec5dcbde13 --- /dev/null +++ b/doc/api.rst @@ -0,0 +1,8 @@ +API documentation +================= + +.. autosummary:: + :toctree: _generated + :recursive: + + ewoksdask diff --git a/doc/conf.py b/doc/conf.py new file mode 100644 index 0000000000000000000000000000000000000000..73370c48ca649fdbfa03449e05c406b3ccf0366f --- /dev/null +++ b/doc/conf.py @@ -0,0 +1,19 @@ +"""rm -rf doc/_generated/; python setup.py build_sphinx -E -a +""" + +copyright = "2021, ESRF" +author = "ESRF" + +extensions = ["sphinx.ext.autodoc", "sphinx.ext.autosummary"] +templates_path = ["_templates"] +exclude_patterns = [] + +html_theme = "alabaster" +html_static_path = [] + +autosummary_generate = True +autodoc_default_flags = [ + "members", + "undoc-members", + "show-inheritance", +] diff --git a/doc/index.rst b/doc/index.rst new file mode 100644 index 0000000000000000000000000000000000000000..b99d1693307140c13edbfc33e63daf64c0e7e7d9 --- /dev/null +++ b/doc/index.rst @@ -0,0 +1,11 @@ +ewoskdask |release| +=================== + +ewoskdask provides distributed task scheduling for Ewoks workflows. + +ewoskdask has been developed by the `Software group `_ of the `European Synchrotron `_. + +.. toctree:: + :maxdepth: 2 + + api diff --git a/setup.cfg b/setup.cfg index bbaa0b0af3299101b3291efe992b5d0f6819489d..bab20d5e58bb1c3eac77a184caf72329342523b8 100644 --- a/setup.cfg +++ b/setup.cfg @@ -9,7 +9,9 @@ long_description_content_type = text/markdown license = MIT url = https://gitlab.esrf.fr/workflow/ewoks/ewoksdask project_urls = - Bug Tracker = https://gitlab.esrf.fr/workflow/ewoks/ewoksdask/-/issues + Source = https://gitlab.esrf.fr/workflow/ewoks/ewoksdask + Documentation = https://workflow.gitlab-pages.esrf.fr/ewoks/ewoksdask + Tracker = https://gitlab.esrf.fr/workflow/ewoks/ewoksdask/issues classifiers = Intended Audience :: Science/Research License :: OSI Approved :: MIT License @@ -33,6 +35,8 @@ dev = black flake8 %(test)s +doc = + sphinx # E501 (line too long) ignored for now # E203 and W503 incompatible with black formatting (https://black.readthedocs.io/en/stable/compatible_configs.html#flake8) @@ -41,3 +45,9 @@ ignore = E501, E203, W503 max-line-length = 88 exclude = .eggs + +[build_sphinx] +project = ewoksdask +version = attr: ewoksdask.__version__ +release = 0.1 +source-dir = ./doc