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 extraction when there are multiple reverts #127

Closed
wants to merge 1 commit into from

Conversation

he7d3r
Copy link
Contributor

@he7d3r he7d3r commented May 7, 2020

  • Invert the reverted status recursively
  • Add tests for the new behavior

See https://phabricator.wikimedia.org/T252152.

@he7d3r
Copy link
Contributor Author

he7d3r commented May 9, 2020

if verbose:
sys.stderr.write("r")
sys.stderr.flush()
else:
# This revision is not a revert. Get the new labels
# FIXME: what if last_labels contains labels from one of
# reverted edits?
new_labels = project_labels - last_labels
Copy link
Member

Choose a reason for hiding this comment

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

Since we're storing every single revision in revisions, we could possibly also store the labels and take a second pass looking for revisions that are not reverted.

@halfak halfak mentioned this pull request May 18, 2020
* Invert the reverted status recursively
* Add tests for the new behavior
@codecov-commenter
Copy link

codecov-commenter commented May 19, 2020

Codecov Report

Merging #127 into master will increase coverage by 0.13%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #127      +/-   ##
==========================================
+ Coverage   52.07%   52.21%   +0.13%     
==========================================
  Files          47       47              
  Lines        1373     1377       +4     
==========================================
+ Hits          715      719       +4     
  Misses        658      658              
Impacted Files Coverage Δ
articlequality/extractors/extractor.py 77.10% <100.00%> (+1.15%) ⬆️
articlequality/extractors/tests/test_ptwiki.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ab3b6c6...2476d22. Read the comment docs.

@halfak
Copy link
Member

halfak commented May 19, 2020

Merged as part of #129

@halfak halfak closed this May 19, 2020
@he7d3r he7d3r deleted the extractor-and-reverts branch May 19, 2020 21:30
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.

3 participants