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

[refactor] Move builtins in a separate module file and improve make_test() #2470

Merged
merged 8 commits into from
Mar 15, 2022

Conversation

vkarak
Copy link
Contributor

@vkarak vkarak commented Mar 12, 2022

This PR moves all the builtins in the module reframe.core.builtins. This is to allow their use with the make_test() utility function that defines tests dynamically. Builtins that were manipulating the directly the namespace of the class were refactored so that they don't need to do it. There is one exception, which is also the only builtin that didn't move to the new module: the bind() builtin. This builtin needs to bind a free function to the test class and therefore needs to manipulate the test class namespace. Unit tests are also added to test make_test() with builtins. Finally, this PR moves all the documentation of the builtins in the source code avoiding duplication we had previously. The overall documentation for builtins is also slightly refactored.

This PR is a prerequisite for #2458.

Fixes #2427.

@pep8speaks
Copy link

pep8speaks commented Mar 12, 2022

Hello @vkarak, Thank you for updating!

Cheers! There are no PEP8 issues in this Pull Request!Do see the ReFrame Coding Style Guide

Comment last updated at 2022-03-15 19:16:20 UTC

@vkarak vkarak changed the title [refactor] Move builtins in a separate module file and improve make_test [refactor] Move builtins in a separate module file and improve make_test() Mar 12, 2022
@codecov-commenter
Copy link

codecov-commenter commented Mar 12, 2022

Codecov Report

Merging #2470 (3a5f03c) into master (2db7e2f) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #2470      +/-   ##
==========================================
+ Coverage   85.69%   85.70%   +0.01%     
==========================================
  Files          56       57       +1     
  Lines       10534    10544      +10     
==========================================
+ Hits         9027     9037      +10     
  Misses       1507     1507              
Impacted Files Coverage Δ
reframe/core/deferrable.py 98.21% <ø> (ø)
reframe/core/fixtures.py 100.00% <ø> (ø)
reframe/core/hooks.py 90.21% <ø> (ø)
reframe/core/parameters.py 95.68% <ø> (ø)
reframe/core/variables.py 96.30% <ø> (ø)
reframe/core/builtins.py 100.00% <100.00%> (ø)
reframe/core/meta.py 99.05% <100.00%> (-0.11%) ⬇️

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 2db7e2f...3a5f03c. Read the comment docs.

@vkarak
Copy link
Contributor Author

vkarak commented Mar 14, 2022

@jenkins-cscs retry daint

@vkarak vkarak merged commit ff28278 into reframe-hpc:master Mar 15, 2022
@vkarak vkarak deleted the refactor/move-builtins branch March 15, 2022 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move documentation of the various built-ins to the source code
4 participants