Create a private git repo and implement the following project.
-
Create a Django project (use https://pipenv.pypa.io/en/latest/)
-
Use Postgres as DB (in Docker container)
-
Add tables:
- Person (name, email, age, phone, address, created datetime, modified datetime)
- Employee (person_id Foreign Key, department, role, line_manager person_id Foreign Key, created datetime, modified datetime)
Remark: This simple data model allows the mapping of an employment structure for example in a company. Here
person_id
refers toid
of a person from thePerson
table. -
Django Admin views
- one for Person and Employee models
- relevant fields should be separately displayed in columns
- add filters for all fields (see here: https://django-filter.readthedocs.io/en/stable/)
- sortable
-
REST APIs to add, delete, modify single or multiple
- Person(s)
- Employees(s)
-
REST APIs to bulk query Persons or Employees over any combinations of the fields of the two models
-
Postman file demonstrating the REST APIs. See:
-
Tests
- Pytest (https://pytest-django.readthedocs.io/en/latest/) using Django APIClient
- One test.py for each view
- One integration test
- No model access in test except for verification if not possible with only APIs
-
https://pylint.org/ your code
-
https://coverage.readthedocs.io/en/6.2/ code coverage (exclude all 3rd party libraries)
-
Document code with https://docs.python.org/3/library/pydoc.html
-
Run tests and lint with Github Actions (https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs-or-python?langId=py)
include this README and check if completed or explain why it isn't done
- Source code
- Development setup instructions including commands for running lint and tests with coverage
example template
1. git clone <your repo url here> 2. docker run postgres ... 3. python manage.py makemigrations ... 4. pylint ... 5. pytest ... --cov=...
- PyLint run report (expected no errors or warnings)
- Coverage report (expected 100% code coverage)
- Postman json
- GitHub Action run in your private repo
- Make sure that checklist above is complete
- In case any point on the checklist is failed to be accomplished please provide all attempt information and reason for failure in details
- Incomplete submissions without proper explanation or documentation will be rejected
Provide lakshmi-intechcode
with read access to your repository.
An interviewee will demonstrate the project in action and perform certain operations as requested. Questions will be asked about your different coding choices in the project and on any part of the repository.