Closed fgrunewald closed 1 year ago
@pckroon do you have any idea why in the current setup info messages wouldn't be printed? Warnings and Errors are info.
What do you mean by this? Do Warnings and Errors get logged as Info? Do Info entries not show up at all?
@pckroon do you have any idea why in the current setup info messages wouldn't be printed? Warnings and Errors are info.
What do you mean by this? Do Warnings and Errors get logged as Info? Do Info entries not show up at all?
the info doesn't show up at all
What's your loglevel and do you set that before parsing the ff files?
the default logleve is zero, which translates to logging.INFO. I thought that would be enough
Have you tried printing the molecule.logentries before trying to log them?
@pckroon so it seems that the info lines are not parsed because the log level evaluation does not evaluate to True. But I don't really understand why, since it also don't respond to adjustment of the Loglevel. Could it be that it imports the wrong Logger from vermouth and not polyply?
@pckroon regarding adding those tests for vermouth: the only problem is that in this case I can call the itp workflow from the library since it is a function. But for the vermouth tests we mostly run integration tests, for which the context capturing of the logs doesn't work.
I'm reasonably sure we have selective tests for ffinput.py in vermouth, but meh. Maybe later. Good intro project for new people that want to get involved maybe.
@pckroon sure for ffinput but this test here also checks that the whole thing propagates through he program and gets actually printed. The ffinput tests I can add no problem. But also good to get started indeed.
With vermouth v0.9.0 we can now have log-entries in ff-files. This implements such entries to polyply gen_params. One nice thing to use these for is to raise a warning whenever people are not applying termini to polymers or to print ff parameters in case they are not part of the default force-field.
@pckroon do you have any idea why in the current setup info messages wouldn't be printed? Warnings and Errors are info.