Skip to content

feat: allows you to add extra pip requirements to your codejail sandbox DS-697#42

Merged
MaferMazu merged 2 commits intomainfrom
mfmz/feat-extra-pip-requirements
Nov 18, 2023
Merged

feat: allows you to add extra pip requirements to your codejail sandbox DS-697#42
MaferMazu merged 2 commits intomainfrom
mfmz/feat-extra-pip-requirements

Conversation

@MaferMazu
Copy link
Contributor

Description

This PR allows you to add extra pip requirements to your codejail sandbox.

Related: #41

How to test

  1. Install this version of tutor-contrib-codejail.
  2. Add in your tutor config.yml the following:
CODEJAIL_EXTRA_PIP_REQUIREMENTS:
- pybryt

(You can use any pip package)
3. Save your configuration in Tutor.

tutor config save
  1. Create a new codejail image.
tutor images build codejail
  1. Run codejail.
tutor local do init --limit codejail
  1. Launch your environment.
tutor local launch

Expected Behavior

  • You should be able to import the package you installed in a loncapa problem.
    (In Studio > Create a course > Create a Subsection > Create a Unit > Add a Problem > Select Advance and Custom Python-Evaluated Input > Edit the problem > Import the package you installed in the loncapa script)
    Example:
<script type="loncapa/python">
import pybryt

def test_add_to_ten(expect, ans):
    return test_add(10, ans)

</script>

@MaferMazu MaferMazu linked an issue Nov 15, 2023 that may be closed by this pull request
@MaferMazu MaferMazu requested a review from a team November 16, 2023 03:16
@MaferMazu MaferMazu changed the title feat: allows you to add extra pip requirements to your codejail sandbox feat: allows you to add extra pip requirements to your codejail sandbox DS-697 Nov 16, 2023
Copy link

@bra-i-am bra-i-am left a comment

Choose a reason for hiding this comment

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

Working as expected!

Copy link

@luisfelipec95 luisfelipec95 left a comment

Choose a reason for hiding this comment

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

looks good to me

@MaferMazu MaferMazu force-pushed the mfmz/feat-extra-pip-requirements branch from 2c17732 to 335fcfc Compare November 18, 2023 17:42
@MaferMazu MaferMazu merged commit ec78ac6 into main Nov 18, 2023
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.

["FEAT"] Be able to incorporate custom packages

4 participants