Move developer setup in a dedicated method
The general idea is to move all the code paths that are NOT for production execution out of configure
.
The configure
method should start with assert not self.is_read_only
. A new method named configure_for_developers
would do the opposite: not depending on Arkindex API calls to populate configuration, instead relying on local paths provided by CLI.
The CLI arguments declared on configure can be moved to __init__
. The self.add_arguments
can be moved to __init__
too.
The choice between BaseWorker.configure
and BaseWorker.configure_for_developers
will be done in ElementsWorker.configure
, depending on self.is_read_only
.