Rule Evaluator is a command-line application written in Scala 3 that allows you to evaluate a set of conditions on a CSV file. This application is currently a work in progress. This project was developed with the assistance of the GPT-3.5-based language model called ChatGPT, which was used to generate tests, documentation, and some parts of the code.
To use Rule Evaluator, you must have a CSV file with your data and a set of conditions that you want to evaluate for each row of data.
sbt "run --rule rules.txt --csv example.csv"
[Column1] = 1 AND [Column2] = "abc"
Column1,Column2,Column3
1,abc,2
2,cbe,3
For the above example rule and CSV files, the output would be:
row: 1 status: Pass
row: 2 status: Fail: Column1 | Column2
The application will evaluate each row in the CSV file against the specified conditions and output the result for each row. If a row fails the conditions, the application will also output a list of reasons why the conditions failed.
This project uses the following technologies:
- Scala 3 - The programming language used to write the application.
- sbt - The build tool used to manage dependencies and build the project.
- ScalaTest - The testing framework used to write and run tests.
- Cats - The library used to provide type classes such as
Monoid
for functional programming in Scala. - ZIO - The library used for managing side effects and concurrency.
To build and test the application, you can use the following commands:
$ sbt compile # compile the application
$ sbt test # run tests