ewokssphinx 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ewokssphinx-0.1.0/LICENSE.md +20 -0
- ewokssphinx-0.1.0/PKG-INFO +65 -0
- ewokssphinx-0.1.0/README.md +18 -0
- ewokssphinx-0.1.0/pyproject.toml +40 -0
- ewokssphinx-0.1.0/setup.cfg +4 -0
- ewokssphinx-0.1.0/src/ewokssphinx/__init__.py +5 -0
- ewokssphinx-0.1.0/src/ewokssphinx/ewoks_task_directive.py +57 -0
- ewokssphinx-0.1.0/src/ewokssphinx/utils.py +13 -0
- ewokssphinx-0.1.0/src/ewokssphinx.egg-info/PKG-INFO +65 -0
- ewokssphinx-0.1.0/src/ewokssphinx.egg-info/SOURCES.txt +11 -0
- ewokssphinx-0.1.0/src/ewokssphinx.egg-info/dependency_links.txt +1 -0
- ewokssphinx-0.1.0/src/ewokssphinx.egg-info/requires.txt +10 -0
- ewokssphinx-0.1.0/src/ewokssphinx.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# MIT License
|
|
2
|
+
|
|
3
|
+
**Copyright (c) 2025 European Synchrotron Radiation Facility**
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
6
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
7
|
+
the Software without restriction, including without limitation the rights to
|
|
8
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
9
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
10
|
+
subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
17
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
18
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
19
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
20
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
|
+
Name: ewokssphinx
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Ewoks Sphinx directives
|
|
5
|
+
Author-email: ESRF <dau-pydev@esrf.fr>
|
|
6
|
+
License: # MIT License
|
|
7
|
+
|
|
8
|
+
**Copyright (c) 2025 European Synchrotron Radiation Facility**
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
11
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
12
|
+
the Software without restriction, including without limitation the rights to
|
|
13
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
14
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
15
|
+
subject to the following conditions:
|
|
16
|
+
|
|
17
|
+
The above copyright notice and this permission notice shall be included in all
|
|
18
|
+
copies or substantial portions of the Software.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
22
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
23
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
24
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
25
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
26
|
+
|
|
27
|
+
Project-URL: Homepage, https://gitlab.esrf.fr/workflow/ewoks/ewokssphinx/
|
|
28
|
+
Project-URL: Documentation, https://gitlab.esrf.fr/workflow/ewoks/ewokssphinx/-/blob/main/README.md
|
|
29
|
+
Project-URL: Repository, https://gitlab.esrf.fr/workflow/ewoks/ewokssphinx/
|
|
30
|
+
Project-URL: Issues, https://gitlab.esrf.fr/workflow/ewoks/ewokssphinx/issues
|
|
31
|
+
Project-URL: Changelog, https://gitlab.esrf.fr/workflow/ewoks/ewokssphinx/-/blob/main/CHANGELOG.md
|
|
32
|
+
Keywords: ewoks,sphinx
|
|
33
|
+
Classifier: Intended Audience :: Science/Research
|
|
34
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
35
|
+
Classifier: Programming Language :: Python :: 3
|
|
36
|
+
Requires-Python: >=3.8
|
|
37
|
+
Description-Content-Type: text/markdown
|
|
38
|
+
License-File: LICENSE.md
|
|
39
|
+
Requires-Dist: docutils
|
|
40
|
+
Requires-Dist: ewokscore==1.1.0
|
|
41
|
+
Provides-Extra: test
|
|
42
|
+
Requires-Dist: pytest>=7; extra == "test"
|
|
43
|
+
Provides-Extra: dev
|
|
44
|
+
Requires-Dist: ewokssphinx[test]; extra == "dev"
|
|
45
|
+
Requires-Dist: black>=25; extra == "dev"
|
|
46
|
+
Requires-Dist: flake8>=4; extra == "dev"
|
|
47
|
+
|
|
48
|
+
# ewokssphinx
|
|
49
|
+
|
|
50
|
+
A set of Sphinx directives for Ewoks
|
|
51
|
+
|
|
52
|
+
## Ewoks tasks directive
|
|
53
|
+
|
|
54
|
+
The `ewokstasks` directive will generate documentation automatically for the Ewoks **class** tasks contained in the module. As for `autodoc`, the module must be importable.
|
|
55
|
+
|
|
56
|
+
_Example_:
|
|
57
|
+
```
|
|
58
|
+
.. ewokstasks:: ewoksxrpd.tasks.integrate
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
It is also possible to give a pattern for recursive generation. For example, The following command will generate documentation for all class tasks contained in the modules of `ewoksxrpd.tasks`:
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
.. ewokstasks:: ewoksxrpd.tasks.*
|
|
65
|
+
```
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# ewokssphinx
|
|
2
|
+
|
|
3
|
+
A set of Sphinx directives for Ewoks
|
|
4
|
+
|
|
5
|
+
## Ewoks tasks directive
|
|
6
|
+
|
|
7
|
+
The `ewokstasks` directive will generate documentation automatically for the Ewoks **class** tasks contained in the module. As for `autodoc`, the module must be importable.
|
|
8
|
+
|
|
9
|
+
_Example_:
|
|
10
|
+
```
|
|
11
|
+
.. ewokstasks:: ewoksxrpd.tasks.integrate
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
It is also possible to give a pattern for recursive generation. For example, The following command will generate documentation for all class tasks contained in the modules of `ewoksxrpd.tasks`:
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
.. ewokstasks:: ewoksxrpd.tasks.*
|
|
18
|
+
```
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=46.4"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "ewokssphinx"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
keywords = ['ewoks', 'sphinx']
|
|
9
|
+
authors = [{ name = "ESRF", email = "dau-pydev@esrf.fr" }]
|
|
10
|
+
description = "Ewoks Sphinx directives"
|
|
11
|
+
readme = { file = "README.md", content-type = "text/markdown" }
|
|
12
|
+
license = { file = "LICENSE.md" }
|
|
13
|
+
classifiers = [
|
|
14
|
+
"Intended Audience :: Science/Research",
|
|
15
|
+
"License :: OSI Approved :: MIT License",
|
|
16
|
+
"Programming Language :: Python :: 3",
|
|
17
|
+
]
|
|
18
|
+
requires-python = ">=3.8"
|
|
19
|
+
dependencies = ["docutils", "ewokscore==1.1.0"]
|
|
20
|
+
|
|
21
|
+
[project.urls]
|
|
22
|
+
Homepage = "https://gitlab.esrf.fr/workflow/ewoks/ewokssphinx/"
|
|
23
|
+
Documentation = "https://gitlab.esrf.fr/workflow/ewoks/ewokssphinx/-/blob/main/README.md"
|
|
24
|
+
Repository = "https://gitlab.esrf.fr/workflow/ewoks/ewokssphinx/"
|
|
25
|
+
Issues = "https://gitlab.esrf.fr/workflow/ewoks/ewokssphinx/issues"
|
|
26
|
+
Changelog = "https://gitlab.esrf.fr/workflow/ewoks/ewokssphinx/-/blob/main/CHANGELOG.md"
|
|
27
|
+
|
|
28
|
+
[project.optional-dependencies]
|
|
29
|
+
test = ["pytest >=7"]
|
|
30
|
+
dev = ["ewokssphinx[test]", "black >=25", "flake8 >=4"]
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
[tool.setuptools]
|
|
34
|
+
package-dir = { "" = "src" }
|
|
35
|
+
|
|
36
|
+
[tool.setuptools.packages.find]
|
|
37
|
+
where = ["src"]
|
|
38
|
+
|
|
39
|
+
[tool.coverage.run]
|
|
40
|
+
omit = ['*/tests/*']
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
from docutils.parsers.rst import Directive
|
|
2
|
+
from docutils import nodes
|
|
3
|
+
from ewokscore.task_discovery import (
|
|
4
|
+
_iter_discover_tasks_from_modules,
|
|
5
|
+
_iter_modules_from_pattern,
|
|
6
|
+
)
|
|
7
|
+
|
|
8
|
+
from .utils import field
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class EwoksTaskDirective(Directive):
|
|
12
|
+
required_arguments = 1
|
|
13
|
+
optional_arguments = 0
|
|
14
|
+
final_argument_whitespace = True
|
|
15
|
+
option_spec = {}
|
|
16
|
+
has_content = False
|
|
17
|
+
|
|
18
|
+
def run(self):
|
|
19
|
+
|
|
20
|
+
module_pattern = self.arguments[0]
|
|
21
|
+
results = []
|
|
22
|
+
for module in _iter_modules_from_pattern(module_pattern):
|
|
23
|
+
for task in _iter_discover_tasks_from_modules(module, task_type="class"):
|
|
24
|
+
results.extend(
|
|
25
|
+
[
|
|
26
|
+
nodes.title(
|
|
27
|
+
text=task["task_identifier"].split(".")[-1],
|
|
28
|
+
),
|
|
29
|
+
nodes.paragraph(text=task["description"]),
|
|
30
|
+
nodes.field_list(
|
|
31
|
+
"",
|
|
32
|
+
nodes.field(
|
|
33
|
+
"",
|
|
34
|
+
nodes.field_name(text="Identifier"),
|
|
35
|
+
nodes.field_body(
|
|
36
|
+
"",
|
|
37
|
+
nodes.paragraph(
|
|
38
|
+
"",
|
|
39
|
+
"",
|
|
40
|
+
nodes.literal(text=task["task_identifier"]),
|
|
41
|
+
),
|
|
42
|
+
),
|
|
43
|
+
),
|
|
44
|
+
field("Task type", task["task_type"]),
|
|
45
|
+
field(
|
|
46
|
+
"Required inputs",
|
|
47
|
+
",".join(task["required_input_names"]),
|
|
48
|
+
),
|
|
49
|
+
field(
|
|
50
|
+
"Optional inputs",
|
|
51
|
+
",".join(task["optional_input_names"]),
|
|
52
|
+
),
|
|
53
|
+
field("Outputs", ",".join(task["output_names"])),
|
|
54
|
+
),
|
|
55
|
+
]
|
|
56
|
+
)
|
|
57
|
+
return results
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
|
+
Name: ewokssphinx
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Ewoks Sphinx directives
|
|
5
|
+
Author-email: ESRF <dau-pydev@esrf.fr>
|
|
6
|
+
License: # MIT License
|
|
7
|
+
|
|
8
|
+
**Copyright (c) 2025 European Synchrotron Radiation Facility**
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
11
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
12
|
+
the Software without restriction, including without limitation the rights to
|
|
13
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
14
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
15
|
+
subject to the following conditions:
|
|
16
|
+
|
|
17
|
+
The above copyright notice and this permission notice shall be included in all
|
|
18
|
+
copies or substantial portions of the Software.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
22
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
23
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
24
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
25
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
26
|
+
|
|
27
|
+
Project-URL: Homepage, https://gitlab.esrf.fr/workflow/ewoks/ewokssphinx/
|
|
28
|
+
Project-URL: Documentation, https://gitlab.esrf.fr/workflow/ewoks/ewokssphinx/-/blob/main/README.md
|
|
29
|
+
Project-URL: Repository, https://gitlab.esrf.fr/workflow/ewoks/ewokssphinx/
|
|
30
|
+
Project-URL: Issues, https://gitlab.esrf.fr/workflow/ewoks/ewokssphinx/issues
|
|
31
|
+
Project-URL: Changelog, https://gitlab.esrf.fr/workflow/ewoks/ewokssphinx/-/blob/main/CHANGELOG.md
|
|
32
|
+
Keywords: ewoks,sphinx
|
|
33
|
+
Classifier: Intended Audience :: Science/Research
|
|
34
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
35
|
+
Classifier: Programming Language :: Python :: 3
|
|
36
|
+
Requires-Python: >=3.8
|
|
37
|
+
Description-Content-Type: text/markdown
|
|
38
|
+
License-File: LICENSE.md
|
|
39
|
+
Requires-Dist: docutils
|
|
40
|
+
Requires-Dist: ewokscore==1.1.0
|
|
41
|
+
Provides-Extra: test
|
|
42
|
+
Requires-Dist: pytest>=7; extra == "test"
|
|
43
|
+
Provides-Extra: dev
|
|
44
|
+
Requires-Dist: ewokssphinx[test]; extra == "dev"
|
|
45
|
+
Requires-Dist: black>=25; extra == "dev"
|
|
46
|
+
Requires-Dist: flake8>=4; extra == "dev"
|
|
47
|
+
|
|
48
|
+
# ewokssphinx
|
|
49
|
+
|
|
50
|
+
A set of Sphinx directives for Ewoks
|
|
51
|
+
|
|
52
|
+
## Ewoks tasks directive
|
|
53
|
+
|
|
54
|
+
The `ewokstasks` directive will generate documentation automatically for the Ewoks **class** tasks contained in the module. As for `autodoc`, the module must be importable.
|
|
55
|
+
|
|
56
|
+
_Example_:
|
|
57
|
+
```
|
|
58
|
+
.. ewokstasks:: ewoksxrpd.tasks.integrate
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
It is also possible to give a pattern for recursive generation. For example, The following command will generate documentation for all class tasks contained in the modules of `ewoksxrpd.tasks`:
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
.. ewokstasks:: ewoksxrpd.tasks.*
|
|
65
|
+
```
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
LICENSE.md
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
src/ewokssphinx/__init__.py
|
|
5
|
+
src/ewokssphinx/ewoks_task_directive.py
|
|
6
|
+
src/ewokssphinx/utils.py
|
|
7
|
+
src/ewokssphinx.egg-info/PKG-INFO
|
|
8
|
+
src/ewokssphinx.egg-info/SOURCES.txt
|
|
9
|
+
src/ewokssphinx.egg-info/dependency_links.txt
|
|
10
|
+
src/ewokssphinx.egg-info/requires.txt
|
|
11
|
+
src/ewokssphinx.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ewokssphinx
|