A Command line application that managers a dojo facillity.
It allocates rooms to new employees, [Staff or Fellow] randomly.
A room in the dojo can either be an office
or a livingspace
. Offices in the dojo can only accommodate 6 people whereas a livingspaces can only accommodate 4.
An employee can either be a staff
or a fellow
. Staff can only be assigned offices, whereas fellows can be assigned either or both, depending on there choice regarding a livingspace.
Adds_room name_room [office | living space]
Adds_Person firstname secondname [fellow| staff]
Print_Allocations [filename]
print_Unallocated [filename]
reallocate_person id new_room
load_people file.txt
save_state database_name
load_state database_name
remove_person id
remove_room room_name
person_information [<type>] [<id>]
- Create a virtual enviroment
- Find the instructions for installing and using a virtual environment and virtualenv wrapper here.
- Git Clone this repo to your local machine.
git clone https://github.com/georgreenmanu/Geoogreen-Mamboleo-Dojo-Project.git
See requirements.txt
You have to install python3 to run this app
After cloning the repo , cd to the folder, activate your virtual enviroment then:
pip install -r requirements.txt
Run the above command to install the app and required dependencies.
From your terminal you can now run the application by using the following command:
python3 app.py
A welcome screen will show as follows:
You can now interact with application by entering the commands displayed above.
NOTE: Pressing the TAB key twice displays all the available commands
-
To create a room which is an office run the command
create room office red
or uselivingspace
to create a livingspace. You could also give a list of room names to create by separating the names with spaces as shown: -
To add a person, use the command
add person Paul Joe staff
and for a fellow who wants a living space useadd person Jojn Doe fellow y
.NOTE: the livingspace option only applies to fellows and not staff.
-
You can reallocate a person using the command
reallocate_person <id> <newroom>
. -
You can load people from a file by using the
load_people file.txt
command. -
You can also print out the allocated people and the unallocated using
print_[allocated|unallocated]
command, specifying the filename saves the allocations on the specified file. -
The command
print_room <room name>
print's room's occupants. -
You can remove_person i.e fellow or staff
remove_person <ID>
remove user from system -
You can display everyone or a specific user
person_information [<type>] [<id>]
-
You can delete rooms from the system
remove_room <room_name>
-
You could clear the screen if you wish by using the
clear
command. -
To restart the app use the command
restart
-
To quit the application run the
quit
command.
nosetests
nosetests --with-coverage
To run tests run the command above : Require's nosetests
version 4.0
- Georgreen Ngunga
This project is licensed under the MIT License - see the LICENSE.md file for details
- Fork me!