Skip to content

multivariant normalizing #2

@pappewaio

Description

@pappewaio

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions