Closed JakobGM closed 6 years ago
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
astrality/module.py | 60 | 61 | 98.36% | ||
astrality/actions.py | 137 | 145 | 94.48% | ||
<!-- | Total: | 616 | 625 | 98.56% | --> |
Totals | |
---|---|
Change from base Build 337: | 0.2% |
Covered Lines: | 3677 |
Relevant Lines: | 3761 |
This PR also contains a fix for paths that were considered relative although expanding environment variables made it absolute. Such as $XDG_CONFIG_HOME/something
. This has been fixed by expanding env vars before checking if the path is absolute or not.
I have now implemented all the features we have discussed above, and think we should merge it into master.
The new actions have been implemented in seperate Action
classes, and I am relatively satisfied with that part of the code. But the dispatch of these actions in the form of ModuleManager->Module->(Copy/Symlink/Stow)Action
resulted in a lot of duplicate application and test code.
It should probably be refactored at some point, perhaps by using getattr
a lot more, instead of defining seperate symlink
/copy
/stow
/...
methods on both Module
and ModuleManager
. That way we could delete a lot of duplicate code.
But for now it should suffice, I am tired of this issue :persevere:
It is now possible to:
) Filter which files are considered templates, and therefore should be compiled ) Rename template target names based on regex capture group *) Specify either 'symlink', 'copy', or 'ignore' when handling files that are not considered to be templates
I went with the
templates
andnon_templates
config syntax.Fixes #10.