This system will be used to automatically allocate room space to people at random.
This design structure shows the relationship between the classes used in The Dojo Rooms.
- Python 2.7
- Sqlite database
- Install Python 2.7
- Install virtualenv
- Run
git clone
for this repository on git bash andcd
into the project root. - Run
virtualenv venv
on command prompt - Run
venv\Scripts\activate.bat
- Run
pip install -r requirements.txt
on command prompt - Run
python main.py
on command prompt - You will see a prompt,
The Dojo Rooms:
- Fully setup!
- Activate the virtual environment (See previous section)
- Run
python main.py -h
on command prompt for a list of commands - Run
python main.py
to start - Type
help
on the prompt,The Dojo Rooms:
- All you need to know is displayed
- Run
pytest
Below is a sample input/output expectation if you run The Dojo Rooms on a Python Shell or Console.
- Run
python app/dojo/the_dojo_rooms.py
The steps to follow are numbered.
dojo = Dojo()
multiple_offices = dojo.create_room("office", ["Blue", "Green", "Orange"])
An office called Blue has been successfully created! An office called Green has been successfully created! An office called Orange has been successfully created!multiple_livingspaces = dojo.create_room("livingspace", ["Python", "Django"])
An livingspace called Python has been successfully created! An livingspace called Django has been successfully created!add_person1 = dojo.add_person("Eli1 Rwt1", 'staff')
Eli1 has been allocated the office Green. Staff Eli1 Rwt1 has been successfully added.add_person2 = dojo.add_person("Eli2 Rwt2", 'fellow', 'Y')
Eli2 has been allocated the office Green. Eli2 has been allocated the livingspace Python. Fellow Eli2 Rwt2 has been successfully added.print_room("Green")
print_allocations("room_allocations.txt")
print_unallocated("non_allocated.txt")
reallocate("Eli2 Rwt2", "Blue")
load_people("persons.txt")
save_state()
load_state()