Skip to content

Refactor to add Stat Trackers#3600

Open
sauravbanna wants to merge 44 commits intomasterfrom
sauravbanna/add_stat_trackers
Open

Refactor to add Stat Trackers#3600
sauravbanna wants to merge 44 commits intomasterfrom
sauravbanna/add_stat_trackers

Conversation

@sauravbanna
Copy link
Contributor

@sauravbanna sauravbanna commented Feb 14, 2026

Description

Refactors the stats module to add a trackers module, containing individual trackers, each responsible for tracking a specific part of the game state

This makes it more modular and easier to add more stats related logging in the future, as we can reuse the tracking logic in multiple places.

Testing Done

Compiles, and existing stats are tracked correctly

Resolved Issues

Length Justification and Key Files to Review

Review Checklist

It is the reviewers responsibility to also make sure every item here has been covered

  • Function & Class comments: All function definitions (usually in the .h file) should have a javadoc style comment at the start of them. For examples, see the functions defined in thunderbots/software/geom. Similarly, all classes should have an associated Javadoc comment explaining the purpose of the class.
  • Remove all commented out code
  • Remove extra print statements: for example, those just used for testing
  • Resolve all TODO's: All TODO (or similar) statements should either be completed or associated with a github issue

@sauravbanna sauravbanna marked this pull request as ready for review February 18, 2026 09:16
@Andrewyx Andrewyx changed the base branch from sauravbanna/add_fullsystem_stats to master February 26, 2026 22:10
Copy link
Member

@nycrat nycrat left a comment

Choose a reason for hiding this comment

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

Forgot to click submit review on saturday 🫡

Mostly just adding doc comments, especially constructors and public methods

Copy link
Member

Choose a reason for hiding this comment

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

should have doc comments

Copy link
Member

Choose a reason for hiding this comment

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

should have doc comments

Copy link
Member

Choose a reason for hiding this comment

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

should have doc comments

Copy link
Member

Choose a reason for hiding this comment

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

should have doc comment for __init__

Comment on lines +11 to +13
# tune these values to reduce noise in what is considered a kick
# higher values exclude noise such as dribbling or small movements of the ball
# but can exclude real kicks
Copy link
Member

Choose a reason for hiding this comment

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

tag TODO

callback: Callable[[bool, bool], None],
buffer_size: int = 5,
):
super().__init__(callback=callback, buffer_size=buffer_size)
Copy link
Member

Choose a reason for hiding this comment

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

should have doc comment for __init__

)

py_library(
name = "tracker_module",
Copy link
Member

Choose a reason for hiding this comment

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

potentially just name this library tracker and get rid of the other ones since we only really need to expose this library

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.

4 participants