Skip to content
This repository was archived by the owner on Jun 6, 2025. It is now read-only.
This repository was archived by the owner on Jun 6, 2025. It is now read-only.

Improve usability of fishbowl #6

@t92549

Description

@t92549

Currently, there exists a single generate.py script which uses fishbowl to generate the core api code for gafferpy and put it into a directory where gafferpy expects it. However, there are bugs and usability issues with this.

Firstly, to generate fishbowl, a GafferConnector is used to connect to the rest api. However, this connector imports some gafferpy modules such as gafferpy.gaffer_operations, so it breaks if there is not an already existing generated library.

Another issue is that currently it is not very easy to use fishbowl to extend gafferpy with custom operations. Users would have to download the gafferpy source code, use the generate.py script, and then import that library from source instead.

It would be nice if perhaps a fishbowl command line interface could be used instead so that users could specify things like: location of the rest api, where to put generated files, which files to generate, and whether to just generate the additional classes or a whole gafferpy installation.
Rough example usage:

fishbowl --api "http://localhost:8080/myRest" --output ./fishbowl_classes/ --generate operations,predicates

As well as this, perhaps a special import feature can be made where users can at runtime generate specific classes from a rest-api and these will be used to overwrite the default gafferpy ones.
Rough example:

from gafferpy import gaffer as g
from fishbowl.fishbowl import Fishbowl

Fishbowl("http://localhost:8080/rest", type="in-memory", classes="operations")
g.CustomOp()

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions