Best place to put library files used throughout one course #5529
Replies: 1 comment 2 replies
-
We don't have a solution in place for "files used throughout one course". The most straightforward way would be to include the file in each exercise directory or include it once and use symlinks (although I'm not sure how git handles these). We do have courses/exercises that require specific libraries. In these cases, we added the libraries to the docker image (so not the judge, but the image where it runs). An exercise can specify the image that needs to be used so this way, you could create a specific image for your course (e.g. by extending the existing image). We used this approach for a computational biology course that required additional python libraries. However, in practice, I think we now use the "big" image for all Python exercises. |
Beta Was this translation helpful? Give feedback.
-
Summary
I'm preparing a new course repository that will make use of the Scheme Dodona judge. Most exercises of the course depend on an
r7rs
Scheme software library. I'm wondering what is the best way to expose libraries to exercises in Dodona.Constraints
There are two constraints that influence my options:
racket
binary. As far as I know, it is not possible to specify a library's folder dynamically (i.e., fromr7rs
Scheme code). Hence it does not appear to be possible to have an individual "exercise" load a copy of the library from within itsevaluation
folder: the libraries' folders have to be known at the point at which theracket
binary is invoked. This binary is invoked by therun
script of the judge, i.e., once per submission.Combining both constraints, it would appear that the library has to be made available at a higher level than individual exercises, but not at the level of the judge, i.e., at the level of a course.
Currently Considered Options
Our current idea would be to extend the Scheme Dodona judge with the logic to consider an extra
libraries
option to thedirconfig.json
configuration of a course repository. Using thelibraries
option, course developers could then specify which libraries their exercises depend on. The libraries could be identified in one of the following ways, each with their own drawbacks:./media
nor./public
really seem to be intended for source code. Are these folders even visible to the judge'srun
script?We are leaning towards the middle option, as that one makes most sense, but that requires help from the Dodona developers: we'd need some place to put the library in the repository directory structure.
Questions
Does anyone have a solution or insights in the best way to approach this? Does this sound like a more general problem that can be tackled by Dodona by, e.g., introducing a
./libraries
folder into the repository directory structure, or is this unique to our situation (and hence to be fixed by a "workaround" rather than a systemic solution)?Thanks for your feedback.
Beta Was this translation helpful? Give feedback.
All reactions