-
Notifications
You must be signed in to change notification settings - Fork 6
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
Improve instructions for dev env #86
base: master
Are you sure you want to change the base?
Conversation
@@ -65,8 +66,8 @@ def run_submission(submission_id): | |||
if submission.assignment.venv_fully_created: | |||
python_exe = os.path.join(submission.assignment.venv.path, "bin", "python") | |||
elif settings.DEBUG: | |||
python_exe = shutil.which("python") or shutil.which("python3") | |||
else: | |||
python_exe = sys.executable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Smart!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The improvements to the documentation and setup scripts are very helpful. These changes look good to me!
scripts/create_wrappers.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit confused on what this file's purpose is. I'm pretty sure that even without access to the sandboxing
submodule, sandboxing code in the module here takes care of everything that's necessary (and you wouldn't need to define these redundant-looking wrappers..?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, you're right, I forgot about my lazy implementation (re: here if anyone's curious).
I still think the way you're getting around this is unideal - I think it would be better to edit the code itself to work without a sandboxing module, as opposed to "emulating" one yourself with a script.
Editing the run_submission
code should be quite feasible (even good-first-issue
level, almost) and would be the right way to go forward (correct me if I'm wrong). But I'd be happy to merge this in for now as a temporary workaround, so we don't hold back development. Let me know what you think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just committed a change that voids the need for the script. If you think it's too big of a change for this PR, I'd be happy to move it to a separate PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, this is a great change! I've had the idea for a while but never got the time, so I'm glad it's finally happening.
This wrapper will only take effect if DEBUG is False and the sandboxing submodule isn't cloned.
dba8e01
to
8fa21a4
Compare
Just a bunch of patches and stuff I had to do to get local submissions working.
It also improves the documentation, and adds a script or two.