Skip to content

BmiJulia easier to subclass. #145

@sverhoeven

Description

@sverhoeven

To subclass the BmiJulia class you now have to something like

class WflowBmi(BmiJulia):
    def __init__(self):
        m = self.from_name("Wflow.Model", implementation_name="Wflow.BMI")
        super().__init__(m.model, m.implementation)

See https://github.com/eWaterCycle/grpc4bmi/pull/144/files#r1374200483

It would be nicer if you could do

class WflowBmi(BmiJulia):
    def __init__(self):
        super().__init__("Wflow.Model", "Wflow.BMI")

Con: this makes init fat as it needs to call julia code +

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