Thanks to visit codestin.com
Credit goes to github.com

Skip to content

kartikl/groveco_challenge

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Store Locator CLI tool

A lightweight tool to search for stores near given address.

Environment

This is a Python 3 project.

Dependencies

  • Database: local csv file
  • Other Packages:

Instructions

  • Before running the program make sure all the dependencies listed in the requirements.txt are installed.
  • run program: run ./app.py - This will give you instructions on how the programs accept arguments
    • example: ./app.py --address="248 Sunrise Hwy, Freeport, NY"
  • run test suite: python3 -m unittest

Caveat

This program finds the nearest stores from the user provided address. It is a basic CLI tool with address capabilities. The distance is implemented with the haversine's formula to determine distance. The program can be optimized by dumping the CSV data into a NOSQL database where it can be easily accessed with Latitude and Longitude. Creating the boundary box helps narrow down data choices from the list of stores but it limits the radius to a hard coded distance. This can be acquired fromt the user by adding another flag like --radius. All the distance calculations are done in Km by default. This is another feature that can be added into the code. Basic features were implemented in the given time constraint but features could be drastically improved to give user more control over various things like the output format, distance calculations etc. There is also room for improvement in the testing of this program. There are several happy paths and error paths tests that can be added to the test suite.

Author

Vasudha kalia

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%