Blame view

flaskr/laws/__init__.py 635 Bytes
18ba3d7a   Antoine Goutenoir   Boost the models'...
1
2
3

# @abc
class BaseEmissionModel():
a03065f3   Antoine Goutenoir   Squeeze in anothe...
4
    def __init__(self, config, shared_config):  # Constructor
18ba3d7a   Antoine Goutenoir   Boost the models'...
5
6
7
8
9
        self.name = config.name
        self.slug = config.slug
        self.color = config.color
        self.selected = config.selected
        self.config = config.config
a03065f3   Antoine Goutenoir   Squeeze in anothe...
10
11
        # Here you'll get what's under `model_shared_config:` in content.yml
        self.shared_config = shared_config
18ba3d7a   Antoine Goutenoir   Boost the models'...
12
13
14
15
16
17
18
19

    def __repr__(self):  # Cast to String
        return "Emission model\n" + \
               "==============\n" + \
               "%s (%s)" % (self.name, self.slug) + \
               repr(self.config)

    # def compute_travel_footprint()