GithubHelp home page GithubHelp logo

test-assignment-for-machinefactortechnologies's Introduction

Test assignment Machine Factor Technologies

My solutions to the test assignment

Prerequisites

To work with this repo you will need

  1. Docker >= v20.10.14
  2. GNU Make >= v3.81
  3. websocat or any other websocket client

Please make sure you have the correct version of Docker installed

Note: Because docker-compose.yaml uses env variables substitution, docker compose ... should be called from the project root dir

First run

  1. Download test_data and trades_sample.parquet from my Google Drive
  2. Create .env file with cp example.env .env. Specify path to the downloaded files in .env file
  3. Run make first_run to initialize db and populate it with the sample data

Database structure is defined in init.sql

I had decided to not include test files in to the repo, because they are not small. And there is no straightforward way to download them with a script, because they are too large (to be scanned for viruses, and Google Drive asks to press confirm to continue)

Task 1.1

  1. Run docker compose up -d notebooks to start Jupyter notebooks server
  2. In your browser go to http://127.0.0.1:8888/lab/tree/notebooks. You should be able to see and execute my solutions now

Task 1.2

  1. Run docker compose up cron_job to start cron job. You should be able to see some logs now

Task 2

  1. Run docker compose up websocket to start WebSocket. You should be able to see some logs now
  2. Run in another terminal websocat ws://127.0.0.1:8080/live_trades to connect to the WebSocket. You should see streaming trades, and some logs in another terminal
  3. Run docker compose exec websocket python -m unittest /service/tests.py to start tests

Note: It might take a few seconds for the endpoint to become available

test-assignment-for-machinefactortechnologies's People

Watchers

Daniel avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.