Giter VIP home page Giter VIP logo

ducknroll's Introduction

DucknRoll

duck-typed data for scientists (and Freshworks hiring teams)

Summary

My development notes were stored in "outline.txt" and should give a rough approximation of how I tackled this project. I laid out some steps with regards to how I wanted to tackle the problem. I didn't get around to prettifying the page or Dockerising it properly, but I did get most of the expected functionality working in pure Django within 3 hours so I'm happy about that. All in all, I spend about 9 hours building the actual webpage, and another 2 on writing out the documentation / scripts.

Running the program

I spent a bit of bonus time writing some bash scripts to automate the setup and teardown of the webpage. They don't work quite as well as I want them to, but at the very least "run-page.sh" should give some solid indication of the steps required to get this application up and running:

  1. installing gdal and python3-gdal onto the system may be a prerequisite to getting this site running properly? I'm not sure.

  2. Run the PostGIS database from Podman / Docker using the following command:

$ podman run --name=postgis -d -e POSTGRES_USER=user001 -e POSTGRES_PASS=123456789 -e POSTGRES_DBNAME=gis -p 5432:5432 kartoza/postgis:9.6-2.4
  1. Set up the python virtual environment (should be using python3):
$ python -m venv venv
$ source venv/bin/activate
$ pip install -r requirements.txt
  1. Set up and run the Django server (either in the background or in a separate terminal)
$ cd ducknroll
$ python manage.py makemigrations
$ python manage.py migrate
$ python manage.py runserver &
  1. Run the frontend server
$ cd ../ducknroll-frontend
$ yarn start

The end result should be an empty table which you can populate as much as you want! I was going to initialise the database with some values but alas... not enough time.

Final Notes

I would like to note that opening up Django's administration page to the public would have totally trivialised this assignment. It has built-in form submission and integration with the GeoDjango module... but it would have also given them the ability to delete and modify data. Subclassing the admin interface would have been an interesting alternative solution to this problem. I stopped trying to write it all in Django once the generic view classes started causing me trouble, but I made some progress.

If I had more time, I would have focused it on making form validation more robust and apparent to the user. I also would have liked to add better design, switch to a deployment build, and to fix the questionable state management that I used to build the front-end.

Ultimately, this project was a lot of fun! Thanks for the challenge

ducknroll's People

Contributors

zenentreadwell avatar

Watchers

James Cloos avatar  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.