Skip to content

nirev/price_tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Price Tracker

Build Status

A simple price tracker application.

Description

Some assumptions:

  • percentage change is stored with two decimal cases at most
  • no scheduling, the updating of prices could be run by cron
  • no assumption on how to run. PriceTracker.run could be exposed as a Mix task or runnable escript
  • host and api_key are configured via ENV_VARS, check PriceTracker.PriceFetcher.API

Dependencies:

  • Runtime:
    • ecto: database interface
    • httpoison: http requests
    • poison: JSON parsing
    • postgrex: ecto's postgres adapter
    • timex: manipulating dates
  • dev and test:
    • bypass: for testing external API calls
    • credo: static analysis for styling issues
    • dialyxir: static analysis for type checking
    • earmark: for documentation
    • ex_doc: for documentation
    • mox: testing, creates mocks for behaviours

Usage

Environment:

  • elixir 1.5.1
  • erlang 20.0

"installing"

git clone git@github.com:nirev/price_tracker.git
cd price_tracker
mix deps.get

running tests

mix test

documentation

Documentation is available at https://nirev.github.io/price_tracker/
It was generated with ex_doc using:

mix docs

static code analysis

Credo is used for code styling check

mix credo

Dialyxir for warnings regarding type mismatch and other common mistakes.

The first run takes a while, as it must build a lookup table.

mix dialyzer

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages