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

feat: Modified format_checkers to add checker name to dictionary allow #1571

Merged
merged 6 commits into from
Mar 24, 2022

Conversation

yashugarg
Copy link
Contributor

fixes #1567

Copy link
Contributor

@BreadGenie BreadGenie left a comment

Choose a reason for hiding this comment

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

Looks good except for some changes. Also might as well add type hints.

@yashugarg
Copy link
Contributor Author

@BreadGenie how do i add type hints?

Copy link
Contributor

@terriko terriko left a comment

Choose a reason for hiding this comment

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

This is looking promising and I'm approving the CI workflow to run, but it's got a few things

I've got a few things I'd want:

  1. Update to the docs to explain what format_checker does. I'm not sure we have really comprehensive format_checker documentation, so this would likely be a little note in the contributor docs where it explains the linters and stuff.
  2. A test of the new behaviour (I'd be willing to have the test come in a separate PR if you think it's going to take a lot of work setting up mock or refactoring so the file write happens in a separate function.)

@yashugarg
Copy link
Contributor Author

This is looking promising and I'm approving the CI workflow to run, but it's got a few things

I've got a few things I'd want:

  1. Update to the docs to explain what format_checker does. I'm not sure we have really comprehensive format_checker documentation, so this would likely be a little note in the contributor docs where it explains the linters and stuff.
  2. A test of the new behaviour (I'd be willing to have the test come in a separate PR if you think it's going to take a lot of work setting up mock or refactoring so the file write happens in a separate function.)

@terriko Maybe I should make another PR for testing. I mean we could at least finalize this till I work on that?

@BreadGenie
Copy link
Contributor

BreadGenie commented Feb 8, 2022

@BreadGenie how do i add type hints?

Here's python docs on typing and an intro to get an idea. If you're familiar with any typed programming languages you'll be able to pick it up fairly easily.

Copy link
Contributor

@BreadGenie BreadGenie left a comment

Choose a reason for hiding this comment

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

The linting tests are failing maybe because you've yet to install pre-commit. See our contributing guide for installation

@yashugarg
Copy link
Contributor Author

@BreadGenie The linting test seems to work after I set up pre-commit, and I've removed the network request as requested. What are the next steps?

Copy link
Contributor

@terriko terriko left a comment

Choose a reason for hiding this comment

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

I'm re-approving CI to run. I'm basically just waiting on some documentation before this can be merged.

@yashugarg
Copy link
Contributor Author

yashugarg commented Feb 16, 2022

Alright I'll add some documentation for helper script!

@codecov-commenter
Copy link

codecov-commenter commented Feb 16, 2022

Codecov Report

Merging #1571 (7fa0a44) into main (a4e8de7) will decrease coverage by 0.33%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main    #1571      +/-   ##
==========================================
- Coverage   81.60%   81.27%   -0.34%     
==========================================
  Files         290      290              
  Lines        5790     5810      +20     
  Branches      953      957       +4     
==========================================
- Hits         4725     4722       -3     
- Misses        843      865      +22     
- Partials      222      223       +1     
Flag Coverage Δ
longtests 81.27% <0.00%> (-0.34%) ⬇️

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

Impacted Files Coverage Δ
cve_bin_tool/format_checkers.py 0.00% <0.00%> (ø)
cve_bin_tool/nvd_api.py 75.00% <0.00%> (-9.49%) ⬇️
cve_bin_tool/egg_updater.py 95.83% <0.00%> (-4.17%) ⬇️
cve_bin_tool/cvedb.py 71.94% <0.00%> (-0.28%) ⬇️
test/test_cvedb.py 58.53% <0.00%> (ø)
cve_bin_tool/cli.py 70.17% <0.00%> (+0.43%) ⬆️
cve_bin_tool/async_utils.py 93.75% <0.00%> (+2.08%) ⬆️

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

Copy link
Contributor

@terriko terriko left a comment

Choose a reason for hiding this comment

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

Still looking for some documentation update to go with this before it can be merged.

@yashugarg yashugarg changed the title feat: Modified format_checkers to add checker name to dictionary allow if needed feat: Modified format_checkers to add checker name to dictionary allow Mar 16, 2022
@yashugarg yashugarg requested a review from terriko March 16, 2022 18:23
Copy link
Contributor

@terriko terriko left a comment

Choose a reason for hiding this comment

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

Looks good now, thank you! This should be really handy going forwards.

@terriko terriko merged commit fd93c54 into intel:main Mar 24, 2022
@yashugarg yashugarg deleted the format_checkers branch July 5, 2022 19:01
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.

Modify format_checkers to add checker name to dictionary allow if needed?
4 participants