Giter Site home page Giter Site logo

cp1's Introduction

Amity Application

Amity is a console application that's used for room allocations. With this application you create rooms and add people who will be randomly assigned to the rooms. There are two types of rooms: offices and living spaces. There are two types of people in amity: staff and fellows. A fellow has the option to get a living room while a staff can only be allocated to an office. This comes with other capabilities as enlisted below.

Installation

Todo app is a python package and can be installed as such. First setup a virtual environment where the application's dependencies will be automatically installed:

$ pip install virtualenv          #install virtualenv module
$ virtualenv amity-app                #setup your own virtual env
$ source amity-app/bin/activate #to activate environment in linux, in windows run amit-app/scripts/activate

To install the app, clone this repository:

$ https://github.com/clementm916/CP1.git
$ cd CP1
$ $ pip install -r requirements.txt         #ensure your environments are activated
#this installs all required modules

Setting Up

Todo was developed with Python version 3.5 but works properly with python 2.7. To run the application in using the following command:

$ python app.py
Loading amity ...
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Welcome to Amity Room Allocation Application.
Add people, create rooms, allocate and reallocate the rooms.
(type "help" for a list of commands.)

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Welcome to Amity Room Allocation Application.
Add people, create rooms, allocate and reallocate the rooms.
(type "help" for a list of commands.)

Functionality

help command

Returns all commands

(Amity) $ help

Documented commands (type help <topic>):
========================================
add_person   load_people        print_room         reallocate_person
create_room  load_state         print_unallocated  save_state
help         print_allocations  quit                        
```sh     
### `--help` option
This is to help the user whenever they have trouble using a given command:
```sh
(Amity) $ add_person --help
        Add a person to amity.
        Usage:
          add_person <first_name> <second_name> <email> <person_type> [--accommodation=N]

create_room command

Creates a new room in the amity system. Can take several rooms at a go.

(Amity) $ create_room --help
        Creates a room(s) in amity
        Usage:
          create_room <room_type> <room_name> ...

add_person command

Adds a new person to the amity system.

(Amity) $ add_person --help
        Add a person to amity.
        Usage:
          add_person <first_name> <second_name> <email> <person_type> [--accommodation=N]

reallocate_person command

Reallocates a person to a different room.

(Amity) $ reallocate_person --help
        Reallocate peron to another room.
        Usage:
          reallocate_person <email> <new_room>

load_people command

Loads people from a text file.

(Amity) $ load_people --help
        Loads people from a text file.
        usage:
            load_people

print_unallocated command

Prints the people in Amity who have not been allocated to rooms. Takes an optional file argument printing them to the file otherwise prints to screen.

(Amity) $ print_unallocated --help
        Prints a list of unallocated people to the screen.
        Specifying the -o option here outputs the information to the txt file provided
        usage:
            print_unallocated [--o=filename]

print_allocations command

Prints the rooms and the members in them.

(Amity) $ print_allocations --help
        Prints a list of unallocated people to the screen.
        Specifying the -o option here outputs the information to the txt file provided
        usage:
            print_allocations [--o=filename]

save_state command

Saves state of the application to a persistent database. Takes an optional database name.

(Amity) $ save_state --help
Persists all the data stored in the app to a SQLite database.
           Specifying the --db parameter explicitly stores the data in the sqlite_database specified.
           usage:
            save_state [--db=sqlite_database]

load_state command

Loads saved state from persistent database. The name must be passed.

(Amity) $ load_state --help
        Loads data from a database into the application.
        usage:
            load_state <sqlite_database>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.