Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve usability of fishbowl #6

Open
t92549 opened this issue Jul 29, 2022 · 0 comments
Open

Improve usability of fishbowl #6

t92549 opened this issue Jul 29, 2022 · 0 comments
Labels
advanced enhancement New feature or request

Comments

@t92549
Copy link
Contributor

t92549 commented Jul 29, 2022

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()
@t92549 t92549 added enhancement New feature or request advanced labels Jul 29, 2022
@t92549 t92549 transferred this issue from gchq/gaffer-tools Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
advanced enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant