- Resolve
TODO
s comments in code - Test for invalid and missing XML tags
- Add test coverage report
- Handle all resources in brackets to close them gracefully
- Add graceful-shutdown
- Add observability data (logs, metrics, tracing)
- Parse inputs using Console
Instructions to run the code on your local machine for development and testing purposes.
Please install sbt: The interactive build tool from here in order to build, compile, test and run the code.
For an easier way of running the service, please install Docker and Docker Compose
Run sbt stage
, this will create a launcher at eem\modules\cli\target\universal\scripts\bin\eem-cli
.
Run sbt docker:publishLocal
, this will pull openjdk:18-slim-buster
and build eem-cli:0.1.0
images.
You can check it out running docker images
.
You can run the code directly from sbt-shell typing sbt
and then cli/run leftside_pass "./matchresults.xml"
.
If you already created eem-cli:0.1.0
image using sbt docker:publishLocal
, you can run it in the interactive mode:
cat leftside_pass "./matchresults.xml" | docker run -i eem-cli:0.1.0
Or just use docker-compose up
and pass the requeired arguments.
Unit tests code is under eem/modules/tests
. To run them use sbt test
.
This project is powered by the following libraries:
- cats: Lightweight, modular, and extensible library for functional programming
- catsEffects: The IO monad for Scala
- fs2: Purely functional, effectful, resource-safe, concurrent streams for Scala
- xml-spac: Handle streaming XML data with declarative, composable parsers
This project is licensed under the GNU License - see the LICENSE file for details.