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

feature/cif3-output #2244

Merged
merged 11 commits into from
Apr 20, 2023
Merged

feature/cif3-output #2244

merged 11 commits into from
Apr 20, 2023

Conversation

mdavis332
Copy link
Contributor

This pull request intends to add a new output bot for sending indicators to a Collective Intelligence Framework v3 instance API.

Copy link
Member

@sebix sebix left a comment

Choose a reason for hiding this comment

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

Thank you very much @mdavis332 for this excellent PR, both in terms of code quality as well as in terms of usefulness. I believe CIF3 was long on the wish list for many users.

I can't review the correctness of the code and docs as I don't have the resources to create a testing infrastructure for this. Happy if someone else @certtools/intelmq-contributors could do that.
Only some small remarks on the code, see the comments.

docs/user/bots.rst Show resolved Hide resolved
intelmq/bots/outputs/cif3/output.py Outdated Show resolved Hide resolved
intelmq/bots/outputs/cif3/output.py Outdated Show resolved Hide resolved
intelmq/bots/outputs/cif3/output.py Outdated Show resolved Hide resolved
intelmq/bots/outputs/cif3/output.py Outdated Show resolved Hide resolved
intelmq/bots/outputs/cif3/output.py Outdated Show resolved Hide resolved
intelmq/bots/outputs/cif3/output.py Outdated Show resolved Hide resolved
intelmq/bots/outputs/cif3/output.py Show resolved Hide resolved
intelmq/bots/outputs/cif3/output.py Outdated Show resolved Hide resolved
intelmq/bots/outputs/cif3/output.py Outdated Show resolved Hide resolved
@sebix sebix added this to the 3.2.0 milestone Sep 20, 2022
@sebix sebix added feature Indicates new feature requests or new features component: bots labels Sep 20, 2022
@sebix sebix self-assigned this Sep 20, 2022
@sebix
Copy link
Member

sebix commented Sep 20, 2022

The pycodestyle test fails with:

intelmq/bots/outputs/cif3/output.py:12:80: W291 trailing whitespace
intelmq/bots/outputs/cif3/output.py:104:33: E127 continuation line over-indented for visual indent
intelmq/bots/outputs/cif3/output.py:105:33: E127 continuation line over-indented for visual indent
intelmq/bots/outputs/cif3/output.py:128:71: W291 trailing whitespace
intelmq/bots/outputs/cif3/output.py:129:21: E131 continuation line unaligned for hanging indent
intelmq/bots/outputs/cif3/output.py:130:17: W291 trailing whitespace
intelmq/bots/outputs/cif3/output.py:141:9: E303 too many blank lines (2)
intelmq/bots/outputs/cif3/output.py:174:14: E111 indentation is not a multiple of four
intelmq/bots/outputs/cif3/output.py:174:14: E117 over-indented
intelmq/bots/outputs/cif3/output.py:184:9: E303 too many blank lines (2)
intelmq/bots/outputs/cif3/output.py:196:1: W293 blank line contains whitespace
intelmq/bots/outputs/cif3/output.py:198:1: W293 blank line contains whitespace
intelmq/bots/outputs/cif3/output.py:201:5: E303 too many blank lines (3)
intelmq/bots/outputs/cif3/output.py:216:5: E303 too many blank lines (2)
intelmq/bots/outputs/cif3/output.py:233:1: W391 blank line at end of file

@codecov-commenter
Copy link

codecov-commenter commented Sep 21, 2022

Codecov Report

Merging #2244 (db97e75) into develop (1a7a339) will decrease coverage by 0.70%.
The diff coverage is 25.00%.

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

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@             Coverage Diff             @@
##           develop    #2244      +/-   ##
===========================================
- Coverage    76.91%   76.22%   -0.70%     
===========================================
  Files          454      456       +2     
  Lines        24120    24090      -30     
  Branches      3516     3812     +296     
===========================================
- Hits         18553    18362     -191     
- Misses        4793     4980     +187     
+ Partials       774      748      -26     
Impacted Files Coverage Δ
intelmq/bots/outputs/cif3/output.py 23.85% <23.85%> (ø)
intelmq/tests/bots/outputs/cif3/test_output.py 66.66% <66.66%> (ø)

... and 15 files with indirect coverage changes

@mdavis332
Copy link
Contributor Author

Thank you very much @mdavis332 for this excellent PR, both in terms of code quality as well as in terms of usefulness. I believe CIF3 was long on the wish list for many users.

Thanks @sebix for the thorough review. I've tried to resolve your suggestions or reply where feedback may still be helpful.

@sebix sebix modified the milestones: 3.2.0, 3.1.0 Dec 23, 2022
Copy link
Member

@sebix sebix left a comment

Choose a reason for hiding this comment

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

Thanks for the corrections. We're very close.

pycodestyle complains about:

intelmq/bots/outputs/cif3/output.py:96:17: E225 missing whitespace around operator
intelmq/bots/outputs/cif3/output.py:113:13: E128 continuation line under-indented for visual indent
intelmq/bots/outputs/cif3/output.py:114:13: E128 continuation line under-indented for visual indent
intelmq/bots/outputs/cif3/output.py:138:21: E131 continuation line unaligned for hanging indent
intelmq/bots/outputs/cif3/output.py:213:18: W291 trailing whitespace

intelmq/bots/outputs/cif3/output.py Outdated Show resolved Hide resolved
intelmq/bots/outputs/cif3/output.py Outdated Show resolved Hide resolved
intelmq/bots/outputs/cif3/output.py Show resolved Hide resolved
@sebix sebix removed this from the 3.1.0 milestone Feb 2, 2023
@mdavis332
Copy link
Contributor Author

Hi @sebix, apologies for the very long delay. I've tried to address the issues you noted. Please let me know if there's anything else you see that need to be finalized before merging.

@sebix
Copy link
Member

sebix commented Apr 20, 2023

I have fixed the remaining minor issues directly. After the tests pass, this PR is ready for merge

@sebix sebix merged commit 7674949 into certtools:develop Apr 20, 2023
@sebix
Copy link
Member

sebix commented Apr 20, 2023

Thank you very much, Michael, for the will to contribute in the first place and all your time creating this PR and your endurance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: bots feature Indicates new feature requests or new features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants