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

multivariant normalizing #2

Open
pappewaio opened this issue Aug 31, 2023 · 0 comments
Open

multivariant normalizing #2

pappewaio opened this issue Aug 31, 2023 · 0 comments

Comments

@pappewaio
Copy link

Would it be possible to add functionality to send multiple variants in the same api call?
https://github.com/mutalyzer/api/blob/master/mutalyzer_api/endpoints/normalize.py

Maybe doing something like this?

@ns.route("/normalize/<string:descriptions>")
class Normalizer(Resource):
    @ns.expect(_args)
    @errors
    def get(self, descriptions):
        """Normalize a set of variant descriptions."""
        # Split the descriptions using the delimiter
        individual_descriptions = descriptions.split('|')

        # Normalize each description separately
        results = [normalize(description, **_args.parse_args()) for description in individual_descriptions]

        return results

And then call it using /normalize/description1|description2|description3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant