Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open Source Proposal (to this repo) #2480

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

bjornthiberg
Copy link
Contributor

Assignment Proposal

Title

CI job for live counting active participation

Names and KTH ID

Deadline

  • Deadline 1

Category

  • Open source

Description

Concerns issue #2459 in this repo.

The structure of both script and workflow YAML file is based on the already existing workflow for updating the Statistics of Student Registrations. It has a similar structure, can be run locally in the same way, and uses the same dependencies.

How it's supposed to work:

GitHub actions workflow

  • The workflow is triggered on new issue comments, and proceeds if the issue title is “Lecture participation tracker 2024”.
  • track_participation.py is run

Python script (track_participation.py):

  • Fetches all comments to the issue from the GitHub API
  • If the author is a collaborator, or the comment is outside the commenting window (5 hours from the start of each lecture), the comment is ignored.
  • Valid comments are stored in a dictionary, with keys for each student who has commented.
  • The script generates a markdown table, similar to the one for tracking tasks, which displays the lectures each student has attended.
  • The issue description is updated with this markdown table and a timestamp.

Updating for newer years should only require changing the lecture dates and issue number in the JSON config file.

Relevance

This contribution would set up a CI job for a repository for a course in DevOps. Highly relevant!

@algomaster99
Copy link
Collaborator

Thank you so much for working on this!

@algomaster99 algomaster99 merged commit b3eb92d into KTH:2024 Sep 12, 2024
2 checks passed
@bjornthiberg bjornthiberg deleted the bjornthiberg-open-source branch September 13, 2024 07:52
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