Skip to content

About

Plugins for Hypha.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

19 Commits

Folders and files

Repository files navigation

Hypha plugins

DJP plugins for Hypha.

Each directory is a separate Python package with its own dependencies and version, install only the plugins you need.

Plugin Description
hypha_translate Machine translation of submissions, using Argos Translate.

Installing a plugin

Install a plugin into Hypha's Python environment from its subdirectory of this repo, pinned to a release tag. With pip, e.g. in a deployment's requirements file:

hypha-translate @ git+https://github.com/HyphaApp/hypha-plugins@hypha_translate-v1.0.0#subdirectory=hypha_translate

With uv, in a Hypha checkout after uv sync:

uv pip install "hypha-translate @ git+https://github.com/HyphaApp/hypha-plugins@hypha_translate-v1.0.0#subdirectory=hypha_translate"

uv sync removes packages that are not in Hypha's lock file, so run the install again after it. uv run does not remove them.

Check each plugin's README for extra steps, e.g. hypha_translate needs the PyTorch CPU index.

Development

Hypha is not an installable package, so plugins are developed and tested inside a Hypha checkout. Clone this repo into Hypha's plugins/ directory (git ignored by Hypha) and install the plugins you work on in editable mode:

cd hypha
git clone git@github.com:HyphaApp/hypha-plugins.git plugins/hypha-plugins
uv sync
uv pip install -e plugins/hypha-plugins/hypha_translate

Run a plugin's tests from the Hypha root, so Hypha's pytest settings and conftest.py are used:

uv run pytest plugins/hypha-plugins/hypha_translate

Lint and format with the same Ruff setup as Hypha:

uvx ruff check . && uvx ruff format .

Adding a plugin

Create a new directory with a pyproject.toml (with a djp entry point) and the Django app package in it, see hypha_translate. Add the directory to the plugin matrix in .github/workflows/test.yml and to the table above.

Plugins can use Hypha's template hook points to add content to Hypha's pages.

Releases

Plugins are versioned and released independently. Bump version in the plugin's pyproject.toml and tag the release as <plugin directory>-v<version>, e.g. hypha_translate-v1.0.0.

About

Plugins for Hypha.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages