carlosival / hola-luz

Prueba Tecnica Hola Luz

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Holaluz Suspicious Reading Detector

Description Solution

The solution employs a Hexagonal Architecture to handle different inputs seamlessly. This architecture facilitates the integration of diverse inputs, such as CSV and XML files, and allows for easy adaptation to other sources. The command command-line application that takes a file name (e.g., 2016-readings.xml or 2016-readings.csv) and outputs a table with suspicious readings, including client ID, month, actual reading, and the corresponding median. The solution is written with TypeScript and framework NestJS

Installation

Ensure you have node version >= v16 installed on your system or use Docker. Clone the repository, navigate to the project folder, and follow the instructions below:

$ yarn install

Running the app

# run the app without build
$ yarn run start:cli 2016-readings.csv
$ yarn run start:cli 2016-readings.xml

# build the app and run
$ yarn run build
$ node ./dist/main /absolute/path/to/file/2016-readings.xml
$ node ./dist/main /absolute/path/to/file/2016-readings.csv

# build and run using docker
$ docker build -t hola-luz .
$ docker run -it hola-luz sh
$ yarn run start:cli 2016-readings.csv
$ node dist/main 2016-readings.xml

## Test

```bash
# unit tests
$ yarn run test


# test coverage
$ yarn run test:cov

Version 0.1.0

Stay in touch

Acknowledgments

Inspiration, code snippets, etc.

About

Prueba Tecnica Hola Luz


Languages

Language:TypeScript 96.6%Language:JavaScript 2.8%Language:Dockerfile 0.6%