Skip to content

Conversation

iqbalcodes6602
Copy link
Collaborator

Fixes: #16

  • Added the adding_removing_problems.json file which would contain the list of problems, having alias of assignment and course in which the problem needs to be added or removed.
  • Created the update_assignment_problems.py script which fetched the problems to be added or removed from the adding_removing_problems.json file and has functions-
    • add problem - adds the problem to the specfic assignment in a course, if a assignment is not there it would create a assignment based on the given alias, it would also download the problem and store it in the Courses folder in respective course and assignment
    • remove problem - removes the problem to the specfic assignment in a course, and then it deletes the problem folder from respective course folder.
    • it finally resets the adding_removing_problems.json.
  • Created a github action modify-assignments.yaml which would run the update_assignment_problems.py for automatic integration.

@pabo99 pabo99 requested review from Copilot and removed request for Copilot August 5, 2025 16:07
Copy link

@Copilot Copilot AI left a comment

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 implements functionality to add and remove problems from course assignments via JSON configuration and automation. The changes enable automated management of OmegaUp course content through a JSON file that specifies which problems to add or remove from specific assignments.

Key changes include:

  • Creation of a Python script for automated problem addition/removal from course assignments
  • Addition of a JSON configuration file for specifying problem operations
  • Implementation of GitHub Actions workflow for automated execution

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
utils/update_assignment_problems.py Main script implementing problem addition/removal logic with API integration and file management
adding_removing_problems.json Configuration file with empty arrays for specifying problems to add/remove
.github/workflows/modify-assignments.yaml GitHub Actions workflow to automatically run the problem update script
Comments suppressed due to low confidence (2)

.github/workflows/modify-assignments.yaml:32

  • The pipenv version 2023.11.15 may not exist. Consider using a known stable version or removing the version constraint to use the latest available version.
        pip install pipenv==2023.11.15

Copy link
Collaborator

@pabo99 pabo99 left a comment

Choose a reason for hiding this comment

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

In addition to Copilot’s suggestions, I left you some extra comments.

- removing global var and using dep injection instead
@iqbalcodes6602 iqbalcodes6602 requested a review from pabo99 August 7, 2025 17:43
Copy link
Collaborator

@pabo99 pabo99 left a comment

Choose a reason for hiding this comment

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

Great!

@pabo99 pabo99 merged commit 800a6a3 into omegaup:main Aug 7, 2025
1 check passed
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.

Contributor Workflow & Permissions
2 participants