Skip to content

Conversation

@agoujot
Copy link
Member

@agoujot agoujot commented May 25, 2025

Added just above the small/large edits.

Changes:

  • add auto-edits-tagged message for this
  • add a getTags method to autoeditshelper to just get the tag list
  • inject autoeditshelper into editcountercontroller and editcounter
  • get the revision tags in getEditSizeData in editcounterrepository
  • add an editcounter method to use getEditSizeData and getTags to get how many edits are automated in the last 5000
  • add a row in the html table in general_stats.html.twig

Bug: T342402

@agoujot
Copy link
Member Author

agoujot commented May 25, 2025

I'm uncertain about the label: it really should be short, but it should be clearly said that this is an approximation. Meanwhile, I settled for Tagged (semi-)automated edits, but it's still longer than all the other labels.

@codecov
Copy link

codecov bot commented May 25, 2025

Codecov Report

❌ Patch coverage is 4.34783% with 22 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.28%. Comparing base (4b8eb28) to head (25554cd).
⚠️ Report is 183 commits behind head on main.

Files with missing lines Patch % Lines
src/Model/EditCounter.php 5.26% 18 Missing ⚠️
src/Helper/AutomatedEditsHelper.php 0.00% 4 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #532      +/-   ##
============================================
- Coverage     71.30%   69.28%   -2.03%     
- Complexity     1275     1326      +51     
============================================
  Files            46       46              
  Lines          3792     3998     +206     
============================================
+ Hits           2704     2770      +66     
- Misses         1088     1228     +140     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@agoujot
Copy link
Member Author

agoujot commented May 29, 2025

And I suppose the page join I removed was for T325492? I spose I might as well readd it.

agoujot added a commit that referenced this pull request Jul 23, 2025
This would also have been solved by a merge of #532 or #551 ; as these implement a cleaner separation between the raw data and the counts we're making. Until we get around to doing that, this is a simpler and smaller fix.
Copy link
Member

@MusikAnimal MusikAnimal left a comment

Choose a reason for hiding this comment

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

One tiny little requested change to the wikitext output. Otherwise this looks good and I'm happy to approve.

It'd be nice, but not required, to have a unit test to reinforce the EditCounter::countAutoEdits() method, and perhaps also AutomatedEditsHelper::getTags(). For the former, you could stub EditCounterRepository::getEditSizeData() to return the data structure we expect, and have it include a tag or two that we don't consider automated. You'll also need to stub AutomatedEditsHelper::getTags() to return tags we do consider automated. We only need a few examples: say, AWB, contenttranslation, and mobile edit. AWB counts as automated. contentranslation would also, except that it has contribs: true which I think means we don't want to count it? Then mobile edit is one we wouldn't count.

Let me know if you need help!

Co-authored-by: MusikAnimal <MusikAnimal@users.noreply.github.com>
@agoujot
Copy link
Member Author

agoujot commented Oct 21, 2025

@MusikAnimal : if you don't mind, I'd rather make that test after we merge this or #551 , because 551 already has the provider &c set up to do this. If we merge 551 then adapting this (relying on that) will be easy; if we merge this first I can add the tests to 551.

@agoujot agoujot requested a review from MusikAnimal October 21, 2025 09:33
@MusikAnimal MusikAnimal merged commit 7fb5a55 into x-tools:main Oct 22, 2025
3 of 5 checks passed
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.

2 participants