-
Notifications
You must be signed in to change notification settings - Fork 69
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
Add support for qmd #816
base: master
Are you sure you want to change the base?
Add support for qmd #816
Conversation
Other places I need to modify the tests are |
]) | ||
with FILE_MANAGER.open("autograder/source/otter_config.json", "w") as f: | ||
f.write(cpy) | ||
with FILE_MANAGER.open("rmd-autograder/source/otter_config.json", "w") as f: | ||
f.write(crmd) | ||
with FILE_MANAGER.open("qmd-autograder/source/otter_config.json", "w") as f: | ||
f.write(cqmd) |
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.
make sure to read the contents of this file and create the cqmd
variable before the yield
statement above.
if rmd == True & qmd == False: | ||
dirname = "rmd-autograder" | ||
if rmd == False & qmd == True: | ||
dirname = "rmd-autograder" |
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.
can this block of ifs to
prefix = ""
if rmd: prefix = "rmd-"
if qmd: prefix = "qmd-"
dirname = f"{prefix}autograder"
def load_config_file(rmd=False, qmd=False): | ||
with open(get_config_path(rmd=rmd, qmd=False)) as f: | ||
return json.load(f) | ||
with open(get_config_path(rmd=False, qmd=qmd)) as f: |
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.
You don't need multiple with
blocks; you can just do a single one with with open(get_config_path(rmd=rmd, qmd=qmd)) as f:
return json.load(f) | ||
return load_config_file | ||
|
||
|
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.
please add this blank line back -- style guide is two blank lines between top level def
statements
def test_qmd(load_config, expected_qmd_results): | ||
name = "hw01" | ||
config = load_config(qmd=True) | ||
qmd_path = FILE_MANAGER.get_path("rmd-autograder/submission/hw01.qmd") |
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.
This path should start with qmd-autograder
not rmd-autograder
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 please add an entry to CHANGELOG.md
under v5.6.0. See the examples in that file for formatting and please link to the issue you opened.
Thanks for this help @chrispyles . I have been traveling but am now back in office and will be diving back into this shortly. |
First working on setting up tests for
.qmd
. I added a set of files undertest/test_run/qmd_autograder
, and started editingtest/test_run/test_integration.py
to test them. My initial step was to duplicate all thermd
functions and rename themqmd
(easiest to do in first pass). But that was not possible forget_config_path
andload_config
.@chrispyles - would love you to look at my logic for
get_config_path
andload_config
. The original logic was ifrmd
wasFalse
thendirname = "autograder"
but that doesn't allow forqmd
. So I've tried to add a second argumentqmd
to allow to use theqmd
config path.