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

Add coverage to file_regex status check method #1511

Merged
merged 23 commits into from
Jul 11, 2023

Conversation

braeeast2001
Copy link
Collaborator

@braeeast2001 braeeast2001 commented Jul 3, 2023

Add test_file_regex to test_builders.py using regex_on_filename.yml.

Copy link
Collaborator

@szuananwar szuananwar left a comment

Choose a reason for hiding this comment

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

line 146: These is no file_regex.yml file in tutorials/test_status to link to, please make sure the name of yml file is correct.

tests/builders/test_builders.py Outdated Show resolved Hide resolved
Corrected file name
@braeeast2001 braeeast2001 changed the title Update test_builders.py to add file_regex status check Add coverage to file_regex status check method Jul 5, 2023
Corrected file name
@codecov
Copy link

codecov bot commented Jul 5, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.44 🎉

Comparison is base (bf48aa1) 77.54% compared to head (b6c62b2) 77.97%.

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

Additional details and impacted files
@@            Coverage Diff             @@
##            devel    #1511      +/-   ##
==========================================
+ Coverage   77.54%   77.97%   +0.44%     
==========================================
  Files          57       57              
  Lines        6615     6615              
==========================================
+ Hits         5129     5158      +29     
+ Misses       1486     1457      -29     

see 2 files with indirect coverage changes

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

Copy link
Collaborator

@szuananwar szuananwar left a comment

Choose a reason for hiding this comment

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

Please change the comment in 143 to match with the correct yml file name that will be linked for test.

Fixed comment in line 143
Copy link
Collaborator

@szuananwar szuananwar left a comment

Choose a reason for hiding this comment

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

The comment in the methods matches the linked yml file.

@szuananwar
Copy link
Collaborator

@braeeast2001 for style check, please run buildtest sytle -a
see this for more info: https://buildtest.readthedocs.io/en/devel/contributing/code_contribution_guide.html

@shahzebsiddiqui shahzebsiddiqui marked this pull request as ready for review July 7, 2023 13:25
@braeeast2001 braeeast2001 linked an issue Jul 7, 2023 that may be closed by this pull request
2 tasks
@szuananwar
Copy link
Collaborator

@shahzebsiddiqui I think @braeeast2001 first should check if the file is exists in the directory then do a regex check. I think she should use this test https://github.com/buildtesters/buildtest/blob/devel/tutorials/test_status/exists.yml for her regression test. What do you think?

@braeeast2001 braeeast2001 deleted the Brae'zah_Patch branch July 9, 2023 15:51
@braeeast2001 braeeast2001 restored the Brae'zah_Patch branch July 9, 2023 16:37
@braeeast2001 braeeast2001 reopened this Jul 9, 2023
@@ -151,9 +151,20 @@ def test_multicompilers_with_script_schema():


def test_regex_check():
"""This test buildspec using status check with 'status_regex'"""
"""This test buildspec using status check with 'status_regex'"""
Copy link
Member

Choose a reason for hiding this comment

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

change status_regex -> regex in doc string

Create new test for valid file_name with invalid regex and correct spelling mistake
@pull-request-size pull-request-size bot added size/M and removed size/S labels Jul 11, 2023
Copy link
Collaborator

@szuananwar szuananwar left a comment

Choose a reason for hiding this comment

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

Thanks @braeeast2001 for making all the necessary changes.
The style check is failed, please run buildtest sytle -a
and see this for more info: https://buildtest.readthedocs.io/en/devel/contributing/code_contribution_guide.html

os.path.join(here, "regex_on_invalids.yml")],
buildspecs=[
os.path.join(here, "regex_on_filename.yml"),
os.path.join(here, "regex_on_invalids.yml"),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please delete the comma , before ]

@shahzebsiddiqui shahzebsiddiqui merged commit 78e23cf into buildtesters:devel Jul 11, 2023
27 of 29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add coverage for file_regex status check
3 participants