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

Make `job_name` setting set the `-batch_name` for htcondor #79

Closed meliache closed 3 years ago

meliache commented 3 years ago

In #76 the job_name setting was introduced to optionally set the job_name parameter for LSF jobs, to give groups of jobs a meaningful name for easier checking the status of specific jobs via the CLI. HTCondor has an equivalent JobBatchName setting which can already in previous versions be set via the htcondor_settings dictionary, but for consistency, this PR also makes htcondor observe the existing job_name setting.

TODO's:

codecov-io commented 3 years ago

Codecov Report

Merging #79 (6fab09d) into main (8276f89) will increase coverage by 2.17%. The diff coverage is 75.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #79      +/-   ##
==========================================
+ Coverage   49.49%   51.67%   +2.17%     
==========================================
  Files          23       23              
  Lines        1398     1401       +3     
==========================================
+ Hits          692      724      +32     
+ Misses        706      677      -29     
Impacted Files Coverage Δ
b2luigi/batch/processes/htcondor.py 49.56% <75.00%> (+25.45%) :arrow_up:
b2luigi/batch/processes/gbasf2.py 18.23% <0.00%> (ø)
b2luigi/core/utils.py 72.10% <0.00%> (+1.05%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 8276f89...6fab09d. Read the comment docs.

meliache commented 3 years ago

Because codecov complained that the diff is less than 50% covered by tests, I added unittests to _create_htcondor_submit_file, so this PR grew much larger than expected, but at least I learned how to test BatchProcess class methods without having to instantiate the whole BatchProcess class, it would be easy in the future to test helper functions of other batch classes.