Skip to content

Commit

Permalink
Update documentation related to contributing
Browse files Browse the repository at this point in the history
  • Loading branch information
justinmayer committed Nov 12, 2023
1 parent eca501a commit 0c5d63c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 21 deletions.
28 changes: 10 additions & 18 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ don't spend a lot of time working on something that would be rejected for a
known reason. Consider also whether your new feature might be better suited as
a ':pelican-doc:`plugins` — you can `ask for help`_ to make that determination.

Also, if you intend to submit a pull request to address something for which there
is no existing issue, there is no need to create a new issue and then immediately
submit a pull request that closes it. You can submit the pull request by itself.

Using Git and GitHub
--------------------

Expand All @@ -87,7 +91,8 @@ Using Git and GitHub
* **Don't put multiple unrelated fixes/features in the same branch / pull request.**
For example, if you're working on a new feature and find a bugfix that
doesn't *require* your new feature, **make a new distinct branch and pull
request** for the bugfix.
request** for the bugfix. Similarly, any proposed changes to code style
formatting should be in a completely separate pull request.
* Add a ``RELEASE.md`` file in the root of the project that contains the
release type (major, minor, patch) and a summary of the changes that will be
used as the release changelog entry. For example::
Expand All @@ -106,29 +111,16 @@ Using Git and GitHub
detailed explanation (when relevant).
* `Squash your commits`_ to eliminate merge commits and ensure a clean and
readable commit history.
* If you have previously filed a GitHub issue and want to contribute code that
addresses that issue, **please use** ``hub pull-request`` instead of using
GitHub's web UI to submit the pull request. This isn't an absolute
requirement, but makes the maintainers' lives much easier! Specifically:
`install hub <https://github.com/github/hub/#installation>`_ and then run
`hub pull-request -i [ISSUE] <https://hub.github.com/hub-pull-request.1.html>`_
to turn your GitHub issue into a pull request containing your code.
* After you have issued a pull request, the continuous integration (CI) system
will run the test suite for all supported Python versions and check for PEP8
will run the test suite on all supported Python versions and check for code style
compliance. If any of these checks fail, you should fix them. (If tests fail
on the CI system but seem to pass locally, ensure that local test runs aren't
skipping any tests.)

Contribution quality standards
------------------------------

* Adhere to `PEP8 coding standards`_. This can be eased via the `pycodestyle
<https://pypi.org/project/pycodestyle>`_ or `flake8
<https://pypi.org/project/flake8/>`_ tools, the latter of which in
particular will give you some useful hints about ways in which the
code/formatting can be improved. We try to keep line length within the
79-character maximum specified by PEP8. Because that can sometimes compromise
readability, the hard/enforced maximum is 88 characters.
* Adhere to the project's code style standards. See: `Development Environment`_
* Ensure your code is compatible with the `officially-supported Python releases`_.
* Add docs and tests for your changes. Undocumented and untested features will
not be accepted.
Expand All @@ -142,6 +134,6 @@ need assistance or have any questions about these guidelines.
.. _`Create a new branch`: https://github.com/getpelican/pelican/wiki/Git-Tips#making-your-changes
.. _`Squash your commits`: https://github.com/getpelican/pelican/wiki/Git-Tips#squashing-commits
.. _`Git Tips`: https://github.com/getpelican/pelican/wiki/Git-Tips
.. _`PEP8 coding standards`: https://www.python.org/dev/peps/pep-0008/
.. _`ask for help`: `How to get help`_
.. _`officially-supported Python releases`: https://devguide.python.org/#status-of-python-branches
.. _`Development Environment`: https://docs.getpelican.com/en/latest/contribute.html#setting-up-the-development-environment
.. _`officially-supported Python releases`: https://devguide.python.org/versions/#versions
4 changes: 1 addition & 3 deletions docs/contribute.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ Install the needed dependencies and set up the project::

python -m pip install invoke
invoke setup
python -m pip install -e ~/projects/pelican

Your local environment should now be ready to go!

Expand Down Expand Up @@ -159,8 +158,7 @@ check for code style compliance via::

If style violations are found, many of them can be addressed automatically via::

invoke black
invoke isort
invoke format

If style violations are found even after running the above auto-formatters,
you will need to make additional manual changes until ``invoke lint`` no longer
Expand Down

0 comments on commit 0c5d63c

Please sign in to comment.