JakobGM / astrality

Astrality - A modular and dynamic configuration file manager
https://astrality.readthedocs.io
MIT License
98 stars 3 forks source link

Add "on_setup" action block #40

Closed JakobGM closed 6 years ago

JakobGM commented 6 years ago

This new action block allows you to specify actions that only needs to be executed once, such as installing dependencies, and so on.

At the moment, all setup actions are assumed to be executed at startup, and are therefore written to disk. If something fails during setup, Astrality will not run those actions again next time. The implementation allows to only save executed actions once they have been executed, but using that capability would require some more work/refactoring. I will postpone it for another time.

For now, it works in happy path, and you can always run astrality --reset-setup module_name if something did not pan out.

coveralls commented 6 years ago

Pull Request Test Coverage Report for Build 468


Files with Coverage Reduction New Missed Lines %
astrality/config.py 4 94.36%
astrality/filewatcher.py 4 97.06%
astrality/astrality.py 9 43.84%
<!-- Total: 17 -->
Totals Coverage Status
Change from base Build 450: -0.2%
Covered Lines: 3957
Relevant Lines: 4067

💛 - Coveralls