hellock / labman

A lab management system based on Flask.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LabMan

Overview

LabMan is a laboratory management system originally designed for CUHK MMLab. This web-based system provides convenience for:

  • Member management
  • Publication management
  • Facility management (not completed)
  • Information statistics

###Screenshots screenshot

Requirements

  • Python 3.3+ (Python 2.7+ should be ok but not tested)
  • MongoDB (version 3.2+ recommended)

Run

Create a virtual enrironment (optional but recommended)

# For OSX with python3 installed through brew
venv ./venv
source venv/bin/activate
# For Linux
python3 -m venv ./venv

There may be errors thrown out when creating virtual environment on some distributions of Linux, you can first create it without pip, then install pip manually, taking Ubuntu 16.04 LTS for example.

sudo apt-get install python3-venv
python3 -m venv --without-pip ./venv
source venv/bin/activate
wget https://bootstrap.pypa.io/get-pip.py
python3 get-pip.py
deactivate
source venv/bin/activate

Install dependencies

  • Python dependencies

    pip3 install -r requirements.txt
  • MongoDB

    brew install mongodb # For OSX
    sudo apt-get install mongodb # For Ubuntu

Modify the configuration file

First rename the config file.

cp app/config_default.py app/config.py

The configuration file is like the following, modify it as you want.

# Global configuration variable
CONFIG = {
    # service url starting with http
    'url': 'http://localhost',
    # lab name will be shown on the signin page
    'lab_name': 'Multimedia Laboratory',
    # database info
    'db': {
        'ip': 'localhost',
        'port': 27017,
        'name': 'mmlab'
    },
    # log configuration
    'log': {
        # logging levels: 'DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL'
        'level': 'INFO',
        # whether to use capped collections to support high-throughput operations
        'capped': False
    },
    # mail server settings, used for sending notification mails, disabled if empty
    'mail': {
        # 'server': 'localhost',
        # 'port': 465,
        # 'use_ssl': True,
        # 'address': 'xxx@example.com',
        # 'password': ''
    },
    # `mode` can be either 'debug' or 'deploy'
    'run_mode': 'debug',
    # positions to be chosen from, list of tuples
    'positions': [
        ('1', 'Professor'),
        ('2', 'Postdoctoral Researcher'),
        ('3', 'PhD'),
        ('4', 'MPhil'),
        ('5', 'Master'),
        ('6', 'Research Assistant'),
        ('7', 'Intern'),
        ('0', 'Others'),
    ],
    # indicate which positions belong to supervisors
    'supervisor_positions': ['1'],
    # predefined conference names that will be shown as select options
    'conferences': [
        'The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)',
        'The IEEE International Conference on Computer Vision (ICCV)',
        'European Conference on Computer Vision (ECCV)',
        'Conference on Neural Information Processing Systems (NIPS)',
        'The International Conference on Machine Learning (ICML)',
        'AAAI Conference on Artificial Intelligence'
    ],
    # predefined journal names that will be shown as select options
    'journals': [
        'IEEE Transactions on Pattern Analysis and Machine Intelligence (PAMI)',
        'IEEE Transactions on Image Processing (TIP)',
        'International Journal of Computer Vision (IJCV)'
    ]
}

Start mongodb service

You can either use the default directory to store the database data or specify a directory to store it.

mkdir dbdata
mongod --dbpath dbdata

Init database

./initdb.py

This script will create databases as well as an initial admin account with random password, the output should be like the following:

Initializing the database...
Initialization done
Initial admin username: admin, password: ln8nWjX8

Run the app

./run.py

TODO list

  • Use configuration file
  • Register page
  • Check name collision when adding a new user or registering
  • Implement "remember me" checkbox
  • Upload avatar
  • Change password
  • Admin settings, such as set the auth level of members
  • Select supervisor instead of inputting
  • Show all members according to the admission year and position
  • Make supervisor on the member overview page clickable
  • Delete publications
  • Support submitting forms besides bibtex to add publications
  • Notification module
  • Log users' activities
  • Search box
  • Facility management
  • Show statistics
  • Support candidates and alumni
  • Design an icon for LabMan

About

A lab management system based on Flask.

License:MIT License


Languages

Language:HTML 48.7%Language:JavaScript 40.8%Language:CSS 9.8%Language:Python 0.7%Language:PHP 0.1%