Open schymans opened 4 years ago
Actually, from essm.variables.physics.thermodynamics import lambda_E
only imports lambda_E
, but all other variables in the same module are added to Variable.__registry__
, and then show up when using generate_metadata_table
(see #97).
Example:
from essm.variables import Variable
from essm.variables.utils import generate_metadata_table
class var1(Variable):
"""Test variable"""
print(Variable.__registry__)
from essm.variables.physics.thermodynamics import lambda_E
print(Variable.__registry__)
The first print command correctly only returns var1, but the second returns all variables from the thermodynamics module. @jirikuncar, do you know how to fix this?
For some reason,
from essm.variables.physics.thermodynamics import lambda_E
not only imports lambda_E but also all other variables in that module. This looks like a bug.