Attribute `protocol` is part of the `Sample`, but unused
Could you please motivate the protocol
attribute on the Sample
class?
I'm a bit confused on reasons of having a sample know which protocol
they belong to. In theory, a database sample can participate in multiple dataset splits, so it is confusing to have this association at this level.
As a further note, you have:
Class X:
def __init__(self, a, b, c):
self.a = a
self.b = b
self.c = c
Class Y:
def __init__(self, a, b, c):
self.a = a
self.b = b
self.c = c
x = X(1, 2, 3)
y = Y(x.a, x.b, x.c)
Where as, if you'd like to associate things from X back to Y, you should just do that:
Class X:
def __init__(self, a, b, c):
self.a = a
self.b = b
self.c = c
Class Y:
def __init__(self, x):
self.x = x
@property
def a():
return self.x.a
x = X(1, 2, 3)
y = Y(x)
IOW, the Sample
class needs to know about the datadir
and protocol
so, it is better to associate the Sample
to the Database
object directly instead of the individual bits all the time.