Compare commits

..

2 Commits

Author SHA1 Message Date
Ferdinand Thiessen 6f35e17fba feat(plugins): Load metadata from entry points / distribution
ci/woodpecker/push/lint Pipeline was successful Details
ci/woodpecker/push/test Pipeline was successful Details
ci/woodpecker/pr/lint Pipeline was successful Details
ci/woodpecker/pr/test Pipeline was successful Details
2022-02-23 15:20:31 +01:00
Ferdinand Thiessen 2f4472e708 feat(docs): Added more documentation on plugins
ci/woodpecker/push/lint Pipeline was successful Details
ci/woodpecker/push/test Pipeline was successful Details
2022-02-23 15:19:45 +01:00
4 changed files with 21 additions and 2 deletions

3
.gitignore vendored
View File

@ -67,7 +67,8 @@ instance/
# Sphinx documentation # Sphinx documentation
docs/_build/ docs/_build/
docs/ # pdoc
docs/html
# PyBuilder # PyBuilder
target/ target/

View File

@ -0,0 +1,13 @@
# Plugin Development
## File Structure
- your_plugin/
- __init__.py
- ...
- ...
- setup.cfg
The basic layout of a plugin is quite simple, you will only need the `setup.cfg` or `setup.py` and
the package containing your plugin code, at lease a `__init__.py` file with your `Plugin` class.

View File

@ -8,7 +8,7 @@ import subprocess
"--output", "--output",
"-o", "-o",
help="Documentation output path", help="Documentation output path",
default="./docs", default="./docs/html",
type=click.Path(file_okay=False, path_type=pathlib.Path), type=click.Path(file_okay=False, path_type=pathlib.Path),
) )
@click.pass_context @click.pass_context

View File

@ -1,3 +1,8 @@
"""Flaschengeist Plugins
.. include:: docs/plugin_development.md
"""
from importlib_metadata import Distribution, EntryPoint from importlib_metadata import Distribution, EntryPoint
from werkzeug.datastructures import FileStorage from werkzeug.datastructures import FileStorage
from werkzeug.exceptions import MethodNotAllowed, NotFound from werkzeug.exceptions import MethodNotAllowed, NotFound