Skip to main content

LupSeat

LupSeats assigns seats to students in a smart and automatic away. View gitlab pages link: luplab.gitlab.io/lupseat/ View pypi link: pypi.org/project/LupSeat

Instructions

Install with

pip3 install lupseat

Run with

lupseat --student students_file --seats seats_file [OPTS]

Required Args

  • students_file - A csv file containing first name, middle name, last name, student id, dominant hand, special needs flag (see students.csv for example)

  • seats_file - A yaml file containing the room seating information. (see seats.txt for example)

Optional Args

  • --out output_file_name

  • --fmt output_format_string

  • --sort_by sort_criteria

  • --g_chart output_chart_image_file_name

  • --g_room output_image_file_name

  • --g_chart_size output_chart_image_size

  • --g_room_size output_image_size

  • --seed seed_for_rand

  • --algorithm algorithm_type

  • --partner partner_file - Specifies whiich students have worked together as partners before.

  • --gui - A flag to open GUI mode.

  • --eval - A flag to produce evaluation score (average number of students sitting next to each other). Lower score is better.

  • --nosave - A flag to disable saving output files (used primarily for automated evaluation).

Algorithm Types

  • RandomAssign - random assignment of seats
  • ChunkIncrease - slowly increase chunk size (i.e. number of students sitting together) until all students can fit in a room. A bottom up approach.
  • ConsecDivice (Default) - consecutively divide the room until all empty seats are allocated. A top down approach.

Sort Criteria

Sorting can be done via fname, lname, sid, or seat.

Image Sizes

Image sizes can be done by specifying a standard paper size (e.g. A4). Then, an extra keyword "flip" can be appended to the argument to flip between landscape and portrait.

Output format string

The output format string specifies how students are identified in the output file.

Variable names: sid, fname, lname.

Variable names in format string must be encased by brackets, and can be sliced using the bar operator.

Examples

{fname} {lname} has sid {sid}

{sid|-5,-1}

{fname|0}.{lname|0}.

Unit Tests

Run unit tests with python3 -m unittest unit-tests/*_test.py

Fuzz Test & Algorithm Evaluation

Run fuzz test with cd scripts && ./alg_evaluator.sh. This will produce run 500 tests with randomized seats and students for each algorithm, then average out the evaluation scores (see --eval).

The lowest score is the best performing test.

Build Instructions

Building for pip requires setup_tools, wheel, tqdm, and twine to be installed with pip.

python3 setup.py bdist_wheel
python3 -m twine upload dist/*

Build for Mac

Since Mac has python installed by default, the executable only makes sure lupseat is installed via pip, then calls the lupseat command.

Build for Windows

First install lupseat and pyinstaller with python-pip.

py -m pip install lupseat pyinstaller

Next, navigate to C:\Users\{user}\AppData\Local\Programs\Python\Python39\Scripts and run the following command

.\pyinstaller.exe --onefile --noconsole lupseat

The exe file generated in the dist\ directory is a standalone executable.

Metadata

Release files for LupSeat 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for LupSeat 1.3.0
File Interpreter ABI Platform
LupSeat-1.3.0-py3-none-any.whl Python 3 none any Details

Release files / LupSeat-1.3.0-py3-none-any.whl

Download URL LupSeat-1.3.0-py3-none-any.whl
Size 19.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
342774f7b4abbea70853b4643f52001476432d0006aaa57e95aedc8df361383d
BLAKE2b-256 checksum
How to use checksums
0fb47da2bc990a65698ebd14572af6410aaf711d5eebb9d47741194f619c1091
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.2

Release history Release notifications | RSS feed

This release

1.3.0 This release

1 release file

1.2.0

1 release file

1.1.4

1 release file

1.1.3

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page