This project is a DeepOpinion Challenge: Sr.
docker-compose -f local.yml build
docker-compose -f local.yml up
docker-compose -f local.yml run --rm django python manage.py migrate docker-compose -f local.yml run --rm django python manage.py createsuperuser
- Run the build command
- Run the stack command to start the project
- To upload CSV file, make post request to this endpoint: http://0.0.0.0:8000/api/v1/datas/upload-csv/
- To upload Excel file, make post request to this endpoint: http://0.0.0.0:8000/api/v1/datas/upload-excel/
- To get all data, make a get request to this endpoint: http://0.0.0.0:8000/api/v1/datas/data/
- To get single data, make a get request to this endpoint: http://0.0.0.0:8000/api/v1/datas/data/{id}
- To add and chaange tags to data, make a put request to this endpoint: http://0.0.0.0:8000/api/v1/datas/data/{id}
- To get all available sentiment, make a get rquest to the endpoint: http://0.0.0.0:8000/api/v1/datas/data/get_sentiment/
- To get all available aspect, make a get rquest to the endpoint: http://0.0.0.0:8000/api/v1/datas/data/get_aspects/
- Make sure the CSV and Excel file header name is Text, for data to be uploaded
- I was supposed to include download feature for CSV and Excel file
- I was supposed to add asynchronous task to all the request in the project but because of time i couldn't do that
- I was supposed to write test cases for the programme but because of time I couldn't do it.
- I was supposed to cache end point that retrieve data from the database but due to time I couldn't do it.
Running type checks with mypy:
$ mypy deepopinion_backend_challenge
To run the tests, check your test coverage, and generate an HTML coverage report:
$ coverage run -m pytest
$ coverage html
$ open htmlcov/index.html
$ pytest
Moved to Live reloading and SASS compilation.
Sentry is an error logging aggregator service. You can sign up for a free account at https://sentry.io/signup/?code=cookiecutter or download and host it yourself. The system is set up with reasonable defaults, including 404 logging and integration with the WSGI application.
You must set the DSN url in production.
The following details how to deploy this application.
See detailed cookiecutter-django Heroku documentation.
See detailed cookiecutter-django Docker documentation.