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

NF: Correct reps documentation #17964

Merged
merged 1 commit into from
Feb 16, 2025
Merged

Conversation

Arthur-Milchior
Copy link
Member

reps used to have a different meaning than today. I'd actually love to rename this variable, but it's the name used in upstream, so I guess it would not be accepted.

I considered adding more information, such as the fact that in practice, it mostly means that this value is reset when ankidroid restart, with maybe some exceptions. Or that we should only care about the difference between values at different point in time and not about the actual value of this variable. But actually it does not matter. It's only used for timebox and has 3 occurrences in the codebase. Any more documentation would be overkill.

Fixed #6830. Well actually, it was fixed in
7a65160 long ago, but the documen tation did not reflect that. So let's claim I just fixed a 5 yo bug!

@david-allison
Copy link
Member

david-allison commented Feb 12, 2025

reps used to have a different meaning than today. I'd actually love to rename this variable, but it's the name used in upstream, so I guess it would not be accepted.

Rename it, it's deprecated upstream: https://github.com/ankitects/anki/blob/038d85b1d9e1896e93a3e4a26f600c79ddc33611/pylib/anki/scheduler/v3.py#L43-L44

I'd prefer something which relates it to its intended usage in the timebox.

@david-allison david-allison added Needs Author Reply Waiting for a reply from the original author Needs Second Approval Has one approval, one more approval to merge labels Feb 12, 2025
@Arthur-Milchior
Copy link
Member Author

Seriously.
For once that I pay special attention to follow upstream in order not to get nitted, I've to change the name:p

@Arthur-Milchior Arthur-Milchior removed the Needs Author Reply Waiting for a reply from the original author label Feb 13, 2025
*/
var reps: Int = 0
var numberOfAnswerRecorded: Int = 0
Copy link
Member

Choose a reason for hiding this comment

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

I'm not an english native, but I find this a little odd to read. Not blocking, but I'll leave the final decision of merging to somebody else

Copy link
Member

@david-allison david-allison Feb 14, 2025

Choose a reason for hiding this comment

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

numberOfAnswersRecorded is the correction

@BrayanDSO does the fix still sound odd? recordedAnswerCount preferred?

Copy link
Member

Choose a reason for hiding this comment

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

numberOfAnswersRecorded is the correct one to my "ears"

Copy link
Member

Choose a reason for hiding this comment

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

👍

Copy link
Member

@mikehardy mikehardy left a comment

Choose a reason for hiding this comment

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

@Arthur-Milchior just no getting this through without little naming battles 😆
If you push a commit that uses numberOfAnswersRecorded I'd say merge at will

@mikehardy mikehardy added Needs Author Reply Waiting for a reply from the original author Pending Merge Things with approval that are waiting future merge (e.g. targets a future release, CI wait, etc) and removed Needs Second Approval Has one approval, one more approval to merge labels Feb 15, 2025
`reps` used to have a different meaning than today.
I'd actually love to rename this variable, but it's the name used in
upstream, so I guess it would not be accepted.

I considered adding more information, such as the fact that in
practice, it mostly means that this value is reset when ankidroid
restart, with maybe some exceptions. Or that we should only care about
the difference between values at different point in time and not about
the actual value of this variable. But actually it does not
matter. It's only used for timebox and has 3 occurrences in the
codebase. Any more documentation would be overkill.

Fixed ankidroid#6830. Well actually, it was fixed in
7a65160 long ago, but the documen tation did
not reflect that. So let's claim I just fixed a 5 yo bug!
Copy link
Member

@mikehardy mikehardy left a comment

Choose a reason for hiding this comment

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

I believe if there are naming nits and they are the only thing holding something back, it's okay to just finish them and push them and merge, so Arthur hopefully you agree - I pushed a change with the consensus numberOfAnswersRecorded name and I'm queueing this for merge

so none of us have to pay any more attention to it :-)

Cheers

@mikehardy mikehardy removed the Needs Author Reply Waiting for a reply from the original author label Feb 16, 2025
@mikehardy mikehardy enabled auto-merge February 16, 2025 13:36
@mikehardy mikehardy added this pull request to the merge queue Feb 16, 2025
Merged via the queue into ankidroid:main with commit 296c4d0 Feb 16, 2025
9 checks passed
@github-actions github-actions bot added this to the 2.21 release milestone Feb 16, 2025
@github-actions github-actions bot removed the Pending Merge Things with approval that are waiting future merge (e.g. targets a future release, CI wait, etc) label Feb 16, 2025
@Arthur-Milchior Arthur-Milchior deleted the reps branch February 17, 2025 09:58
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.

Number of reps increased in Card Content Provider get card
4 participants