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: return same bibxml for versioned and versionless references #4470

Merged
merged 4 commits into from
Sep 19, 2022

Conversation

rjsparks
Copy link
Member

Fixes #4384.

Refactors bibxml production to remove repeated logic.

Abandons the half-implemented idea that returning information from the Submission object might be better than the Document or DocHistory objects.

Fixes ietf-tools#4384.

Refactors bibxml production to remove repeated logic.

Abandons the half-implemented idea that returning information
from the Submission object might be better than the Document or
DocHistory objects.

def bibxml_for_draft(doc, rev=None):

if rev != None and rev != doc.rev:
Copy link
Member Author

Choose a reason for hiding this comment

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

Since the refactor makes this non-obvious, the primary fix is on this line at and rev != doc.rev

# A future data cleanup would allow this to be simplified
best_event = best_events.order_by('-time').last()
log.assertion('doc.rev == best_event.rev')
doc.date = best_event.time.date()
Copy link
Member Author

Choose a reason for hiding this comment

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

This will have to be re-fixed when merged to feat/tzaware

Copy link
Member

Choose a reason for hiding this comment

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

Yep - I actually poked the code this replaces over on tzaware a couple hours ago. Oh well.

@codecov
Copy link

codecov bot commented Sep 16, 2022

Codecov Report

Merging #4470 (eca12f3) into main (d3f25a6) will decrease coverage by 0.01%.
The diff coverage is 80.64%.

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

@@            Coverage Diff             @@
##             main    #4470      +/-   ##
==========================================
- Coverage   88.43%   88.42%   -0.02%     
==========================================
  Files         296      296              
  Lines       39674    39684      +10     
==========================================
+ Hits        35086    35090       +4     
- Misses       4588     4594       +6     
Impacted Files Coverage Δ
ietf/doc/utils.py 88.12% <66.66%> (-0.46%) ⬇️
ietf/api/views.py 89.06% <100.00%> (+0.17%) ⬆️
ietf/doc/views_doc.py 90.88% <100.00%> (+0.34%) ⬆️
ietf/group/forms.py 91.41% <100.00%> (+0.16%) ⬆️
ietf/stats/utils.py 53.81% <100.00%> (ø)
ietf/submit/utils.py 93.60% <100.00%> (-0.02%) ⬇️
ietf/utils/fields.py 91.57% <100.00%> (+0.04%) ⬆️
ietf/utils/text.py 85.97% <0.00%> (-1.22%) ⬇️
ietf/utils/draft.py 71.29% <0.00%> (-0.32%) ⬇️
ietf/doc/views_search.py 89.02% <0.00%> (-0.21%) ⬇️
... and 1 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? 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.

Looks much better than it did! A couple comments inline.

ietf/doc/utils.py Outdated Show resolved Hide resolved
ietf/doc/utils.py Show resolved Hide resolved
# A future data cleanup would allow this to be simplified
best_event = best_events.order_by('-time').last()
log.assertion('doc.rev == best_event.rev')
doc.date = best_event.time.date()
Copy link
Member

Choose a reason for hiding this comment

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

Yep - I actually poked the code this replaces over on tzaware a couple hours ago. Oh well.

ietf/doc/utils.py Outdated Show resolved Hide resolved
@rjsparks rjsparks merged commit 7bc6f2b into ietf-tools:main Sep 19, 2022
@rjsparks rjsparks deleted the bibxml branch September 19, 2022 16:54
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bibxml reference files no longer show all the name information
2 participants