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

Random order of variables on every generation of the public version of a question #9

Open
akshatpoddar opened this issue Jul 4, 2021 · 0 comments

Comments

@akshatpoddar
Copy link
Contributor

akshatpoddar commented 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:

Screenshot 2021-07-22 at 11 11 48 AM

@akshatpoddar 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant