Coder Social home page Coder Social logo

work-at-olist's Introduction

NEATtree (Nested explicit atomic test) tree

This is in order to take part into Work at Olist.

For original README.md see here.

API Documentation

Documentation

Stack

  • Python >= 3.5
  • PIP
  • Pipenv

Project Requirements

  • Django >= 1.10
  • django-environ
  • django-generate-secret-key
  • django-mptt
  • djangorestframework
  • djangorestframework-recursive
  • django-autoslug
  • drfdocs
  • psycopg2
  • gunicorn
  • whitenoise

Run the app locally

  1. Make sure you have Python >= 3.5 and PIP installed.

    1.1. In order to install it on Ubuntu-like systems run:

     $ sudo apt-get install python3 \
         sudo apt-get install python3-pip
    
  2. Install Pipenv.

     $ sudo pip3 install pipenv
    
  3. Git clone this repo. Make sure you have git installed

     $ git clone https://github.com/diogosimao/work-at-olist.git && cd work-at-olist
    
  4. Use Pipenv to create a virtualenv, install its dependencies and activate the virtualenv.

     $ pipenv --three && pipenv install && pipenv shell
    
  5. Make sure you have PostgreSQL installed running on port 5432

  6. Set your local user and password to ./bin/start_development.sh and create the database

     $ createdb neattree
    
  7. Run . ./bin/start_development.sh

Development server should be up at http://localhost:8000/.

Deploy the app to Heroku

  1. Make sure you have Heroku CLI installed and that you are logged in

  2. Set DEBUG=False for safety measure

     $ heroku config:set DEBUG=False
    
  3. Set SECRET_KEY environment variable

    3.1 You can either use the following command to generate it:

     $ python manage.py generate_secret_key --replace
    

    3.2 Get the key in the generated secretkey.txt file in the current dir or you can get a valid key elsewhere.

    3.3 After that set it on Heroku:

     $ heroku config:set SECRET_KEY='<YOUR_SECRET_KEY>'
    
  4. Be aware that Release Phase will be executed as you deploy it.

    4.1. It will run Django makemigrations

    4.2. It will run Django migrate

  5. Deploy it, see here

  6. Get you herokuapp.com url and access it on your browser.

     $ heroku info -s | grep web_url | cut -d= -f2
    

Django Management Command

The command importcategories is available through DMC. The syntax is:

$ python manage.py importcategories <channel_name> <categories_file>

Make sure to have env var DATABASE_URL set.

Tests

Some tests are available running:

$ ./bin/run_tests.sh

Make sure to have env var DATABASE_URL set on ./bin/run_tests.sh.

work-at-olist's People

Contributors

diogosimao avatar osantana avatar cleberzavadniak avatar dvainsencher avatar

Watchers

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