This is a detailed guide to author questions.
Using the Terminal on your computer, clone this repository locally (i.e. on your computer)
git clone https://github.com/open-resources/instructor_physics_bank.git
Change directory into the instructor_physics_bank
cd instructor_physics_bank
Make a new branch for your question with an appropriate name (replace newbranchname
with your question number or description)
git switch -c newbranchname
(the -c
flag creates a new branch if it does not already exist)
Choose a problem that you want to write in markdown, take note of the source, and any attribution you may need to make. Use the Topics, Subtopics, and Learning Outcomes file to get the “Topic” and “Subtopic” - you will need to put the question in the correct directory.
Create a new directory with your question’s name in the source/YourTopic/QuestionTitle
or source/YourTopic/YourSubtopic/QuestionTitle
directory to store your markdown file and any assets (usually images) associated with it.
Tip
Note that the directory structure follows the Topic/Subtopic scheme.
If your question title is “Distance Travelled”, the equivalent directory name is “distance_travelled” and the file containing the questions should be called “distance_travelled.md”.
So the final location of the distance_travelled.md
should be:
source/003.Kinematics(1D)/Position/distance_travelled/distance_travelled.md
Copy one of the question templates from the templates directory into the directory you created in the two steps above. It seems the best way to do this is to copy and paste the file, and then rename it. For our example, that would be the distance_travelled.md
file.
Edit the distance_travelled.md
file to author your question. Feel free to “commit” to the repository as many times as you like. Remember to use your local PrairieLearn Docker instance, and the checkq.py
script to check the question on your machine.
Here are the commands to first add it to the repository, then commit the file, then push it to GitHub:
git add source/003.Kinematics(1D)/Position/
git commit -m "A message about a change you made
git push
Open the instructor_physics_bank repo on GitHub.com and create a Draft Pull Request (PR). After you push your branch, you should see a green button called “Compare and Pull Request”.
When you’re ready to have the problem reviewed by others, convert your Draft PR to an actual PR.
Add the syntax check
label to trigger an automatic action to check the syntax of your question. Wait for the action to complete; fix any errors if it does not.
If the syntax check passes, go to PrairieLearn and to Public version of the OPB to check if it looks as desired. Make any changes necessary to fix if not.
Verify the question looks as expected on the Public version of the OPB.
Request one or two reviewers on your problem, wait for their comments and then address them in more commits.
Add the ready_to_merge
label to mark the question as ready to merge into the OPB after all the conversations have been resolved.
Switch back to the main
branch locally:
Pull any changes (if there are any):
Responding to reviews and making changes
When a reviewer responds to your pull request and suggests changes, make sure to perform those changes by switching back to this branch by using:
git switch YourBranchName
(you don’t need the -c because the branch already exists)
Alternatively, you can use the GitHub Command Line Interface (CLI) to checkout the Pull Request directly:
gh pr checkout 124
(this will check out PR #124)
After making the changes, perform the git add; git commit -m "fixed comments"; git push
commands once more to push the latest changes to the repository and respond to the reviewer.
More details about the reviewing process can be found here.