You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On running the process_question_md() function to generate a markdown file for the public version, the order in which the variables appear in the md file are always random. This is only happening with **symbolic questions. (questions 7a and 7b)
This causes an issue in testing since we compare the two files: the previously generated one and the currently generated one, and do not want to disregard this order in which variables appear.
We thought this is probably because the function is converting a dictionary to a YAML dump, and the order of dictionaries is not the same each time. But we tested this in a meeting with a dummy dictionary and this did not seem to be the problem. The dictionaries in Python 3.7 and above are also apparently always ordered, so that cannot be the problem.
Tests that fail due to this:
test_public()
Screenshot of the generated markdown where the order of variables is random:
The text was updated successfully, but these errors were encountered:
akshatpoddar
changed the title
Random order of variables on every run of the public version of questions
Random order of variables on every generation of the public version of a question
Jul 4, 2021
On running the process_question_md() function to generate a markdown file for the public version, the order in which the variables appear in the md file are always random. This is only happening with **symbolic questions. (questions 7a and 7b)
This causes an issue in testing since we compare the two files: the previously generated one and the currently generated one, and do not want to disregard this order in which variables appear.
We thought this is probably because the function is converting a dictionary to a YAML dump, and the order of dictionaries is not the same each time. But we tested this in a meeting with a dummy dictionary and this did not seem to be the problem. The dictionaries in Python 3.7 and above are also apparently always ordered, so that cannot be the problem.
Tests that fail due to this:
test_public()
Screenshot of the generated markdown where the order of variables is random:
The text was updated successfully, but these errors were encountered: