Skip to content

Improved plan generator - #679

Open
cytadela8 wants to merge 11 commits into
masterfrom
plan-gen-improve
Open

Improved plan generator#679
cytadela8 wants to merge 11 commits into
masterfrom
plan-gen-improve

Conversation

@cytadela8

@cytadela8 cytadela8 commented Jun 29, 2025

Copy link
Copy Markdown
Member

This change is Reviewable

@cytadela8
cytadela8 requested a review from Copilot June 29, 2025 11:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR modernizes and refactors the workshop plan generator by migrating to Python 3, introducing CLI argument parsing, and restructuring the core plan optimization and evaluation logic.

  • Switch script to Python 3 and add argparse-based CLI
  • Refactor user/workshop initialization and participation processing
  • Enhance Plan class with constants-driven mutations, evaluation, and optimization
Comments suppressed due to low confidence (2)

make_plan.py:60

  • The comment states "2023 WWW workshops" but the dates refer to 2025; please update the comment to reflect the correct year.
# Block dates for 2023 WWW workshops

make_plan.py:104

  • [nitpick] The key name 'part' is ambiguous; consider renaming it to 'participation' or 'registered_workshops' for clarity.
        users_dict[uid]['part'] = set()  # Workshops the user participates in

Comment thread make_plan.py
print("COLLISION OF LECTURER")
print("\tlec_uid={uid} wid={wid}".format(
uid=lec_uid, wid=wid))
points -= 10**6

Copilot AI Jun 29, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable points is used here without being initialized at the start of evaluate. You should initialize points (and similarly points_col) to 0 before applying penalties.

Copilot uses AI. Check for mistakes.
Comment thread make_plan.py
print(" collisions / user collisions:",
collisions, "/", collision_users)
print("-------")
print("colisions total = {sum}, colision users total = {users}".format(

Copilot AI Jun 29, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The word "colisions" (and "colision") is misspelled; it should be "collisions".

Suggested change
print("colisions total = {sum}, colision users total = {users}".format(
print("collisions total = {sum}, collision users total = {users}".format(

Copilot uses AI. Check for mistakes.
Comment thread make_plan.py
Comment on lines +137 to +143
def process_participation(participation_data, users_dict, workshop_ids):
"""Process participation data to track which users are participating in which workshops.

Args:
participation_data: List of participation records with uid and wid
users_dict: Dictionary of users with initialized blocks and participation sets
workshop_ids: List of workshop IDs

Copilot AI Jun 29, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function relies on the global workshops variable but only receives workshop_ids. Consider passing the workshops dict as an explicit parameter to reduce hidden global dependencies.

Suggested change
def process_participation(participation_data, users_dict, workshop_ids):
"""Process participation data to track which users are participating in which workshops.
Args:
participation_data: List of participation records with uid and wid
users_dict: Dictionary of users with initialized blocks and participation sets
workshop_ids: List of workshop IDs
def process_participation(participation_data, users_dict, workshop_ids, workshops):
"""Process participation data to track which users are participating in which workshops.
Args:
participation_data: List of participation records with uid and wid
users_dict: Dictionary of users with initialized blocks and participation sets
workshop_ids: List of workshop IDs
workshops: Dictionary of workshop data

Copilot uses AI. Check for mistakes.
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