Metadata-Version: 2.4
Name: ewokssphinx
Version: 0.3.0
Summary: Ewoks Sphinx directives
Author-email: ESRF <dau-pydev@esrf.fr>
License: # MIT License
        
        **Copyright (c) 2025 European Synchrotron Radiation Facility**
        
        Permission is hereby granted, free of charge, to any person obtaining a copy of
        this software and associated documentation files (the "Software"), to deal in
        the Software without restriction, including without limitation the rights to
        use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
        the Software, and to permit persons to whom the Software is furnished to do so,
        subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
        FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
        COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
        IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
        CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
        
Project-URL: Homepage, https://gitlab.esrf.fr/workflow/ewoks/ewokssphinx/
Project-URL: Documentation, https://gitlab.esrf.fr/workflow/ewoks/ewokssphinx/-/blob/main/README.md
Project-URL: Repository, https://gitlab.esrf.fr/workflow/ewoks/ewokssphinx/
Project-URL: Issues, https://gitlab.esrf.fr/workflow/ewoks/ewokssphinx/issues
Project-URL: Changelog, https://gitlab.esrf.fr/workflow/ewoks/ewokssphinx/-/blob/main/CHANGELOG.md
Keywords: ewoks,sphinx
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Framework :: Sphinx :: Extension
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE.md
Requires-Dist: sphinx
Requires-Dist: ewokscore>=1.3.0
Provides-Extra: test
Requires-Dist: pytest>=7; extra == "test"
Provides-Extra: dev
Requires-Dist: ewokssphinx[test]; extra == "dev"
Requires-Dist: black>=25; extra == "dev"
Requires-Dist: flake8>=4; extra == "dev"
Dynamic: license-file

# ewokssphinx

A set of Sphinx directives for Ewoks

## Quick start

```bash
pip install ewokssphinx
```

Then, add `ewokssphinx` to the list of `extensions` in the Sphinx configuration file:

```python
# conf.py

...

extensions = [
    ...,
    "ewokssphinx"
]
```

## Contents

There is only one directive for now.

### Ewoks tasks directive

#### Basic use

The `ewokstasks` directive will generate documentation automatically for all Ewoks tasks (be it `class`, `method` or `ppfmethod`) contained in the module. As for `autodoc`, the module must be importable.


> ⚠️ The `ewokstasks` directive must be placed in the main section of the document! Do not place it in another directive (admonition or other) or the structure of the document may be broken! 


_Example_: 
```
.. ewokstasks:: ewoksxrpd.tasks.integrate
```

It is also possible to give a pattern for recursive generation. For example, The following command will generate documentation for all tasks contained in the modules of `ewoksxrpd.tasks`:

```
.. ewokstasks:: ewoksxrpd.tasks.*
```

#### Options

- `:task-type:`: (`class`, `method` or `ppfmethod`)

    Generates documentation only for the specified task type.

    _Example_:

    To generate documentation for the Ewoks **class** tasks in `ewoksxrpd.tasks.integrate`: 

    ```
    .. ewokstasks:: ewoksxrpd.tasks.integrate
        :task-type: class
    ```

- `:ignore-import-error:`

    Print a warning instead of raising an error when an import fails.

    _Example_:
    
    ```
    .. ewokstasks:: ewoksxrpd.tasks.integrate
        :ignore-import-error:
    ```
