GithubHelp home page GithubHelp logo

wallchart's Introduction

Wallchart

This repository contains a tool to manage (student) union members and track digital wall charts. It's specifically crafted for the University of Hawaii, Manoa but could be modified for a more general purpose.

The technology is based on Python using the Flask web framework.

Installation

The tool uses poetry and is therefore trivially to install. If poetry is not yet installed on the system, do so by running the following command.

pip install poetry

To install wallchart just use pip

pip install wallchart

Now all dependencies should be in place and it's possible to either run wallchart or start developing. Next you should create a config.py file which contains both an admin password as well as an application secret (used to encrypt cookies).

A config.py file should contain at least the following settings:

ADMIN_PASSWORD = "changeme"
SECRET_KEY = "changeme"

Optionally define DATABASE if you don't like the sqlite database at ./wallchart.db.

Running

To run wallchart you may use gunicorn to allow multiple connections at once (i.e. multiple people use it at the same time). Install gunicorn using the command below.

poetry add gunicorn

To run wallchart execute the following command.

poetry shell
gunicorn

You'll find the web interface at http://localhost:8000

Docker

The config.py should define the database in it's own folder, like below:

DATABASE = "/database/database.db"

Run this in Docker, if you like:

docker run \
	-v $(pwd)/config.py:/app/config.py \
	-v wallchart-database:/database/ \
	-p 8000:8000 \
	--rm \
	wallchart

Development

Get the source code

git clone https://github.com/aparcar/wallchart.git
cd wallchart/
poetry install

For development you may use the internal Flask web server which automatically reloads files after modification.

poetry shell
export FLASK_DEBUG=1
flask run

After changing things, don't forget to see if all tests still pass.

poetry shell
pytest

wallchart's People

Contributors

aparcar avatar runburg avatar programmiana avatar dependabot[bot] avatar eragrostis avatar

Stargazers

 avatar Dez avatar

Watchers

James Cloos avatar  avatar  avatar  avatar

wallchart's Issues

Change the workers returned to a user based on department and organizing department

When we assign a member to an organizing department, we ideally want them to appear in both their organizing department list and their department list.

It would be nice if we could also somehow visually distinguish this by using a grayed out background or something for the members that are cross listed.

I think we should prioritize organizing department and then below that show the rest of the members that are in that department but in different organizing departments.

Problems with counting employees

Looking at the units view at UH Hilo, says there are 15 employees but there are only 12 if you add up the employees from departments view.

Also, American Studies progress bar says 16 employees but there are 17...

Need to look at logic to see if we are counting wrong worker or not based on 'organizing dept'?

Structure test display and functionality

The current structure test is not displaying correctly.
Screen Shot 2021-08-05 at 2 23 35 PM

Also, the editing menu for structure test has a dead link (I'm not sure where it's supposed to go but if you click on "Member" just get a Not Found message)
Screen Shot 2021-08-05 at 2 23 51 PM

Parsing phone number and email

Right now, phone number and email are initialized to null, but when a worker is edited for the first time both fields are set to whatever information is provided OR "" (empty string). This is bad because anytime another worker is edited and those fields are left blank, the uniqueness of phone number/email are violated and an error is thrown.

If there is no way for the html form to return null (rather than empty string), then we have to parse the response to check for "". A slightly awkward way of doing this is changing lines 265 & 266 to

Worker.email: (email if (email := request.form["email"].strip()) else None),
Worker.phone: (phone if (phone := request.form["phone"].strip()) else None),

but this is awkward. How to fix??

Title text on icons and progress bars

So I think it would be useful (and user-friendly) to add title text to different components of the site in order to increase user experience and clarify any potentially confusing features.

Essentially, this just amounts to adding a title element to the different HTML components which should be a straightforward addition.

In the users interface at line 47, would need to insert

title="Save changes"

In the departments view at line 30 and line 36 would need

title="{{ department.latest }} / {{ department.worker_count }} completed"

Structure tracking!!!

So this is maybe a huge request and will probably take a significant amount of work, but it would be really cool if we could track the progress of structure tests as a function of time and also total number of people who have done the thing.

Things this would probably require:

  • New page to see the visualizations
  • A way of cacheing or tracking the number of people who have completed the structure tests on a departmental or unit level as a function of time.
  • Time series and overall progress chart (I'm thinking a little thermometer increasing up to 100% like they do for donation drives)
  • We also probably want summaries of structure tests

Workers erroneously getting inactivated with new roster

So it seems that workers are gettting marked inactive upon uploading a new roster in a specific case: If the worker's department changes in the new roster, then they are marked inactive. The information about the department changing functions correctly.

I think this is a problem with

Worker.update(active=False).where(Worker.updated != date.today()).execute()

Differentiate background of rows in table

When looking at a long list of items (say all the members of a department), it's very hard to track which information corresponds to which row (i.e. structure tests are so far to the right of the screen that it's very easy to click the wrong one).

We should color the rows in alternating colors to make it easier to use.

Edit department names

Something we are encountering already is that there are a few departments with very confusing names it would be nice to be able to edit them in some way or manually add some. That way we could set certain people's "organizing department" to the manually added department.

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.