GithubHelp home page GithubHelp logo

zeusops-attendance-analysis's Introduction

ZeusOps Attendance Analysis

Data analysis on the Zeusops ArmA unit attendance sheet

Requires Python 3.10

Usage

Generate the database from attendance CSV, then visualize it as a local website

Run the command

Install the dependencies first:

make install
# or
poetry install

Download the Attendance sheet as CSV from Google Docs, save it as attendance.csv then run it through the scripts provided:

make serve
# aka
zeusops-attendance-analysis attendance.csv attendance.db

This generates an sqlite database of our attendance sheet, which can be visualized via:

poetry run datasette -i attendance
# aka
make serve

Then inside the virtual environment, launch the command:

# Run single command inside virtualenv
poetry run zeusops-attendance-analysis attendance.csv attendance.db

# or
# Load the virtualenv first
poetry shell
# Then launch the command, staying in virtualenv
zeusops-attendance-analysis attendance.csv attendance.db

Development

Python setup

This repository uses Python3.10, using Poetry as package manager to define a Python package inside src/zeusops_attendance_analysis/.

poetry will create virtual environments if needed, fetch dependencies, and install them for development.

For ease of development, a Makefile is provided, use it like this:

make  # equivalent to "make all" = install lint docs test build
# run only specific tasks:
make install
make lint
make test
# Combine tasks:
make install test

Once installed, the module's code can now be reached through running Python in Poetry:

$ poetry run python
>>> from zeusops_attendance_analysis import main
>>> main("blabla")

This codebase uses pre-commit to run linting tools like flake8. Use pre-commit install to install git pre-commit hooks to force running these checks before any code can be committed, use make lint to run these manually. Testing is provided by pytest separately in make test.

Documentation

Documentation is generated via Sphinx, using the cool myst_parser plugin to support Markdown files like this one.

Other Sphinx plugins provide extra documentation features, like the recent AutoAPI to generate API reference without headaches.

To build the documentation, run

# Requires the project dependencies provided by "make install"
make docs
# Generates docs/build/html/

To browse the website version of the documentation you just built, run:

make docs-serve

And remember that make supports multiple targets, so you can generate the documentation and serve it:

make docs docs-serve

Templated

This repo is templated, using commit hash: f596a46e4abf80e84e659353d5daaf54c5d01d78

TODO list

This code is obviously not done. The following are improvements I'll be considering soon:

  • Merging data from #attendance channel (for reducing error rates)
  • Adding a table for roles to separate the junk-y ones ("PRESENT") from the T1s etc
  • Enhance operations data by injecting #events-briefing data
  • Add the info from the #events bot to the operations

zeusops-attendance-analysis's People

Watchers

 avatar  avatar

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.