GreenScheduler / cats

CATS: the Climate-Aware Task Scheduler :cat2: :tiger2: :leopard:
https://greenscheduler.github.io/cats/
MIT License
47 stars 7 forks source link

Move processing of cli args and config file to separate module #77

Closed tlestang closed 3 months ago

tlestang commented 3 months ago

The configuration for cats is specified by both a config file and cli arguments. Values provided at the command line often override the values provided in the config file. It means there is a bit of work to be done in order to distil all that information into a fixed runtime configuration before cats can start making a request to a CI service. Namely, cats needs

This PR moves the processing required to set these three things (the cats runtime configuration) into a separate module configure that provides a single configure function as an entry point. Benefits are:

tlestang commented 3 months ago

Thanks for the pointers, I never had a chance to use a mock before. It does look a lot better.

tlestang commented 3 months ago

This is going in, thanks @abhidg and @sadielbartholomew for the review!