Table of Contents
The mfs_locator is a spacial implementation resolving the Euclidean distance between several points. In this project, given a list of coordinates, we get two pairs of coordinates that are close to one another.
The Algorithm implemented removes any duplicates in the list supplied to process the residule. The implementation is that, to get the two nearest pairs we compute the distance matrix, then we get the minimum scoring in the matrix.
-
Install python (3.8+).
-
install dev libs: sudo apt install libpq-dev python3-dev (debian distros)
-
Change directory
cd mfs_locator
-
Set up virtual environment:
virtaulenv --python=/location/of/python3.8 ./
-
Activate enviroment.
source bin/activate
-
Install dependencies
pip install -r requirements.txt
-
Make migrations
python manage.py makemigrations
-
Migrate
python manage.py migrate
-
Set up new user
python manage.py createsuperuser --email admin@example.com --username admin
-
Run the app
python manage.py runserver
The end point is coformat to Swagger sturcure and so is the documentation for the API.
- Run tests
python manage.py test
The documentation can be accessed under the following three paths from the base URL:
/swagger
eg:
http://localhost:8000/swagger
/swagger.yaml
http://localhost:8000/swagger.yaml
and
/redoc
http://localhost:8000/redoc
Distributed under the GPL-3.0 License. See LICENSE
for more information.