Closed ardunn closed 6 years ago
Yes I am not sure where this get_setting should come from pycharm finds 3 different sources for it including matgendb.dbconfig is that the correct address? Also seems like MongoClient needs to be imported which is minor. What about _log? My guess is that get_database was moved to atomate.atomate.utils.utils recently but these functions are not imported?
@shyamd is this related to your refactoring to take out matgendb?
I presume it is an accident that it happens to break the competing builders technology? lol
Yeah, total accident. I thought I had the imports properly ported since the tests were all working out. Should be a simple fix.
These lines need to be copied over to atomate.atomate.utils.utils: https://github.com/materialsproject/pymatgen-db/blob/master/matgendb/dbconfig.py#L136-L213 Or we could just refactor in pymatgen-db as a dependency. There was just a long period of time in which pymatgen-db imports were causing conflicts so I thought it would be easier to just not rely on it since we don't rely the base query engine or vasp drone.
Erm, I am confused. Why are pymatgen-db causing conflicts on imports?
It was when the changes were made. Question for @computron: Shall I re-factor pymatgen-db as a dependency again or leave it out?
I think the get_settings() function usage in that atomate function is not doing much? is it functioning the same as a json.load()?
Also there is a line that says _log.warn(
which is going to be an error since _log
was never defined. And there is no docstring for that function. Sorry to say but that function is a train wreck...
(and Alireza's comment about MongoClient needing to be imported)
I suggest that people start using an IDE. It will put angry red underlines to prevent these kinds of errors.
this should be fixed. Any update?
@ardunn please check and close issue if fixed
Yes this is fixed.
System
Summary
Example code
Error message
Suggested solution (if any)
get_settings
? Not sure @albalu