Skip to content

Refactor HisparcMessageFactory and add tests #14

@davidfokkema

Description

@davidfokkema

Lots of duplication and complex logic. I think we should create a generic MessageFactory which accepts a class and a message, and uses simpler logic. Then, create two factory functions: HisparcMessageFactory and GpsMessageFactory. They simply call the generic factory with their respective classes.

As for the complex logic: we can drop a while loop if we let strip_until_start_codon raise an exception if there is no start codon left in the buffer. And we can probably drop the recursive call, although that may be not be a problem. Anyway: simpler logic, and test the thing!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions