Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
24 changes: 22 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,33 @@ on:
pull_request:

jobs:
get-files:
name: Get Software List Files
runs-on: ubuntu-latest
outputs:
paths: ${{ steps.list-files.outputs.paths }}
steps:
- name: Get Software List Files
id: list-files
uses: mirko-felice/list-files-action@v3.0.5
with:
repo: ${{ github.repository }}
ref: ${{ github.ref }}
path: "Lists"
ext: ".json"
test-files:
name: Test Files
runs-on: ubuntu-latest
name: Test Software List Files
needs:
- get-files
strategy:
matrix:
paths: [ 'Lists/FRC2025.json' ]
steps:
- uses: actions/checkout@v4
- name: Test Files
run: echo "Test the current files for schema compliance"
run: go run ./fileverifier/main.go -file ${{ matrix.paths }}

build-desktop:
needs:
- test-files
Expand Down
44 changes: 41 additions & 3 deletions CSAUSBTool.CrossPlatform.Desktop/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
},
"Microsoft.NET.ILLink.Tasks": {
"type": "Direct",
"requested": "[8.0.11, )",
"resolved": "8.0.11",
"contentHash": "zk5lnZrYJgtuJG8L4v17Ej8rZ3PUcR2iweNV08BaO5LbYHIi2wNaVNcJoLxvqgQdnjLlKnCCfVGLDr6QHeAarQ=="
"requested": "[8.0.13, )",
"resolved": "8.0.13",
"contentHash": "R19ZTaRiQAK+xo9ZwaHbF/1vb1wwR1Wn5+sqp9v8+CDjbdS8R6qftKdw0VSXWKm7VAMi7P+NCU4zxDzhEWcAwQ=="
},
"Avalonia.Angle.Windows.Natives": {
"type": "Transitive",
Expand All @@ -42,6 +42,35 @@
"resolved": "0.0.29",
"contentHash": "U4eJLQdoDNHXtEba7MZUCwrBErBTxFp6sUewXBOdAhU0Kwzwaa/EKFcYm8kpcysjzKtfB4S0S9n0uxKZFz/ikw=="
},
"Avalonia.Controls.ColorPicker": {
"type": "Transitive",
"resolved": "11.2.2",
"contentHash": "4EMwXvp13WsIvk7eHBXjrT3JBqMYI5lGMYwPUh5f4vsPX1KArSnyy9F4+eByUvJKLROEY6j4gXoPaqtZfAjy1A==",
"dependencies": {
"Avalonia": "11.2.2",
"Avalonia.Remote.Protocol": "11.2.2"
}
},
"Avalonia.Controls.DataGrid": {
"type": "Transitive",
"resolved": "11.2.2",
"contentHash": "h86QMlOvjDsihg64WYAvyxFWhwFf30WffwoY8vJGF3BgLpahW+VjNeq5GoO0VyGWWJI2vdTJEzO5fjb8MEpwAg==",
"dependencies": {
"Avalonia": "11.2.2",
"Avalonia.Remote.Protocol": "11.2.2"
}
},
"Avalonia.Diagnostics": {
"type": "Transitive",
"resolved": "11.2.2",
"contentHash": "O3hSjXJ1htUJdlKkkH+B3/CcNIGtIRKHlt/L81H2MUT+xiXoHeiWjQf+mSnGgN3LEOt5ZBCuDOZ4NgkchncylQ==",
"dependencies": {
"Avalonia": "11.2.2",
"Avalonia.Controls.ColorPicker": "11.2.2",
"Avalonia.Controls.DataGrid": "11.2.2",
"Avalonia.Themes.Simple": "11.2.2"
}
},
"Avalonia.Fonts.Inter": {
"type": "Transitive",
"resolved": "11.2.2",
Expand Down Expand Up @@ -104,6 +133,14 @@
"Avalonia": "11.2.2"
}
},
"Avalonia.Themes.Simple": {
"type": "Transitive",
"resolved": "11.2.2",
"contentHash": "EgK1N3VAbZpF3NFKKbwDekjKekaDNrHXkPllDom04iP7ZbwuH4xGhmjKlEB5KkPuvxWEfS1ROuRYqVHtna0KRg==",
"dependencies": {
"Avalonia": "11.2.2"
}
},
"Avalonia.Win32": {
"type": "Transitive",
"resolved": "11.2.2",
Expand Down Expand Up @@ -256,6 +293,7 @@
"type": "Project",
"dependencies": {
"Avalonia": "[11.2.2, )",
"Avalonia.Diagnostics": "[11.2.2, )",
"Avalonia.Fonts.Inter": "[11.2.2, )",
"Avalonia.ReactiveUI": "[11.2.2, )",
"Avalonia.Themes.Fluent": "[11.2.2, )",
Expand Down
6 changes: 1 addition & 5 deletions CSAUSBTool.CrossPlatform/ViewModels/ProgramYearViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,8 @@ public ProgramYearViewModel(int? year, string? program)
DownloadSoftwareLists();
}

public ProgramYearViewModel()
public ProgramYearViewModel() : this(DateTime.Now.Year, "FRC")
{
Year = DateTime.Now.Year;
Program = "FRC";
DownloadSoftwareLists();
}

public void DownloadSoftwareLists()
Expand All @@ -46,7 +43,6 @@ public void DownloadSoftwareLists()
}
catch (Exception e)
{
Console.WriteLine(e);
// Ignore errors that are generally 404's from mismatched years/programs for legacy compat.
}
}
Expand Down
45 changes: 38 additions & 7 deletions CSAUSBTool.CrossPlatform/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@
"MicroCom.Runtime": "0.11.0"
}
},
"Avalonia.Diagnostics": {
"type": "Direct",
"requested": "[11.2.2, )",
"resolved": "11.2.2",
"contentHash": "O3hSjXJ1htUJdlKkkH+B3/CcNIGtIRKHlt/L81H2MUT+xiXoHeiWjQf+mSnGgN3LEOt5ZBCuDOZ4NgkchncylQ==",
"dependencies": {
"Avalonia": "11.2.2",
"Avalonia.Controls.ColorPicker": "11.2.2",
"Avalonia.Controls.DataGrid": "11.2.2",
"Avalonia.Themes.Simple": "11.2.2"
}
},
"Avalonia.Fonts.Inter": {
"type": "Direct",
"requested": "[11.2.2, )",
Expand Down Expand Up @@ -57,11 +69,37 @@
"resolved": "0.0.29",
"contentHash": "U4eJLQdoDNHXtEba7MZUCwrBErBTxFp6sUewXBOdAhU0Kwzwaa/EKFcYm8kpcysjzKtfB4S0S9n0uxKZFz/ikw=="
},
"Avalonia.Controls.ColorPicker": {
"type": "Transitive",
"resolved": "11.2.2",
"contentHash": "4EMwXvp13WsIvk7eHBXjrT3JBqMYI5lGMYwPUh5f4vsPX1KArSnyy9F4+eByUvJKLROEY6j4gXoPaqtZfAjy1A==",
"dependencies": {
"Avalonia": "11.2.2",
"Avalonia.Remote.Protocol": "11.2.2"
}
},
"Avalonia.Controls.DataGrid": {
"type": "Transitive",
"resolved": "11.2.2",
"contentHash": "h86QMlOvjDsihg64WYAvyxFWhwFf30WffwoY8vJGF3BgLpahW+VjNeq5GoO0VyGWWJI2vdTJEzO5fjb8MEpwAg==",
"dependencies": {
"Avalonia": "11.2.2",
"Avalonia.Remote.Protocol": "11.2.2"
}
},
"Avalonia.Remote.Protocol": {
"type": "Transitive",
"resolved": "11.2.2",
"contentHash": "76nQ2/TkJAmthHcCPoVznnCfsqhy+pDPFBhySoRv3ZIsj5q9jIgR0bi7rznIcFIKnfoXMEpB1uxMHbfeQ99OgQ=="
},
"Avalonia.Themes.Simple": {
"type": "Transitive",
"resolved": "11.2.2",
"contentHash": "EgK1N3VAbZpF3NFKKbwDekjKekaDNrHXkPllDom04iP7ZbwuH4xGhmjKlEB5KkPuvxWEfS1ROuRYqVHtna0KRg==",
"dependencies": {
"Avalonia": "11.2.2"
}
},
"DynamicData": {
"type": "Transitive",
"resolved": "8.4.1",
Expand Down Expand Up @@ -110,13 +148,6 @@
"resolved": "9.0.1",
"contentHash": "XkspqduP2t1e1x2vBUAD/xZ5ZDvmywuUwsmB93MvyQLospJfqtX0GsR/kU0vUL2h4kmvf777z3txV2W4NrQ9Qg=="
}
},
"net8.0/osx-arm64": {
"System.Text.Encodings.Web": {
"type": "Transitive",
"resolved": "9.0.1",
"contentHash": "XkspqduP2t1e1x2vBUAD/xZ5ZDvmywuUwsmB93MvyQLospJfqtX0GsR/kU0vUL2h4kmvf777z3txV2W4NrQ9Qg=="
}
}
}
}
5 changes: 0 additions & 5 deletions CSAUSBTool.sln
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSV-to-JSON", "CSV-to-JSON\
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{382B6900-DA1A-4930-9B1B-82683BCB8C7D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{1530FA21-4057-4298-AFA4-9CC99713872E}"
ProjectSection(SolutionItems) = preProject
test.yml = test.yml
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down
22 changes: 17 additions & 5 deletions fileverifier/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@ import (
"os"
)

var completed = make(chan Software, 100)
var failed = make(chan Software, 100)
var filePath string
var (
completed = make(chan Software, 100)
failed = make(chan Software, 100)
filePath string
enableConcurrent bool
)

type ProgramSeason struct {
Year int `json:"Year,omitempty"`
Expand Down Expand Up @@ -58,6 +61,7 @@ func (s *Software) Download() error {
func main() {

flag.StringVar(&filePath, "file", "", "File path")
flag.BoolVar(&enableConcurrent, "concurrent", false, "Enable concurrent downloads")
flag.Parse()

if filePath == "" {
Expand Down Expand Up @@ -105,15 +109,20 @@ func checkFile(filePath string) (err error) {
// Download the software
for _, s := range programSeason.Software {
software := s
go func() {
dl := func() {
e2 := software.Download()
if e2 != nil {
fmt.Println(e2)
failed <- software
} else {
completed <- software
}
}()
}
if enableConcurrent {
go dl()
} else {
dl()
}
}

completedCount := 0
Expand All @@ -134,5 +143,8 @@ func checkFile(filePath string) (err error) {
break
}
}
if failedCount > 0 {
return fmt.Errorf("failed to download %d software", failedCount)
}
return nil
}