Closed JakobGM closed 6 years ago
So the astrality --modules
process should run independently of a potentially already running main astrality process? Yes I can work on this
Yes, I think that makes the most sense. Let's say I have already Astrality running in the background. Then I would like to test out a new module. I think that should not kill my already existing background process.
I did some refactoring recently which made this change quite easy, so I took the liberty to implement the feature myself ;)
You should be able to run
astrality --module MODULE1 MODULE2 MODULE3
in order to quickly run specific module(s). That way you could check out some other astrality module by runningastrality -m github::jakobgm/polybar
in order to effortlessly try modules created by others.It should not be too hard to implement. You would need to
argparse
argument here.astrality.astrality.main
.main
. It could have default valueenabled_modules: str = ''
.kill_processes: bool = True
tomain
and set it toFalse
when using the--modules
option? This way, you could run specific modules on top of the already running instance of astrality.The testing strategy could be to unit-test
astrality.astrality.main
while monkey patching the return value ofos.environ['ASTRALITY_CONFIG_HOME']
to some configuration directory which contains a module with some easily testable side-effect. Perhapsrun: shell: 'touch touched.tmp'
? Monkey patchingos.environ
is explained here.Is this something you would like to implement, @sshashank124?