Skip to content

Implement a conditional skip marker #62

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

Merged
merged 15 commits into from
Mar 9, 2021
Merged

Implement a conditional skip marker #62

merged 15 commits into from
Mar 9, 2021

Conversation

roecla
Copy link
Contributor

@roecla roecla commented Jan 30, 2021

Changes

Add a marker called skip_if that takes two arguments, a condition and a reason.
If the condition is True (or all conditions are True in case more than one skip_if marker is used) the task is skipped, else it is run normally.

Todo

  • Reference issues which can be closed due to this PR with "Closes #x".
  • Add test cases
  • Register and implement the marker
  • Test the marker in sid-germany.
  • Add a tutorial explaining the two skip decorators.
  • Document PR in docs/changes.rst.

@codecov
Copy link

codecov bot commented Jan 30, 2021

Codecov Report

Merging #62 (54579fd) into main (9f02b8e) will increase coverage by 0.11%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #62      +/-   ##
==========================================
+ Coverage   90.05%   90.17%   +0.11%     
==========================================
  Files          55       55              
  Lines        4596     4652      +56     
==========================================
+ Hits         4139     4195      +56     
  Misses        457      457              
Flag Coverage Δ
end_to_end 76.13% <100.00%> (+0.29%) ⬆️
integration 41.59% <14.03%> (-0.36%) ⬇️
unit 68.14% <17.54%> (-0.64%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/_pytask/skipping.py 100.00% <100.00%> (ø)
tests/test_skipping.py 95.23% <100.00%> (+2.83%) ⬆️

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 9f02b8e...05f3a55. Read the comment docs.

Copy link
Member

@tobiasraabe tobiasraabe left a comment

Choose a reason for hiding this comment

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

Hi Klara, the code is really well written, has tests and documentation! Thanks for great work. 🎉

And thanks for being the first contributor! 🎆

I added some comments to discuss some details. And could you add this PR to the Changes.rst as well as mentioning your handle with:ghuser:`roecla` ?

@tobiasraabe tobiasraabe added this to the v0.0.12 milestone Jan 30, 2021
@asottile
Copy link

asottile commented Mar 9, 2021

(sorry for drive-by) apologies for the slow pre-commit.ci run -- github gave us repeated 500s while trying to look up pull request information for this PR (and exhausted our retries). I've requeued it and it looks like it succeeded now.

@tobiasraabe
Copy link
Member

That is quite a suprise :). Thanks for stopping by and while you are here, thanks for pre-commit. A minor hiccup is nothing I think too long about given the tremendous benefits I get from the tool.

@tobiasraabe tobiasraabe merged commit d7903e9 into main Mar 9, 2021
@tobiasraabe tobiasraabe deleted the skip-if-marker branch March 9, 2021 22:51
@tobiasraabe tobiasraabe modified the milestones: v0.0.12, v0.0.13 Mar 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants