JeffersonLab / hps-mc

HPS MC toolkit
1 stars 6 forks source link

Add component level logging #352

Closed JeremyMcCormick closed 1 year ago

JeremyMcCormick commented 1 year ago

This PR adds component level logging. Additionally, the way configuration is loaded was changed so that initialization of the hpsmc package will create a global logger from which other module loggers may inherit. In testing, I found that the Job class could not be used without calling the function to parse command line arguments; I updated it so that it could be created manually without the need for argument parsing. There are a number of other small bug fixes and cleanup included in the PR as well.

I've tested the changes with a basic dummy job:

from hpsmc.component import DummyComponent
from hpsmc.job import Job

j = Job()
j.add(DummyComponent())
j.run()

I will test more extensively when I have a chance.

NOTE: PR is in draft mode until fully tested. Feel free to leave feedback in the meantime.