Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for unit testing #15

Merged
merged 25 commits into from
Jun 28, 2024
Merged

Add support for unit testing #15

merged 25 commits into from
Jun 28, 2024

Conversation

ncguilbeault
Copy link
Collaborator

Summary

This PR adds support for automated unit testing. It also includes a unit test to compare outputs from Bonsai and Python running the LDS model for linear regression.

Change to solution file

The Bonsai.ML.sln file is pulled out from the src folder and into the main repo. This allows the solution file to have a structured hierarchy which encompass both src and tests, consistent with other .NET projects (e.g. ml.net).

Test workflow

The test.yml github workflow will build the solution and run tests on the solution. If the test requires running a Bonsai workflow, the individual unit test should include a Bonsai.config file for recreating the bonsai environment.

Receptive field simple cell test

The tests/Bonsai.ML.LinearDynamicalSystems.Tests/ReceptiveFieldSimpleCellTest folder contains a test method to download the data, setup a python and Bonsai environment with the necessary packages installed, generate the python and Bonsai outputs and compare.

@glopesdev glopesdev merged commit cea88fc into main Jun 28, 2024
2 checks passed
@glopesdev glopesdev deleted the automated-tests branch June 28, 2024 09:51
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.

2 participants