Wrote these public notes as I went through the first contribution instructions to submit a PR for #37093.
Each horizontal line indicates a separate stumbling point or thought while I went through it.
I could see going through these notes and creating related tickets to help the instructions and therefore experience/flow for first-time contributors.
I can do that when I have some time in the future, but if anyone has time before I do to make tickets / address them with PRs if the tickets are accepted, youβre more than welcome to take any ideas from my notes below. Especially could be useful if youβre a brand new contributor who hasnβt submitted a ticket or PR yet but wants kind of an easier one to get a feel for the process since these would be pretty much all small documentation edits and ones that are specifically about the first-time contribution experience.
The notes are messy and not fully cleaned up yet β I thought it more important to just get it out with the time I had than clean it up further. But, yeah sorry itβs not so cute
Iβm happy to clarify if anything is unclear and definitely would clean up if putting any of this into Trac. Also I didnβt fully evaluate if everything here should be put in Trac - theyβre just some messy notes on the experience for now
βββββββββββββββββββββββββββββββββ
1
write first contribution instructions
Some code blocks are missing the copy capability - Missing it are:
**$** source \~/.virtualenvs/djangodev/bin/activate
**$** . \~/.virtualenvs/djangodev/bin/activate
There are other code blocks that donβt have it but they are more like example code or example terminal messages and less like commands someone is likely to actually copy (idk if those are supposed to be always anyway)
βββββββββββββββββββββββββββββββββ
2
How to find the path to do the
**$** python -m pip install -e /path/to/your/local/clone/django/
Part of write first contribution instructions
Feel kind of silly about flagging this but it did make me have to go look it up and pulled me away from what I was doing and since the instructions are putting in stuff like git, maybe something about this should be in there too
Specifically, I ultimately did: `pip install -e ~/Desktop/code/django` and the info I found that actually helped me was knowing that
β’ ~ is a shortcut for home directory
- On macOS, home directory is:
/Users/yourusername/
If you see a path like \~/Desktop/myfile.txt it actually means /Users/yourusername/Desktop/myfile.txt
echo $USER\ in terminal will will print your username.
And if it shows (djangodev) username@MacBook-Pro
"MacBook-Pro = hostname of your Mac. Itβs the name you gave your computer when you set it up.
βββββββββββββββββββββββββββββββββ
3
I donβt understand this: βThe installed version of Django is now pointing at your local copy by installing in editable mode. You will immediately see any changes you make to it, which is of great help when testing your first contribution.β
Specifically ββ¦installing in editable mode. You will immediately see any changes you make to itβ¦β
didnβt seem to affect what I was doing much so fine to ignore for now I guess
βββββββββββββββββββββββββββββββββ
4
After running tests, Iβm still in the βtestsβ directory instead of the general one (because I moved to tests to run the command as instructed (βBefore running the test suite, enter the Django tests/ directory using the cd tests command, and install test dependencies by running:β)
Am I supposed to move back to the directory or does it not matter if I stay in the tests directory?
I feel like Iβm supposed to move back, right?
Maybe recommend adding something like:
Run command `cd ..` to go back to the django directory instead of the django/tests (where you were before running the tests)
This is confirmed when it later has βcd to the Django tests/ directory and run:β again (or if not needed to make the branch, this line can be removed or edited to βyou should still be in the tests/ directoryβ)β¦it actually says to change back to the tests directory several times without ever saying to leave it with a cd so idk but I guess I did get through it fine ultimately
write first contribution instructions
βββββββββββββββββββββββββββββββββ
5
Might be good to include a sentence of what the documentation syntax/language isβ¦e.g. itβs not markdownβ¦what is this strangeness
βββββββββββββββββββββββββββββββββ
6
How can I credit the reviewer in a commit message for a commit that hasnβt been reviewed yet since itβs not yet committedβ¦.I donβt get that? Seems like paradox. How could anyone? prob relates to some specific situations I just donβt know about yet
committing code django docs
βββββββββββββββββββββββββββββββββ
7
That i / esc / :wq editor mode thing is not familiar pretty weird/intimidating looking if not encountered before. Should include info about that coming up when you do `git commit`? and whatever mode thatβs called (I think Iβve read its name before - look up)
write first contribution instructions - test section
Should include there and/or also in the commit message guidelines linked from above link in that section
βββββββββββββββββββββββββββββββββ
8
Itβs not clear to me if thereβs an easier way people do the 72 character limit for lines in commit messagesβ¦.I opened a word counter and copy and pasted and went back and forth while editing and Iβm pretty positive that was not the easiest way to do thatβ¦.
βββββββββββββββββββββββββββββββββ
9
Itβs pretty unclear/confusing on whether I should be writing on forum, in the ticket thread, or in the GitHub PR for any given question. Some things more obvious than others, but ultimately it feels odd to have the same conversation spread across three things. Whatβs the source of truth? Trac I think? But to feel well-organized youβd still have to reference each thing in each place
βββββββββββββββββββββββββββββββββ
10
βYou can create a pull request by visiting the Django GitHub page. Youβll see your branch under βYour recently pushed branchesβ. Click βCompare & pull requestβ next to it.β
Thatβs no longer accurate. It doesnβt say βYour recently pushed branchesβ
It looks like this:
βββββββββββββββββββββββββββββββββ
11
Trac says
β β’ To provide a patch by sending a pull request. Claim the ticket when you start working so that someone else doesnβt duplicate effort. Before sending a pull request, review your work against the patch review checklist. Check the βHas patchβ flag on the ticket after sending a pull request and include a link to the pull request in the ticket comment when making that update. The usual format is: [https://github.com/django/django/pull/#### PR].β
But the `pull_request_template.md` for GitHub has
β- [ ] I have checked the βHas patchβ ticket flag in the Trac system.β
So I was left like which do I do first: the PR in GitHub or the patch thing in Trac? Obvs didnβt think it mattered as long as I did both but process is clearly important so trying to do the right way. What I decided: Ultimately I didnβt have pull request ID # (obvs because itβs impossible to get that before actually submitting the pull request) which means I didnβt have the link desired for βHas Patchβ think in Trac so what I did was not check the box intending to do it right after which then resulted in:
Warning: Incorrect Trac Ticket Flag
The referenced ticket ticket-37093 does not have the Has patch flag set in Trac. This flag must be checked before a pull request can be reviewed.
What to do:
- Open the ticket at #37093 (Adjust GitHub PR description template + bot check error emoji) β Django.
- Scroll down and check the Has patch checkbox on the ticket.
- Save the ticket.
Which is not shocking of course just more like feeling β βyeah, I know I have to do that, and Iβm already about to do that, but I just couldnβt do it before actually submitting the PR if you also want me to include the PR link in the Trac ticketβ
