new-contributors.txt 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. ===========================
  2. Advice for new contributors
  3. ===========================
  4. New contributor and not sure what to do? Want to help but just don't know how
  5. to get started? This is the section for you.
  6. .. admonition:: Get up and running!
  7. If you are new to contributing to Django, the :doc:`/intro/contributing`
  8. tutorial will give you an introduction to the tools and the workflow.
  9. This page contains more general advice on ways you can contribute to Django,
  10. and how to approach that.
  11. If you are looking for a reference on the details of making code contributions,
  12. see the :doc:`/internals/contributing/writing-code/index` documentation.
  13. First steps
  14. ===========
  15. Start with these steps to discover Django's development process.
  16. Triage tickets
  17. --------------
  18. If an `unreviewed ticket`_ reports a bug, try and reproduce it. If you can
  19. reproduce it and it seems valid, make a note that you confirmed the bug and
  20. accept the ticket. Make sure the ticket is filed under the correct component
  21. area. Consider writing a patch that adds a test for the bug's behavior, even if
  22. you don't fix the bug itself. See more at :ref:`how-can-i-help-with-triaging`
  23. Review patches of accepted tickets
  24. ----------------------------------
  25. This will help you build familiarity with the codebase and processes. Mark the
  26. appropriate flags if a patch needs docs or tests. Look through the changes a
  27. patch makes, and keep an eye out for syntax that is incompatible with older but
  28. still supported versions of Python. :doc:`Run the tests
  29. </internals/contributing/writing-code/unit-tests>` and make sure they pass.
  30. Where possible and relevant, try them out on a database other than SQLite.
  31. Leave comments and feedback!
  32. Keep old patches up-to-date
  33. ---------------------------
  34. Oftentimes the codebase will change between a patch being submitted and the
  35. time it gets reviewed. Make sure it still applies cleanly and functions as
  36. expected. Updating a patch is both useful and important! See more on
  37. :doc:`writing-code/submitting-patches`.
  38. Write some documentation
  39. ------------------------
  40. Django's documentation is great but it can always be improved. Did you find a
  41. typo? Do you think that something should be clarified? Go ahead and suggest a
  42. documentation patch! See also the guide on :doc:`writing-documentation`.
  43. .. note::
  44. The `reports page`_ contains links to many useful Trac queries, including
  45. several that are useful for triaging tickets and reviewing patches as
  46. suggested above.
  47. .. _reports page: https://code.djangoproject.com/wiki/Reports
  48. Sign the Contributor License Agreement
  49. --------------------------------------
  50. The code that you write belongs to you or your employer. If your contribution
  51. is more than one or two lines of code, you need to sign the `CLA`_. See the
  52. `Contributor License Agreement FAQ`_ for a more thorough explanation.
  53. .. _CLA: https://www.djangoproject.com/foundation/cla/
  54. .. _Contributor License Agreement FAQ: https://www.djangoproject.com/foundation/cla/faq/
  55. .. _unreviewed ticket: https://code.djangoproject.com/query?status=!closed&stage=Unreviewed
  56. Guidelines
  57. ==========
  58. As a newcomer on a large project, it's easy to experience frustration. Here's
  59. some advice to make your work on Django more useful and rewarding.
  60. Pick a subject area
  61. -------------------
  62. This should be something that you care about, that you are familiar with or
  63. that you want to learn about. You don't already have to be an expert on the
  64. area you want to work on; you become an expert through your ongoing
  65. contributions to the code.
  66. Analyze tickets' context and history
  67. ------------------------------------
  68. Trac isn't an absolute; the context is just as important as the words. When
  69. reading Trac, you need to take into account who says things, and when they were
  70. said. Support for an idea two years ago doesn't necessarily mean that the idea
  71. will still have support. You also need to pay attention to who *hasn't* spoken
  72. -- for example, if an experienced contributor hasn't been recently involved in
  73. a discussion, then a ticket may not have the support required to get into
  74. Django.
  75. Start small
  76. -----------
  77. It's easier to get feedback on a little issue than on a big one. See the
  78. `easy pickings`_.
  79. Confirm support before engaging in a big task
  80. ---------------------------------------------
  81. This means getting someone else to confirm that a bug is real before you fix
  82. the issue, and ensuring that there's consensus on a proposed feature before you
  83. go implementing it.
  84. Be bold! Leave feedback!
  85. ------------------------
  86. Sometimes it can be scary to put your opinion out to the world and say "this
  87. ticket is correct" or "this patch needs work", but it's the only way the
  88. project moves forward. The contributions of the broad Django community
  89. ultimately have a much greater impact than that of any one person. We can't do
  90. it without **you**!
  91. Be cautious when marking things "Ready For Check-in"
  92. ----------------------------------------------------
  93. If you're really not certain if a ticket is ready, don't mark it as such. Leave
  94. a comment instead, letting others know your thoughts. If you're mostly certain,
  95. but not completely certain, you might also try asking on the
  96. ``#contributing-getting-started`` channel in the `Django Discord server`_ to
  97. see if someone else can confirm your suspicions.
  98. .. _`Django Discord server`: https://discord.gg/xcRH6mN4fa
  99. Wait for feedback, and respond to feedback that you receive
  100. -----------------------------------------------------------
  101. Focus on one or two tickets, see them through from start to finish, and repeat.
  102. The shotgun approach of taking on lots of tickets and letting some fall by the
  103. wayside ends up doing more harm than good.
  104. Be rigorous
  105. -----------
  106. When we say ":pep:`8`, and must have docs and tests", we mean it. If a patch
  107. doesn't have docs and tests, there had better be a good reason. Arguments like
  108. "I couldn't find any existing tests of this feature" don't carry much weight.
  109. While it may be true, that means you have the extra-important job of writing
  110. the very first tests for that feature, not that you get a pass from writing
  111. tests altogether.
  112. Be patient
  113. ----------
  114. It's not always easy for your ticket or your patch to be reviewed quickly. This
  115. isn't personal. There are a lot of tickets and pull requests to get through.
  116. Keeping your patch up to date is important. Review the ticket on Trac to ensure
  117. that the *Needs tests*, *Needs documentation*, and *Patch needs improvement*
  118. flags are unchecked once you've addressed all review comments.
  119. Remember that Django has an eight-month release cycle, so there's plenty of
  120. time for your patch to be reviewed.
  121. Finally, a well-timed reminder can help. See :ref:`contributing code FAQ
  122. <new-contributors-faq>` for ideas here.
  123. .. _easy pickings: https://code.djangoproject.com/query?status=!closed&easy=1