Skip to content

Port all simulated c++ tests to python#3632

Open
nycrat wants to merge 37 commits intoUBC-Thunderbots:masterfrom
nycrat:avah/port_simulated_cpp_tests_to_python
Open

Port all simulated c++ tests to python#3632
nycrat wants to merge 37 commits intoUBC-Thunderbots:masterfrom
nycrat:avah/port_simulated_cpp_tests_to_python

Conversation

@nycrat
Copy link
Copy Markdown
Member

@nycrat nycrat commented Mar 1, 2026

Description

This PR ports all existing simulated gameplay c++ tests to python (while keeping original pytests)

  • Ported simulated c++ gameplay tests to python
  • Added some validations that were originally used in c++ tests

Ported Tests

Found using: rg SimulatedErForceSimPlayTestFixture and manual sorting

TACTIC TESTS TO PORT

  • src/software/ai/hl/stp/tactic/pivot_kick/pivot_kick_tactic_test.cpp
  • src/software/ai/hl/stp/tactic/crease_defender/crease_defender_tactic_test.cpp
  • src/software/ai/hl/stp/tactic/halt/halt_tactic_test.cpp
  • src/software/ai/hl/stp/tactic/move/move_tactic_test.cpp
  • src/software/ai/hl/stp/tactic/kick/kick_tactic_test.cpp
  • src/software/ai/hl/stp/tactic/chip/chip_tactic_test.cpp
  • src/software/ai/hl/stp/tactic/dribble/dribble_tactic_test.cpp
  • src/software/ai/hl/stp/tactic/dribble/dribble_tactic_push_enemy_test.cpp
  • src/software/ai/hl/stp/tactic/receiver/receiver_tactic_test.cpp
  • src/software/ai/hl/stp/tactic/attacker/attacker_tactic_passing_test.cpp
  • src/software/ai/hl/stp/tactic/attacker/attacker_tactic_shoot_goal_test.cpp
  • src/software/ai/hl/stp/tactic/attacker/attacker_tactic_keep_away_test.cpp (Add complex pytest validations to attacker tactic test #3638)
  • src/software/ai/hl/stp/tactic/penalty_kick/penalty_kick_tactic_test.cpp

PLAY TESTS TO PORT

  • src/software/ai/hl/stp/play/shoot_or_pass/shoot_or_pass_play_test.cpp
  • src/software/ai/hl/stp/play/stop_play_test.cpp
  • src/software/ai/hl/stp/play/shoot_or_chip_play_test.cpp
  • src/software/ai/hl/stp/play/crease_defense/crease_defense_play_test.cpp
  • src/software/ai/hl/stp/play/free_kick/free_kick_play_test.cpp
  • src/software/ai/hl/stp/play/kickoff_friendly_play_test.cpp
  • src/software/ai/hl/stp/play/kickoff_enemy_play_test.cpp
  • src/software/ai/hl/stp/play/example/example_play_test.cpp
  • src/software/ai/hl/stp/play/penalty_kick_enemy/penalty_kick_enemy_play_test.cpp
  • src/software/ai/hl/stp/play/penalty_kick/penalty_kick_play_test.cpp (graysons pr Penalty kick play Python test #3050)

SENSOR FUSION TEST

  • src/software/sensor_fusion/filter/ball_occlusion_test.cpp

Resolved Issues

resolves #2558, resolves #2778, resolves #3636

Length Justification and Key Files to Review

Porting tests requires lots of changes.

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

@nycrat nycrat force-pushed the avah/port_simulated_cpp_tests_to_python branch 2 times, most recently from 674d985 to f1dbcde Compare March 1, 2026 08:08
@nycrat nycrat changed the title [DRAFT] Port all simulated c++ tests to python, deprecate simulated c++ tests [DRAFT] Port all simulated c++ tests to python Mar 2, 2026
@nycrat nycrat force-pushed the avah/port_simulated_cpp_tests_to_python branch from fce1914 to e734f87 Compare March 4, 2026 22:11
@nycrat nycrat changed the title [DRAFT] Port all simulated c++ tests to python [DRAFT] Port all simulated c++ tactic tests to python Mar 5, 2026
@nycrat nycrat changed the title [DRAFT] Port all simulated c++ tactic tests to python [DRAFT] Port all simulated c++ tests to python Mar 7, 2026
@nycrat nycrat marked this pull request as ready for review March 8, 2026 02:31
@nycrat nycrat changed the title [DRAFT] Port all simulated c++ tests to python Port all simulated c++ tests to python Mar 8, 2026
@nycrat
Copy link
Copy Markdown
Member Author

nycrat commented Mar 8, 2026

actually, i'll try to break this pr apart to make it easier to review

@nycrat nycrat closed this Mar 8, 2026
@nycrat nycrat reopened this Mar 8, 2026
@nycrat nycrat marked this pull request as draft March 8, 2026 03:18
@nycrat nycrat changed the base branch from master to avah/change_set_tactic_syntax March 16, 2026 14:53
@nycrat nycrat changed the title Port all simulated c++ tests to python [DRAFT] Port all simulated c++ tests to python Mar 22, 2026
@StarrryNight StarrryNight mentioned this pull request Mar 22, 2026
4 tasks
@nycrat nycrat changed the base branch from avah/change_set_tactic_syntax to master March 27, 2026 17:19
@nycrat nycrat force-pushed the avah/port_simulated_cpp_tests_to_python branch from 5b2af81 to 49d46d3 Compare March 27, 2026 17:50
@nycrat nycrat marked this pull request as ready for review April 4, 2026 06:21
@nycrat nycrat changed the title [DRAFT] Port all simulated c++ tests to python Port all simulated c++ tests to python Apr 4, 2026
@nycrat nycrat requested a review from GrayHoang April 4, 2026 06:25
@nycrat nycrat force-pushed the avah/port_simulated_cpp_tests_to_python branch from 40ae173 to 592caed Compare April 4, 2026 06:45
@nycrat nycrat force-pushed the avah/port_simulated_cpp_tests_to_python branch from 9cb57aa to a1649d5 Compare April 4, 2026 23:05
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.

Add validations for free kick play test Create validation function for crease defense play test Port simulated C++ tests to Python

2 participants