Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 4 commits into from
Apr 10, 2023

Conversation

meliache
Copy link
Collaborator

@meliache meliache commented Jan 8, 2022

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.

@meliache meliache added enhancement New feature or request gbasf2 Concerns the gbasf2/grid b2luigi wrapper labels Jan 8, 2022
@codecov-commenter
Copy link

codecov-commenter commented Jan 8, 2022

Codecov Report

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

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

📣 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
@@            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 Coverage Δ
b2luigi/basf2_helper/tasks.py 38.46% <0.00%> (+0.96%) ⬆️
b2luigi/batch/processes/gbasf2.py 49.15% <41.25%> (+2.92%) ⬆️
b2luigi/core/utils.py 73.60% <88.88%> (+0.44%) ⬆️
b2luigi/__init__.py 88.46% <100.00%> (ø)
b2luigi/basf2_helper/utils.py 100.00% <100.00%> (+20.00%) ⬆️
b2luigi/core/parameter.py 92.00% <100.00%> (+3.11%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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

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.
@meliache meliache force-pushed the feature/set-setup-file-directly branch from 95d7b40 to 715b355 Compare April 10, 2023 10:16
@meliache
Copy link
Collaborator Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request gbasf2 Concerns the gbasf2/grid b2luigi wrapper
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants