Skip to content

Add attendance functions and setup script#1

Open
ed522 wants to merge 126 commits intoGraham277:masterfrom
ed522:master
Open

Add attendance functions and setup script#1
ed522 wants to merge 126 commits intoGraham277:masterfrom
ed522:master

Conversation

@ed522
Copy link

@ed522 ed522 commented Dec 26, 2025

Adds all features to communicate with the attendance endpoint and GCP service account, as well as supporting things like secret management. Also adds some convenience tools like a sample .env file. Finally, it adds a large script called setup.py.

setup.py is an installer, uninstaller and secret helper. Install copies the project files to one of three installation directories, adds symlinks (if necessary) and installs a systemd. Uninstall gets rid of everything (except keyring credentials). Import reads secrets.json from any path, then imports it into a keyring, or systemd-creds - which stores the encrypted secrets directly in the unit file, removing the keyring dependency.

Summary of changes (by file):

New:

  • /AttendanceCodeCommunicator.py: communicates with Java endpoint
  • /SheetsManager.py: handles auth/writing to a sheet
  • /setup.py: installer, uninstaller and key import helper
  • /cogs/MarkHere.py: marks someone off the attendance with a code (command)
  • /start.sh: quickly source a virtualenv folder and start up
  • /example.env: sample .env file with placeholder values
  • /requirements.txt: list of dependencies, generated by pip

Changed:

  • /.gitignore: ignore secrets.json, venv, pycaches
  • /README.md: almost replaced the entire file. Added information on installation and keyrings. Added more instructions on token management. Added instructions on setting up a Discord app and GCP project. Added more information on .env file. Added more running instructions. Added uninstallation instructions. Added troubleshooting section.
  • /main.py: Added $DOZER_DOTENV_PATH which overrides .env location. Added shebang. Added command line switch parsing. Added switches for importing secrets and disabling attendance features. Added code to check .env for required fields.

@ed522
Copy link
Author

ed522 commented Dec 26, 2025

Currently not ready to commit, as there is more testing and fixing to be done.

As of now I see no blockers but there are 2 fixable issues. I'm planning on doing a "burn-in" test over a couple weeks, which hopefully can weed out any important bugs.

@ed522
Copy link
Author

ed522 commented Jan 1, 2026

I don't think anything is currently blocking this from merge. Marking ready for review.

@ed522 ed522 marked this pull request as ready for review January 1, 2026 16:46
ed522 and others added 8 commits January 12, 2026 18:51
Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.6.2 to 2.6.3.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](urllib3/urllib3@2.6.2...2.6.3)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-version: 2.6.3
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
---
updated-dependencies:
- dependency-name: aiohttp
  dependency-version: 3.13.3
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [pyasn1](https://github.com/pyasn1/pyasn1) from 0.6.1 to 0.6.2.
- [Release notes](https://github.com/pyasn1/pyasn1/releases)
- [Changelog](https://github.com/pyasn1/pyasn1/blob/main/CHANGES.rst)
- [Commits](pyasn1/pyasn1@v0.6.1...v0.6.2)

---
updated-dependencies:
- dependency-name: pyasn1
  dependency-version: 0.6.2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants