Skip to content
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

Allow presetting files in the isolated dir #88

Closed
caphindsight opened this issue Jun 15, 2019 · 3 comments
Closed

Allow presetting files in the isolated dir #88

caphindsight opened this issue Jun 15, 2019 · 3 comments

Comments

@caphindsight
Copy link

Use cases that I see:

  • Could be useful for example if the isolated program assumes that the input is contained in a specially named file, say, input.txt
  • I think this feature would provide a good solution for Checkers #32 – I doubt adding the "checker" step would be generic enough for all users; I think a better approach is to keep the API on the low level let the users orchestrate checking by themselves. This could be easily achieved if the checker can be fed multiple files, e.g. input.txt, output.txt, answer.txt (aka expected output). The caller can then analyze the text output generated by the checker, in, say, verdict.txt).
  • Some programs span multiple source files. Automatic systems could compose the contestant's code with preset sources with the test data already in place, for example, so that instead of implementing reading the input and writing the output the contestant can focus on implementing a function that solves the problem. Composing multiple source files into one is very hard to do right generically in most programming languages.

I believe all these issues can be solved by simply provifing the multiple source/input/output files feature (or even better, arbitrary isolated directory layout). Thoughts?

@hermanzdosilovic
Copy link
Member

Hi @caphindsight,

sorry for the late response on this topic. As I am more and more interested in implementing this feature I would like to start discussion about it.

Given the current API, how would you suggest that the API call needs to look like to support this feature of sending multiple files that will be located in the sandbox?

@caphindsight
Copy link
Author

I don't have anything specific in mind just yet.

Do you think it is worth designing the API such that a virtual environment can be reused between submissions?

Personally, I would love to see a more low-level interface to isolate, that exposes its features through API calls. I.e. creating sandboxed environments, uploading/downloading files, running programs. That would be a big change though, so I'm not sure that it is feasible.

@hermanzdosilovic
Copy link
Member

This is now available in v1.6.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants