Skip to content

Commit

Permalink
Fix tests for comparison with BEEHAVE, add them to CI (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
mlange-42 authored May 21, 2024
1 parent c5100ab commit d4b2e6a
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 6 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,19 @@ jobs:
go run ./_examples/observer
go run ./_examples/patches
go run ./_examples/weather
comp_tests:
name: Run comparison tests
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.22.x'
- name: Check out code
uses: actions/checkout@v2
- name: Install dependencies
run: go get ./...
- name: Run all comparison tests
run: |
go run ./_tests/default
2 changes: 1 addition & 1 deletion _tests/default/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func main() {
fmt.Println(dur)
}

func run(m *amodel.Model, idx int, params *params.Params) {
func run(m *amodel.Model, idx int, params params.Params) {
m = model.Default(params, m)

m.AddSystem(&reporter.CSV{
Expand Down
2 changes: 1 addition & 1 deletion _tests/py/agg_beecs.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ def agg_beecs(file_pattern, out_file):


if __name__ == "__main__":
agg_beecs("out/beecs-%04d.csv", "tests/default/beecs.csv")
agg_beecs("out/beecs-%04d.csv", "_tests/default/beecs.csv")
2 changes: 1 addition & 1 deletion _tests/py/agg_netlogo.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ def agg_netlogo(file, out_file):


if __name__ == "__main__":
agg_netlogo("out/netlogo.csv", "tests/default/netlogo.csv")
agg_netlogo("out/netlogo.csv", "_tests/default/netlogo.csv")
6 changes: 3 additions & 3 deletions _tests/py/plot_quantiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ def plot_column(data_beehave, data_beecs, column, quantiles, image_file):

if __name__ == "__main__":
plot_quantiles(
"tests/default/beehave.csv",
"tests/default/beecs.csv",
"tests/default",
"_tests/default/beehave.csv",
"_tests/default/beecs.csv",
"_tests/default",
#"png",
"svg",
)

0 comments on commit d4b2e6a

Please sign in to comment.