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

fix: add celery tasks for idnits2 and bibxml file generation#7204

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

russhousley
Copy link
Collaborator

Add celery tasks for idnits2 and bibxml file generation. Fixes #7192

Copy link

codecov bot commented Mar 16, 2024

Codecov Report

Attention: Patch coverage is 75.67568% with 18 lines in your changes are missing coverage. Please review.

Project coverage is 88.91%. Comparing base (187c2c5) to head (042c6b4).
Report is 71 commits behind head on main.

❗ Current head 042c6b4 differs from pull request most recent head 01753af. Consider uploading reports for the commit 01753af to get more accurate results

Files Patch % Lines
ietf/doc/tasks.py 73.17% 11 Missing ⚠️
ietf/doc/utils.py 78.78% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7204      +/-   ##
==========================================
- Coverage   88.98%   88.91%   -0.08%     
==========================================
  Files         291      291              
  Lines       40717    41137     +420     
==========================================
+ Hits        36233    36577     +344     
- Misses       4484     4560      +76     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@jennifer-richards jennifer-richards left a comment

Choose a reason for hiding this comment

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

One typo, one small change I think we should make.

write_bibxml_file_if_changed(ref_rev_file_name, bibxml)
except Exception as ee:
log.log('\n%s-%s: %s\n' % (e.doc.name, e.doc.rev, str(ee)))
raise ee
Copy link
Member

Choose a reason for hiding this comment

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

Here and in bibxml_for_recent_drafts(), the re-raise of the exception is a change from the management command. In those, the exception was written to stderr and the script continued. The change means that the task will stop after an error.

I think we want to keep the old behavior (i.e., remove the raise ee here and on line 1299). I hope this doesn't contradict something we discussed at the code sprint. @russhousley do you recall?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sounds fine to me.

content = f.read()
self.assertIn(draft.title, content)

def test_generate_bibxml_files_for_recent_drafts_task_with_bad_vakue(self):
Copy link
Member

Choose a reason for hiding this comment

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

typo: vakue -> value

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Goof catch. I read past it many times.

Fix typo: bad_vakue -> bad_value
Don't raise error inbibxml_for_all_drafts
@NGPixel NGPixel changed the title Add celery tasks for idnits2 and bibxml file generation fix: add celery tasks for idnits2 and bibxml file generation Mar 21, 2024
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.

Create tasks to replace generate_* management commands
2 participants