dssg / aequitas

Bias Auditing & Fair ML Toolkit
http://www.datasciencepublicpolicy.org/aequitas/
MIT License
656 stars 110 forks source link

added unit testing framework #175

Closed valmik-patel closed 3 months ago

valmik-patel commented 4 months ago

@sgpjesus this is ready for review

Please test it locally before you merge the PR and let me know if you have any questions

I've added the instructions to the README.md file inside the tests folder but I'm also pasting them here

Unit Testing in Aequitas

To run unittests locally, you need to run the following commands from the base folder of the project.

The below commans only needs to be run once to give the testing script necessary permission to run

chmod +x run_tests.sh

The testing script itself can be run using the following commans

./run_tests.sh

The script will run all defined tests in a virtual environment and output the coverage report in the terminal.

sgpjesus commented 3 months ago

I would say to close the tests in the GenericDataset class we just need to check the fail conditions. I installed Coverage Gutters to check which lines are missing in VSCode.

valmik-patel commented 3 months ago

@sgpjesus I've removed the unused import and added more tests to ensure 100% coverage for GenericDataset. You can review it again now. Thanks!