Skip to content

Improve test coverage of sync.py#1936

Merged
Aratz merged 13 commits into
nf-core:devfrom
Aratz:dev
Oct 12, 2022
Merged

Improve test coverage of sync.py#1936
Aratz merged 13 commits into
nf-core:devfrom
Aratz:dev

Conversation

@Aratz

@Aratz Aratz commented Oct 11, 2022

Copy link
Copy Markdown
Contributor

This PR improves the code coverage of the sync module and fixes a couple of bugs along the way.

Only the sync function remains untested but this one is kind of a beast so I leave it for now.

Closes #1913

PR checklist

  • This comment contains a description of changes (with reason)
  • CHANGELOG.md is updated
  • If you've fixed a bug or added code that should be tested, add tests!

Aratz added 8 commits October 11, 2022 16:48
There was a bug in this function: because `self.merge_branch` was used
to store the new branch name, it was stored persistently in the `psync`
object. Hence when a new branch was created, the branch number was
appended several times, e.g. `original_merge_branch-2-3-4`.
@Aratz Aratz self-assigned this Oct 11, 2022
@codecov

codecov Bot commented Oct 11, 2022

Copy link
Copy Markdown

Codecov Report

Merging #1936 (0fd13a0) into dev (c84dfb7) will increase coverage by 1.33%.
The diff coverage is 100.00%.

❗ Current head 0fd13a0 differs from pull request most recent head fb8fd60. Consider uploading reports for the commit fb8fd60 to get more accurate results

@@            Coverage Diff             @@
##              dev    #1936      +/-   ##
==========================================
+ Coverage   59.93%   61.26%   +1.33%     
==========================================
  Files          37       37              
  Lines        4677     4642      -35     
==========================================
+ Hits         2803     2844      +41     
+ Misses       1874     1798      -76     
Impacted Files Coverage Δ
nf_core/sync.py 77.77% <100.00%> (+26.30%) ⬆️
nf_core/lint/template_strings.py 87.50% <0.00%> (-8.34%) ⬇️
nf_core/modules/modules_repo.py 73.27% <0.00%> (-0.69%) ⬇️
nf_core/__main__.py 53.30% <0.00%> (-0.10%) ⬇️
nf_core/subworkflows/install.py 14.28% <0.00%> (+0.10%) ⬆️
nf_core/modules/modules_command.py 74.48% <0.00%> (+6.72%) ⬆️

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

@mirpedrol mirpedrol left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :)

Comment thread tests/test_sync.py
@Aratz Aratz merged commit 3db6e4b into nf-core:dev Oct 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants