Open tplobo opened 1 year ago
I thought about this. I can see the advantage for materials that contain a lot of properties like tungsten. But some materials only have two or three.
Yes all the subfolders (submodules) need a __init__.py
file.
The properties need to be added to htm.database
somehow, we have two options, either add it at the level of the file were they were created, or from outside, but in any case, I can't see an "automatic" way of doing this. We have to manually write
Option 1:
from .alumina import my_diffusivity
htm.database.append(my_diffusivity)
Option 2:
my_diffusivity = htm.Diffusivity(........)
htm.database.append(my_diffusivity)
@tplobo any more thoughts about this?
As a suggestion to open the discussion on how to organize the database, perhaps the
property_database
folder should include folders for each material, and each these material folders should include files for the different property classes that are expected to be present in the package. These files should not be a requirement, however, since there might be no references for a particular property class for a given material. Files for treating/analyzing a particular reference (e.g. from WebPlotDigitizer) should be added to their own sub-folder. A file in the database folder could contain anupdate_database
(__init.py__
?) function to automatically add all properties inproperty_database
to the package. The tree below displays an example structure: