Skip to content

Rule Evaluator is a command-line application written in Scala 3 that enables users to evaluate a set of conditions on a CSV file. It uses functional programming libraries Cats and ZIO to provide robustness and modularity.

License

Notifications You must be signed in to change notification settings

Kirvolque/rule-evaluator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Language License

Rule Evaluator

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.

Originally designed as a tool for bioinformatics pipelines, this project was embedded into workflows to validate data against predefined rules. Later, the tool was generalized and expanded to support broader use cases.

Usage

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.

Example Run Command

sbt "run --rule rules.txt --csv example.csv"

Example Rule File

[Column1] = 1 AND [Column2] = "abc"

Example CSV File

Column1,Column2,Column3
1,abc,2
2,cbe,3

Example Output

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.

Technologies Used

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.

Development

To build and test the application, you can use the following commands:

$ sbt compile     # compile the application
$ sbt test        # run tests

About

Rule Evaluator is a command-line application written in Scala 3 that enables users to evaluate a set of conditions on a CSV file. It uses functional programming libraries Cats and ZIO to provide robustness and modularity.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages