- A Console Application that helps allocate an office space, room space or both.
- The Dojo is one of Andela's facility in Kenya and it inspired the Application.
- install python3, virtualenvwrapper.
- Clone the repository or download the zip file. [git clone https://github.com/andela-oadeniran/dojo_space_allocator.git]
- create a new virtualenv
mkvirtualenv dojoenv
- Navigate to where the application has been installed and workon virtualenvname
- install application's requirements with pip install -r requirements.txt
- Create a .dojo_data folder/directory on your home page.
NOTE: All text and databases will be created or stored here ~/.dojo.data and you can only load files stored there
create_room room_type room_name
Use the command to create a room.add_person fname lname STAFF/FELLOW [wants-accommodation]
Used to add a person to the System and if available an office and for a fellow who wants accommodation a Living Space.print_room room_name
To print the occupants in a particular roomprint_allocations
To print each room and the corresponding room membersprint_unallocated
To print the number of people without an Allocated Office and or Living Space.people_id
To print the ID corresponding to each personreallocate_person person_id room_name
This command helps to either reallocate a person to another office or living space or allocate an unallocated person to an appropriate room.load_people
The command helps load a list of persons(add a list) from a text filesave_state [--db sqlitedatabase]
saves the session data into an sqlite databaseload_state sqlite-database-name
loads data from the database name specified.
All Databases and text file used in the application are stored in the .dojo_data in the users Home Directory. Users can create this directory but the Application Automatically create it, when commands that use text or db files are invoked except load_state. That requires a valid data base to be in the directory.
To allow the load people test to pass copy the people.txt to the valid folder as specified. The people.txt is in the root of the project.