nils-braun / b2luigi

Task scheduling and batch running for basf2 jobs made simple
GNU General Public License v3.0
17 stars 11 forks source link

Use setting for gbasf2 setup file instead of install directory #162

Closed meliache closed 1 year ago

meliache commented 2 years ago

Usage of gbasf2_install_directory will cause a pending deprecation warning, but it can still be used and then the corresponding path to the setup.sh will be derived.

Rationale:

b2luigi only needs to know which file to source to get the correct environment. The location or name of that file withing a gbasf2 install directory can change between gbasf2 releases. Providing the file path directly results in more simplicity and flexibility.

Additional enhancement:

In addition, the setting is now only obtained in the Gbasf2Process class and not in the free helper functions, which now get the value via function arguments. With this, the setting can be provided via a Task class attribute and the value from the Task attribute will be used everywhere as expected. This resulted in much more boiler plate code, but also it made my helper function much more usable as library function without b2luigi settings.

codecov-commenter commented 2 years ago

Codecov Report

Patch coverage: 50.28% and project coverage change: +1.27 :tada:

Comparison is base (1ff3782) 59.20% compared to head (b61f948) 60.47%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #162 +/- ## ========================================== + Coverage 59.20% 60.47% +1.27% ========================================== Files 23 23 Lines 1554 1594 +40 ========================================== + Hits 920 964 +44 + Misses 634 630 -4 ``` | [Impacted Files](https://codecov.io/gh/nils-braun/b2luigi/pull/162?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Nils+Braun) | Coverage Δ | | |---|---|---| | [b2luigi/basf2\_helper/tasks.py](https://codecov.io/gh/nils-braun/b2luigi/pull/162?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Nils+Braun#diff-YjJsdWlnaS9iYXNmMl9oZWxwZXIvdGFza3MucHk=) | `38.46% <0.00%> (+0.96%)` | :arrow_up: | | [b2luigi/batch/processes/gbasf2.py](https://codecov.io/gh/nils-braun/b2luigi/pull/162?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Nils+Braun#diff-YjJsdWlnaS9iYXRjaC9wcm9jZXNzZXMvZ2Jhc2YyLnB5) | `49.15% <41.25%> (+2.92%)` | :arrow_up: | | [b2luigi/core/utils.py](https://codecov.io/gh/nils-braun/b2luigi/pull/162?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Nils+Braun#diff-YjJsdWlnaS9jb3JlL3V0aWxzLnB5) | `73.60% <88.88%> (+0.44%)` | :arrow_up: | | [b2luigi/\_\_init\_\_.py](https://codecov.io/gh/nils-braun/b2luigi/pull/162?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Nils+Braun#diff-YjJsdWlnaS9fX2luaXRfXy5weQ==) | `88.46% <100.00%> (ø)` | | | [b2luigi/basf2\_helper/utils.py](https://codecov.io/gh/nils-braun/b2luigi/pull/162?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Nils+Braun#diff-YjJsdWlnaS9iYXNmMl9oZWxwZXIvdXRpbHMucHk=) | `100.00% <100.00%> (+20.00%)` | :arrow_up: | | [b2luigi/core/parameter.py](https://codecov.io/gh/nils-braun/b2luigi/pull/162?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Nils+Braun#diff-YjJsdWlnaS9jb3JlL3BhcmFtZXRlci5weQ==) | `92.00% <100.00%> (+3.11%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Nils+Braun). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Nils+Braun)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

meliache commented 1 year ago

Partly addresses #195 in that this helps setting the setupfile directly. But it seems there are remaining issues with the current gbasf2 releases that are not fixed by this and I don't have time to fix that right now.