Skip to content
Open
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
33c20b5
Add files via upload
GrayHoang Aug 2, 2025
d251d7f
Rename image.png to sml-error-msg.png
GrayHoang Aug 2, 2025
7e66688
Merge branch 'master' of github.com:UBC-Thunderbots/Software
GrayHoang Dec 4, 2025
75f220e
remove image
GrayHoang Dec 23, 2025
3911d26
make all thunderscope dependencies hermetic, use rules_py
GrayHoang Dec 23, 2025
98a4131
merge conflict
GrayHoang Dec 23, 2025
bff3e51
remove debugging tools
GrayHoang Dec 23, 2025
45fd8cd
clean unneeded dependencies
GrayHoang Dec 23, 2025
4d48707
more cleaning
GrayHoang Dec 23, 2025
d462dec
clean setup_software
GrayHoang Dec 23, 2025
0d4b3b2
[pre-commit.ci lite] apply automatic fixes
pre-commit-ci-lite[bot] Dec 23, 2025
d8ba7be
fix some bash scripting issue and add some debug
GrayHoang Dec 26, 2025
496a037
retrigger checks
GrayHoang Jan 3, 2026
3c269af
[pre-commit.ci lite] apply automatic fixes
pre-commit-ci-lite[bot] Jan 3, 2026
9fce33a
remove libraries and bugfix
GrayHoang Jan 10, 2026
60dccaa
add tar to bazel build
GrayHoang Jan 13, 2026
2b224f2
clean commit history
GrayHoang Jan 13, 2026
7a73635
Merge branch 'master' of github.com:UBC-Thunderbots/Software into new…
GrayHoang Jan 15, 2026
3a91378
add arm compilation
GrayHoang Jan 15, 2026
842d7e3
multi platform build
GrayHoang Jan 15, 2026
731ec60
rerun release
GrayHoang Jan 15, 2026
a41aec9
rerun release
GrayHoang Jan 15, 2026
7ed95d0
comment out macos option
GrayHoang Jan 15, 2026
efe25a0
bugfix
GrayHoang Jan 15, 2026
cb674ea
another bugfix
GrayHoang Jan 15, 2026
e915c23
Add TODO for MacOS support
GrayHoang Jan 16, 2026
7a3f4e8
remove tar from main build
GrayHoang Jan 16, 2026
25a0f4c
Merge branch 'new_release_workflow' of github.com:GrayHoang/Software …
GrayHoang Jan 16, 2026
07d5516
remove tar from test builds
GrayHoang Jan 17, 2026
62a7f78
fix
GrayHoang Jan 17, 2026
89722ab
fix tests
GrayHoang Jan 17, 2026
9e098f4
adjust file location
GrayHoang Jan 23, 2026
4cc5231
debug msgs
GrayHoang Jan 23, 2026
262e624
add trigger
GrayHoang Jan 23, 2026
393529d
testing
GrayHoang Jan 23, 2026
ae47094
testing
GrayHoang Jan 23, 2026
6578f8b
testing
GrayHoang Jan 23, 2026
9a36e98
testing
GrayHoang Jan 23, 2026
20e12bb
fixed
GrayHoang Jan 23, 2026
be34578
add cron
GrayHoang Jan 23, 2026
d0943a5
rebase and update
GrayHoang Jan 23, 2026
16f5eb5
fixes
GrayHoang Jan 23, 2026
3c157f8
fixes
GrayHoang Jan 23, 2026
5931f6e
fixes
GrayHoang Jan 23, 2026
09ab4c1
fixes
GrayHoang Jan 23, 2026
80931ce
fixes
GrayHoang Jan 23, 2026
7250020
fixes
GrayHoang Jan 23, 2026
360b38a
fixes
GrayHoang Jan 23, 2026
fe2b300
remove old bazel commands
GrayHoang Jan 23, 2026
a162536
cron
GrayHoang Jan 24, 2026
fb02402
cron and manual and versioning
GrayHoang Jan 24, 2026
508ed15
delete old tar
GrayHoang Jan 24, 2026
4f954ea
Test
GrayHoang Jan 24, 2026
83642d6
delete comments
GrayHoang Jan 24, 2026
c853653
add comment
GrayHoang Jan 24, 2026
9943b2d
reenable cron
GrayHoang Jan 24, 2026
0f54fc0
remove on push
GrayHoang Jan 24, 2026
f1ccef6
fux
GrayHoang Jan 24, 2026
4986061
add macos support
GrayHoang Jan 24, 2026
ba6a5c5
Merge branch 'new_release_workflow' of github.com:GrayHoang/Software …
GrayHoang Jan 24, 2026
83cf748
Merge branch 'master' of github.com:UBC-Thunderbots/Software into new…
GrayHoang Jan 24, 2026
a773816
add macos build to github actions
GrayHoang Jan 24, 2026
6d743a5
fix
GrayHoang Jan 24, 2026
7b2c9c4
fix
GrayHoang Jan 24, 2026
e3d0212
debug
GrayHoang Jan 24, 2026
a21f4be
fix
GrayHoang Jan 24, 2026
4785cea
better release notes
GrayHoang Jan 24, 2026
f3cf788
fix
GrayHoang Jan 24, 2026
cfe8d7d
fix
GrayHoang Jan 24, 2026
bae5841
fix
GrayHoang Jan 24, 2026
2abda82
add format
GrayHoang Jan 24, 2026
19128e9
[pre-commit.ci lite] apply automatic fixes
pre-commit-ci-lite[bot] Jan 24, 2026
c0eb846
fix
GrayHoang Jan 24, 2026
215d563
Merge branch 'new_release_workflow' of github.com:GrayHoang/Software …
GrayHoang Jan 24, 2026
cd54709
fix
GrayHoang Jan 24, 2026
c70b781
tag input logic
GrayHoang Jan 24, 2026
1e12fcb
fix race condition
GrayHoang Jan 24, 2026
f94903f
fix race condition
GrayHoang Jan 24, 2026
9f8a6af
fix race condition
GrayHoang Jan 24, 2026
c74ae05
fix race condition
GrayHoang Jan 24, 2026
01f218a
fix race condition
GrayHoang Jan 24, 2026
2428f59
fix
GrayHoang Jan 24, 2026
26d2580
another fix
GrayHoang Jan 25, 2026
6afef23
fixes
GrayHoang Jan 25, 2026
8ead9dd
fixes
GrayHoang Jan 25, 2026
badca35
more fixes
GrayHoang Jan 25, 2026
7d13953
please work
GrayHoang Jan 25, 2026
42ed44c
whitespace
GrayHoang Jan 25, 2026
1b6a325
Revert "please work"
GrayHoang Jan 25, 2026
0b00e9e
Revert "more fixes"
GrayHoang Jan 25, 2026
22feff0
rainbow
GrayHoang Jan 25, 2026
cd307b4
some crazy changes
GrayHoang Jan 25, 2026
05d1769
Crazy changes that should be logged
GrayHoang Jan 25, 2026
ee7630e
Merge branch 'master' into bazel_rules_py
GrayHoang Feb 3, 2026
911dc36
[pre-commit.ci lite] apply automatic fixes
pre-commit-ci-lite[bot] Feb 3, 2026
ceb6f6b
merge master
GrayHoang Feb 8, 2026
598a193
Merge branch 'bazel_rules_py' of github.com:GrayHoang/Software into b…
GrayHoang Feb 8, 2026
83a2178
[pre-commit.ci lite] apply automatic fixes
pre-commit-ci-lite[bot] Feb 8, 2026
360444b
Merge branch 'master' of github.com:UBC-Thunderbots/Software into baz…
GrayHoang Feb 15, 2026
2a57425
Merge branch 'bazel_rules_py' of github.com:GrayHoang/Software into b…
GrayHoang Feb 15, 2026
01a4f7b
requests requirement
GrayHoang Feb 15, 2026
2fa0204
fix tests
GrayHoang Feb 20, 2026
9f34377
Merge branch 'master' of github.com:UBC-Thunderbots/Software into baz…
GrayHoang Feb 20, 2026
ad2cbb2
[pre-commit.ci lite] apply automatic fixes
pre-commit-ci-lite[bot] Feb 20, 2026
7954d84
fix tests
GrayHoang Feb 20, 2026
11b5073
Merge branch 'bazel_rules_py' of github.com:GrayHoang/Software into b…
GrayHoang Feb 20, 2026
30d0867
[pre-commit.ci lite] apply automatic fixes
pre-commit-ci-lite[bot] Feb 20, 2026
27f4819
more fix
GrayHoang Feb 20, 2026
e82b5c1
Merge branch 'bazel_rules_py' of github.com:GrayHoang/Software into …
GrayHoang Feb 20, 2026
071faec
[pre-commit.ci lite] apply automatic fixes
pre-commit-ci-lite[bot] Feb 20, 2026
3956145
Merge branch 'master' of github.com:UBC-Thunderbots/Software into baz…
GrayHoang Feb 22, 2026
b763504
update macos requirements
GrayHoang Feb 22, 2026
f7a4338
remove the hardcoded file path
GrayHoang Mar 7, 2026
ee1ec48
Merge branch 'master' of github.com:UBC-Thunderbots/Software into baz…
GrayHoang Mar 7, 2026
202b636
[pre-commit.ci lite] apply automatic fixes
pre-commit-ci-lite[bot] Mar 7, 2026
ddd292e
Merge branch 'master' of github.com:GrayHoang/Software
GrayHoang Mar 27, 2026
ca87cec
Merge branch 'bazel_rules_py' of github.com:GrayHoang/Software into b…
GrayHoang Apr 4, 2026
aeb7b12
Merge branch 'master' of github.com:UBC-Thunderbots/Software into baz…
GrayHoang Apr 4, 2026
69fc9ef
fix build again
GrayHoang Apr 11, 2026
e220493
Merge branch 'master' of github.com:UBC-Thunderbots/Software into baz…
GrayHoang Apr 11, 2026
9330895
[pre-commit.ci lite] apply automatic fixes
pre-commit-ci-lite[bot] Apr 11, 2026
790c07a
fix more tests
GrayHoang May 8, 2026
9068629
Merge branch 'bazel_rules_py' of github.com:GrayHoang/Software into b…
GrayHoang May 8, 2026
b513192
[pre-commit.ci lite] apply automatic fixes
pre-commit-ci-lite[bot] May 8, 2026
b9ac748
reproc precommit
GrayHoang May 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions environment_setup/setup_software.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ sudo apt-get install -y software-properties-common # required for add-apt-reposi
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo add-apt-repository -y ppa:deadsnakes/ppa
sudo apt-get update
sudo apt autoremove

# Detect if running under WSL
# See https://github.com/microsoft/WSL/issues/4071#issuecomment-1221588337
Expand Down Expand Up @@ -90,10 +91,7 @@ fi

virtualenv_opt_args=""
if [[ $(lsb_release -rs) == "24.04" ]]; then
host_software_packages+=(python3-pyqt6)
host_software_packages+=(pyqt6-dev-tools)
host_software_packages+=(python3-pyqt6.qtsvg)

sudo apt remove "python3-pyqt6" "pyqt6-dev-tools" "python3-pyqt6.qtsvg"
virtualenv_opt_args="--system-site-packages"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I am guessing these will contaminate the dependency tree?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

These are installations of pyqt6 into the local computer, which we no longer need. I think I need to write an additional line to uninstall an existing version of pyqt6 as well so it doesn't contaminate the tree.

fi

Expand Down
6 changes: 1 addition & 5 deletions environment_setup/ubuntu24_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
ansible-lint==25.8.1
pyqtgraph==0.13.7
thefuzz==0.19.0
iterfzf==0.5.0.20.0
python-Levenshtein==0.25.1
psutil==5.9.0
PyOpenGL==3.1.6
ruff==0.5.5
pyqt-toast-notification==1.3.2
md-toc==9.0.0
grpcio-tools==1.71.0
python-Levenshtein==0.25.1
3 changes: 2 additions & 1 deletion src/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module(
bazel_dep(name = "googletest", version = "1.15.2")
bazel_dep(name = "platforms", version = "0.0.11")
bazel_dep(name = "pybind11_bazel", version = "2.13.6")
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "bazel_skylib", version = "1.8.1")
bazel_dep(name = "rules_pkg", version = "1.1.0")
bazel_dep(name = "rules_foreign_cc", version = "0.14.0")
bazel_dep(name = "rules_python", version = "1.4.1")
Expand All @@ -22,6 +22,7 @@ bazel_dep(name = "rules_proto", version = "7.1.0")
bazel_dep(name = "yaml-cpp", version = "0.8.0")
bazel_dep(name = "buildifier_prebuilt", version = "8.0.3")
bazel_dep(name = "pybind11_protobuf", version = "0.0.0-20250210-f02a2b7")
bazel_dep(name = "aspect_rules_py", version = "1.6.6")

##############################################
# Load PIP packages and our Requirements
Expand Down
169 changes: 167 additions & 2 deletions src/MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions src/software/thunderscope/BUILD
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
load("@aspect_rules_py//py:defs.bzl", "py_binary", "py_library")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should you be loading py_binary and py_library from aspect_rules_py in every BUILD file? Some BUILD files don't load them in, so I assume they're using the rules_python versions.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think for consistency you are probably correct. I would also assume that if I don't explicitly load it, it uses the rules_python version. I just knew that specifically this was broken, and otherwise I didn't want to touch the other parts that seemed to work fine.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

As a matter of fact, I believe that once this rule has been loaded, it will use aspect_build in every single BUILD file. This is shown by other BUILD files not compiling when the necessary libraries aren't explicitly listed as requirements, even in files where py_binary and py_library are not loaded. So it is consistent in usage.

load("@rules_python//python:pip.bzl", "compile_pip_requirements")
load("@thunderscope_deps//:requirements.bzl", "requirement")

Expand All @@ -12,6 +13,11 @@ compile_pip_requirements(
py_binary(
name = "thunderscope_main",
srcs = ["thunderscope_main.py"],
env = {
"LD_LIBRARY_PATH": "../.thunderscope_main.venv/lib/python3.12/site-packages/PyQt6/Qt6/lib",
"QTWEBENGINEPROCESS_PATH": "../.thunderscope_main.venv/lib/python3.12/site-packages/PyQt6/Qt6/libexec/QtWebEngineProcess",
},
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You may want to consider setting these environment variables in Python at runtime so you don't have to copy this for every py_binary and py_test. You'd have to do this before importing PyQt, so maybe at the top of thunderscope.py would be a good place. Something like:

# PyQt6 bundles Qt as native shared libraries and helper binaries that are not
# discoverable when running under Bazel's sandboxed environment. In particular,
# the dynamic linker cannot find Qt's .so files and QtWebEngine cannot locate its
# QtWebEngineProcess helper unless explicitly told where they live. 

# Since the aspect_rules_py virtual env lives in the runfiles tree and its
# location is only known at runtime, we derive these paths from $VIRTUAL_ENV 
# here and set the required env vars before importing PyQt6.

qt_path = (
    Path(os.environ["VIRTUAL_ENV"])
    / "lib"
    / f"python{sys.version_info.major}.{sys.version_info.minor}"
    / "site-packages"
    / "PyQt6"
    / "Qt6"
)

os.environ["LD_LIBRARY_PATH"] = str(qt_path / "lib")
os.environ["QTWEBENGINEPROCESS_PATH"] = str(qt_path / "libexec" / "QtWebEngineProcess")

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This seems to work fine as is, without needing to copy paste this to every py_binary and py_test. I think perhaps under the hood aspect_rules is doing the same thing?

package_collisions = "warning",
deps = [
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Who is managing this virtual environment? Is it bazel?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, I believe it is Bazel by way of the aspect_rules_py reworking. Basically, the new aspect_rules_py pylibrary/ pybinary rules build the dependencies in a venv, instead of doing whatever Bazel did before, which was less rigorous and safe.

":config",
":constants",
Expand Down Expand Up @@ -47,6 +53,7 @@ py_library(
"//software/thunderscope/binary_context_managers:game_controller",
"//software/thunderscope/binary_context_managers:simulator",
"//software/thunderscope/binary_context_managers:tigers_autoref",
requirement("pyqt6"),
requirement("numpy"),
requirement("pyqtdarktheme-fork"),
requirement("pyqtgraph"),
Expand Down Expand Up @@ -150,6 +157,7 @@ py_library(
srcs = ["constants.py"],
deps = [
requirement("protobuf"),
requirement("pyopengl"),
],
)

Expand Down
2 changes: 2 additions & 0 deletions src/software/thunderscope/binary_context_managers/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ py_library(
"//proto:import_all_protos",
"//software/networking:ssl_proto_communication",
"//software/thunderscope/common:thread_safe_circular_buffer",
requirement("psutil"),
],
)

Expand All @@ -34,6 +35,7 @@ py_library(
],
data = [
"//software:unix_full_system",
requirement("psutil"),
],
)

Expand Down
2 changes: 2 additions & 0 deletions src/software/thunderscope/common/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ py_library(
deps = [
":common_widgets",
requirement("netifaces"),
requirement("thefuzz"),
requirement("levenshtein"),
],
)

Expand Down
1 change: 1 addition & 0 deletions src/software/thunderscope/play/BUILD
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
load("@aspect_rules_py//py:defs.bzl", "py_binary", "py_library")
load("@thunderscope_deps//:requirements.bzl", "requirement")

package(default_visibility = ["//visibility:public"])
Expand Down
7 changes: 6 additions & 1 deletion src/software/thunderscope/requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ numpy==1.26.4
protobuf==6.31.1
pyqtgraph==0.13.7
pyqtdarktheme-fork==2.3.2
PyQt6-Qt6==6.8.1
PyQt6-Qt6==6.10.0
pyqt-toast-notification==1.3.2
qtawesome==1.4.0
PyQt6==6.10.0
PyOpenGL==3.1.6
psutil==5.9.0
thefuzz==0.19.0
python-Levenshtein==0.25.1
Loading