Skip to content

Allow choosing custom versions of python for graders #92

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
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

JasonGrace2282
Copy link
Member

@JasonGrace2282 JasonGrace2282 commented Nov 11, 2024

Motivation

  • Sets us up for supporting Java (notably this DOES NOT add official Java support)
  • Allows us to offer higher versions of python, without breaking backwards compatibility with graders relying on python 3.10 behavior

This PR also does not add a warning banner if an assignment is using a deprecated version of a language, in order to reduce the already large and complex diff. This would be better as a "good first issue".

Implementation

This adds a new model, Language, which stores information about the language, binary path, and more. The field Assignment.language has been moved inside said model. All the information about the specific language is stored in a dictionary called info.

The info dictionary must contain a version key that is sortable. For the python grader language, it must also contain the key python3 which has the absolute path to a python executable.
The addition of another language to Tin can then consist of simply adding other keys to the info dictionary as needed.

Important

Custom migrations were written in order to facilitate this transition with minimal problems.

The rest is just some restructuring:

  • Changes the run_submission task to use the assignments executable
  • Filters the edit assignment/create venv to only show non-deprecated language options.
  • Changes the create_venv task to use the correct executable

@JasonGrace2282 JasonGrace2282 self-assigned this Nov 11, 2024
@JasonGrace2282 JasonGrace2282 marked this pull request as ready for review November 14, 2024 03:44
@JasonGrace2282 JasonGrace2282 requested a review from a team as a code owner November 14, 2024 03:44
@JasonGrace2282 JasonGrace2282 marked this pull request as draft November 14, 2024 04:39
@JasonGrace2282 JasonGrace2282 marked this pull request as ready for review November 15, 2024 03:54
@JasonGrace2282 JasonGrace2282 force-pushed the choose-python branch 4 times, most recently from 403c0bf to 46e2c8d Compare November 16, 2024 15:57
@JasonGrace2282 JasonGrace2282 force-pushed the choose-python branch 2 times, most recently from 7e4ee25 to 0b538be Compare January 11, 2025 21:40
@JasonGrace2282 JasonGrace2282 added the complex PRs or issues requiring substantial effort to implement and/or review label Feb 21, 2025
@JasonGrace2282 JasonGrace2282 force-pushed the choose-python branch 2 times, most recently from 59b4a28 to 1ae6f60 Compare June 1, 2025 20:57
JasonGrace2282 and others added 2 commits June 11, 2025 13:51
Custom migrations were written to safely transfer data,
and handle deprecated languages.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app/assignments area/backend complex PRs or issues requiring substantial effort to implement and/or review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants