Skip to content

Commit 8507fba

Browse files
authored
Merge pull request #21 from wmironpatriots/refactor
migration
2 parents badb7d6 + 52169bc commit 8507fba

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+913
-1452
lines changed

.devcontainer/devcontainer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"image": "mcr.microsoft.com/devcontainers/universal:2",
3-
"postCreateCommand": "cd /opt && wget 'https://github.com/wpilibsuite/vscode-wpilib/releases/download/v2025.1.1/vscode-wpilib-2025.1.1.vsix'",
3+
"postCreateCommand": "cd /opt && wget 'https://github.com/wpilibsuite/vscode-wpilib/releases/download/v2025.3.2/vscode-wpilib-2025.3.2.vsix'",
44
"features": {
55
},
66
"customizations": {
77
"vscode": {
8-
"extensions": ["/opt/vscode-wpilib-2025.1.1.vsix","vscjava.vscode-java-pack","vscjava.vscode-gradle"]
8+
"extensions": ["/opt/vscode-wpilib-2025.3.2.vsix","vscjava.vscode-java-pack","vscjava.vscode-gradle"]
99
}
1010
}
1111
}

.github/rulesets/main.json

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
"id": 6522263,
3+
"name": "main + development",
4+
"target": "branch",
5+
"source_type": "Repository",
6+
"source": "wmironpatriots/IronBase",
7+
"enforcement": "active",
8+
"conditions": {
9+
"ref_name": {
10+
"exclude": [],
11+
"include": [
12+
"refs/heads/main",
13+
"refs/heads/development"
14+
]
15+
}
16+
},
17+
"rules": [
18+
{
19+
"type": "deletion"
20+
},
21+
{
22+
"type": "non_fast_forward"
23+
},
24+
{
25+
"type": "creation"
26+
},
27+
{
28+
"type": "pull_request",
29+
"parameters": {
30+
"required_approving_review_count": 1,
31+
"dismiss_stale_reviews_on_push": false,
32+
"require_last_push_approval": true,
33+
"required_review_thread_resolution": true,
34+
"automatic_copilot_code_review_enabled": false,
35+
"allowed_merge_methods": [
36+
"merge",
37+
"squash",
38+
"rebase"
39+
]
40+
}
41+
},
42+
{
43+
"type": "update"
44+
}
45+
],
46+
"bypass_actors": [
47+
{
48+
"actor_id": null,
49+
"actor_type": "OrganizationAdmin",
50+
"bypass_mode": "always"
51+
}
52+
]
53+
}

.github/workflows/build.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
build:
9+
name: Build
10+
runs-on: ubuntu-latest
11+
continue-on-error: true
12+
steps:
13+
- name: checkout repository
14+
uses: actions/checkout@v2
15+
- name: init Java
16+
uses: actions/setup-java@v3
17+
with:
18+
distribution: "temurin"
19+
java-version: "17"
20+
- name: Grant executive perms
21+
run: chmod +x gradlew
22+
- name: Check formatting
23+
id: formatting
24+
run: ./gradlew spotlessCheck
25+
- name: Format Code
26+
if: ${{ failure() && steps.formatting.conclusion == 'failure'}}
27+
run: ./gradlew spotlessApply
28+
- name: Commit and Push formatted Code
29+
if: ${{ failure() && steps.formatting.conclusion == 'failure'}}
30+
run: |
31+
git config --global user.name 'github-actions'
32+
git config --global user.email '[email protected]'
33+
git add .
34+
git commit -m "auto generated"
35+
git push
36+
- name: Build Robot Code
37+
run: ./gradlew build

.gitignore

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,10 @@ out/
169169
.fleet
170170

171171
# Simulation GUI and other tools window save file
172-
networktables.json
173-
simgui.json
174-
*-window.json
172+
# TODO add back after creating default saves
173+
# networktables.json
174+
# simgui.json
175+
# *-window.json
175176

176177
# Simulation data log directory
177178
logs/
@@ -187,5 +188,4 @@ compile_commands.json
187188
.factorypath
188189

189190
# Build data
190-
src/main/java/wmironpatriots/BuildConstants.java
191-
simgui*
191+
src/main/java/org/frc6423/robot/BuildConstants.java

.scripts/pre-commit

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/bin/sh
2+
#
3+
# Simple pre-commit hook that checks for formating
4+
5+
# Escape sequences
6+
RED='\e[31m!'
7+
NC='\e[0m'
8+
9+
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
10+
echo "~~~ Starting Pre-Commit Checks ~~~"
11+
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
12+
13+
# Gather the staged files - to make sure changes are saved only for these files.
14+
stagedFiles=$(git diff --staged --name-only)
15+
16+
# Check if spotless formated
17+
echo " * Spotless Check? "
18+
./gradlew spotlessCheck
19+
20+
status=$?
21+
22+
if [ "$status" = 0 ] ; then
23+
echo "Spotless Check Success!"
24+
for file in $stagedFiles; do
25+
if test -f "$file"; then
26+
git add $file
27+
fi
28+
done
29+
else
30+
echo 1>&2 -e "${RED}---------------------------!${NC}"
31+
echo 1>&2 -e "${RED}-- SPOTLESS CHECK FAILED --!${NC}"
32+
echo 1>&2 -e "${RED}---------------------------!${NC}"
33+
echo "Run ./gradlew spotlessApply and try again!"
34+
exit 1
35+
fi

.vscode/launch.json

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
{
2-
// Use IntelliSense to learn about possible attributes.
3-
// Hover to view descriptions of existing attributes.
4-
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5-
"version": "0.2.0",
6-
"configurations": [
7-
8-
{
9-
"type": "wpilib",
10-
"name": "WPILib Desktop Debug",
11-
"request": "launch",
12-
"desktop": true,
13-
},
14-
{
15-
"type": "wpilib",
16-
"name": "WPILib roboRIO Debug",
17-
"request": "launch",
18-
"desktop": false,
19-
}
20-
]
21-
}
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
8+
{
9+
"type": "wpilib",
10+
"name": "WPILib Desktop Debug",
11+
"request": "launch",
12+
"desktop": true,
13+
},
14+
{
15+
"type": "wpilib",
16+
"name": "WPILib roboRIO Debug",
17+
"request": "launch",
18+
"desktop": false,
19+
}
20+
]
21+
}

.vscode/settings.json

Lines changed: 60 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,60 @@
1-
{
2-
"java.configuration.updateBuildConfiguration": "automatic",
3-
"java.server.launchMode": "Standard",
4-
"files.exclude": {
5-
"**/.git": true,
6-
"**/.svn": true,
7-
"**/.hg": true,
8-
"**/CVS": true,
9-
"**/.DS_Store": true,
10-
"bin/": true,
11-
"**/.classpath": true,
12-
"**/.project": true,
13-
"**/.settings": true,
14-
"**/.factorypath": true,
15-
"**/*~": true
16-
},
17-
"java.test.config": [
18-
{
19-
"name": "WPIlibUnitTests",
20-
"workingDirectory": "${workspaceFolder}/build/jni/release",
21-
"vmargs": [ "-Djava.library.path=${workspaceFolder}/build/jni/release" ],
22-
"env": {
23-
"LD_LIBRARY_PATH": "${workspaceFolder}/build/jni/release" ,
24-
"DYLD_LIBRARY_PATH": "${workspaceFolder}/build/jni/release"
25-
}
26-
},
27-
],
28-
"java.test.defaultConfig": "WPIlibUnitTests",
29-
"java.import.gradle.annotationProcessing.enabled": false,
30-
"java.completion.favoriteStaticMembers": [
31-
"org.junit.Assert.*",
32-
"org.junit.Assume.*",
33-
"org.junit.jupiter.api.Assertions.*",
34-
"org.junit.jupiter.api.Assumptions.*",
35-
"org.junit.jupiter.api.DynamicContainer.*",
36-
"org.junit.jupiter.api.DynamicTest.*",
37-
"org.mockito.Mockito.*",
38-
"org.mockito.ArgumentMatchers.*",
39-
"org.mockito.Answers.*",
40-
"edu.wpi.first.units.Units.*"
41-
],
42-
"java.completion.filteredTypes": [
43-
"java.awt.*",
44-
"com.sun.*",
45-
"sun.*",
46-
"jdk.*",
47-
"org.graalvm.*",
48-
"io.micrometer.shaded.*",
49-
"java.beans.*",
50-
"java.util.Base64.*",
51-
"java.util.Timer",
52-
"java.sql.*",
53-
"javax.swing.*",
54-
"javax.management.*",
55-
"javax.smartcardio.*",
56-
"edu.wpi.first.math.proto.*",
57-
"edu.wpi.first.math.**.proto.*",
58-
"edu.wpi.first.math.**.struct.*",
59-
]
60-
}
1+
{
2+
"java.configuration.updateBuildConfiguration": "automatic",
3+
"java.server.launchMode": "Standard",
4+
"files.exclude": {
5+
"**/.git": false,
6+
"**/.svn": true,
7+
"**/.hg": true,
8+
"**/CVS": true,
9+
"**/.DS_Store": true,
10+
"bin/": true,
11+
"**/.classpath": true,
12+
"**/.project": true,
13+
"**/.settings": true,
14+
"**/.factorypath": true,
15+
"**/*~": true
16+
},
17+
"java.test.config": [
18+
{
19+
"name": "WPIlibUnitTests",
20+
"workingDirectory": "${workspaceFolder}/build/jni/release",
21+
"vmargs": [ "-Djava.library.path=${workspaceFolder}/build/jni/release" ],
22+
"env": {
23+
"LD_LIBRARY_PATH": "${workspaceFolder}/build/jni/release" ,
24+
"DYLD_LIBRARY_PATH": "${workspaceFolder}/build/jni/release"
25+
}
26+
},
27+
],
28+
"java.test.defaultConfig": "WPIlibUnitTests",
29+
"java.import.gradle.annotationProcessing.enabled": false,
30+
"java.completion.favoriteStaticMembers": [
31+
"org.junit.Assert.*",
32+
"org.junit.Assume.*",
33+
"org.junit.jupiter.api.Assertions.*",
34+
"org.junit.jupiter.api.Assumptions.*",
35+
"org.junit.jupiter.api.DynamicContainer.*",
36+
"org.junit.jupiter.api.DynamicTest.*",
37+
"org.mockito.Mockito.*",
38+
"org.mockito.ArgumentMatchers.*",
39+
"org.mockito.Answers.*",
40+
"edu.wpi.first.units.Units.*"
41+
],
42+
"java.completion.filteredTypes": [
43+
"java.awt.*",
44+
"com.sun.*",
45+
"sun.*",
46+
"jdk.*",
47+
"org.graalvm.*",
48+
"io.micrometer.shaded.*",
49+
"java.beans.*",
50+
"java.util.Base64.*",
51+
"java.util.Timer",
52+
"java.sql.*",
53+
"javax.swing.*",
54+
"javax.management.*",
55+
"javax.smartcardio.*",
56+
"edu.wpi.first.math.proto.*",
57+
"edu.wpi.first.math.**.proto.*",
58+
"edu.wpi.first.math.**.struct.*",
59+
]
60+
}

AUTHORS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Authors
22
```
3-
Dasun L. Abeykoon (dabeycorn)
3+
Dasun Abeykoon (dabeycorn)
44
Andrew Samulyak (arsamulyak)
5-
```
5+
```

LICENSE

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,7 @@
1-
MIT License
1+
Copyright 2025 FRC 6423 WM Iron Patriots
22

3-
Copyright (c) 2025 FRC 6423 WM Iron Patriots
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
44

5-
Permission is hereby granted, free of charge, to any person obtaining a copy
6-
of this software and associated documentation files (the "Software"), to deal
7-
in the Software without restriction, including without limitation the rights
8-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9-
copies of the Software, and to permit persons to whom the Software is
10-
furnished to do so, subject to the following conditions:
5+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
116

12-
The above copyright notice and this permission notice shall be included in all
13-
copies or substantial portions of the Software.
14-
15-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
7+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33

44
![Img](./assets/imgs/cascadeWireframe.webp)
55

6-
- This year's #OpenAlliance [build thread](https://www.chiefdelphi.com/t/6423-iron-patriots-2025-reefscape-build-thread/477430/3)
6+
- This year's #OpenAlliance [build thread](https://www.chiefdelphi.com/t/6423-iron-patriots-2025-reefscape-build-thread/477430/3)

0 commit comments

Comments
 (0)