Skip to content

Commit 8e8dce1

Browse files
authored
Merge pull request #145 from rage/sandbox-image
added support for sandbox_image in tmcproject
2 parents 7c0b3eb + bbcfa3b commit 8e8dce1

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

docs/tmcproject.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ All of the keys listed below are optional.
1313
| no-tests | Boolean OR Map "points" -> List of string OR integer | If set to true or a map, the no-tests plugin is used for the exercise. If set to a list, the list will be used as the exercise's points. |
1414
| fail_on_valgrind_error | Boolean | If set, the C plugin will attempt to run valgrind and fail the exercise if it discovers errors. |
1515
| minimum_python_version | Python version string | Must be "{major}.{minor}.{patch}", "{major}.{minor}" or "{major}". If set, the Python plugin will warn the user if the Python version being used is below the given minimum version. |
16+
| sandbox_image | The Docker image that should be used at the sandbox. | Should be a URL. |
1617

1718
## Example file contents
1819

@@ -32,6 +33,7 @@ no-tests:
3233
- point
3334
fail_on_valgrind_error: false
3435
minimum_python_version: "3.8"
36+
sandbox_image: "eu.gcr.io/moocfi-public/best-image"
3537
```
3638
3739
## Default student and exercise files

tmc-langs-framework/src/tmc_project_yml.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ pub struct TmcProjectYml {
4242
#[serde(default)]
4343
#[serde(skip_serializing_if = "Option::is_none")]
4444
pub minimum_python_version: Option<PythonVer>,
45+
46+
#[serde(default)]
47+
#[serde(skip_serializing_if = "Option::is_none")]
48+
pub sandbox_image: Option<String>,
4549
}
4650

4751
impl TmcProjectYml {

tmc-langs/src/course_refresher.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ pub fn refresh_course(
8989
.collect::<Vec<_>>();
9090

9191
// collect .tmcproject.ymls and merge the root config with each exercise's, if any
92-
let root_tmcproject_yml = TmcProjectYml::load(&course_cache_path)?;
92+
let root_tmcproject_yml = TmcProjectYml::load(&new_clone_path)?;
9393
let exercise_dirs_and_tmcprojects =
9494
get_and_merge_tmcproject_configs(root_tmcproject_yml, &new_clone_path, exercise_dirs)?;
9595
progress_stage("Merged .tmcproject.yml files in exercise directories to the root file, if any");

0 commit comments

Comments
 (0)