-
Notifications
You must be signed in to change notification settings - Fork 1
Developer Guide
Here we'll describe what needs to be known in order to build upon our project:
- Python.
- Mongodb (version 3.4).
- Git client.
- Github account.
You first need to fork our project, by forking https://github.com/TechnionYearlyProject/TheDoors
Then follow the installation instructions given in the "Installation Instructions" page in order to install all the dependencies of the project (skip the clone step).
The simulation engine code and some basic API for working with the database are in the "common" directory.
The rest of our backend code is in the "models" directory and you should write your backend code there as well. These are our current files (and what they contain):
- Analytics - the analytics code (room occupancy, statistics, etc)
- Order - the code for putting a room order in the system.
- Schedule - the code that represents a weekly schedule of a user.
- User - the code that represents a user in the system.
- facilities - the code that represents facilities table in the DB
- friends - the code for addition and removal of friends.
- Images and other static assets need to be added to the "static" directory.
- HTML pages should be written under "templates" directory.
- All your Flask/RESTful code should be written in main.py
Tests should be written under the "tests" directory, where each test name (that is, each test function name) needs to be prefixed with "test_" since we're working with pytest and it's a requirement of this test suite.
You can run tests with the following command (run a specific module):
pytest test_backend.py
Or the following (run all tests in a directory):
pytest tests/