-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: update readme and contributing guide
- Loading branch information
Showing
2 changed files
with
43 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,47 @@ | ||
Please note the following instructions for opening an issue: | ||
Thank you for your interest in contributing to this project! | ||
|
||
* If you're confident you've identified a bug, or have already written a | ||
patch, feel free to open an issue or pull request. Otherwise, please discuss | ||
on the `mezzanine-users <http://groups.google.com/group/mezzanine-users/topics>`_ mailing list first. | ||
* Contributed code must be written in the existing style. For Python | ||
(and to a decent extent, JavaScript as well), this is as simple as | ||
following the `Django coding style <https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/coding-style/>`_ and (most importantly) | ||
`PEP 8 <http://www.python.org/dev/peps/pep-0008/>`_. Front-end CSS should adhere to the | ||
`Bootstrap CSS guidelines <https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md#css>`_. | ||
* For large features or bug fixes it's always a good idea to open an issue before you start developing your solution. This way the right approach and ideas can be discussed upfront instead of after spending time and energy developing it. | ||
* Contributions must be made available on a separately named branch, | ||
based on the latest version of the master branch. | ||
* Run the tests before committing your changes. If your changes | ||
cause the tests to break, they won't be accepted. | ||
* If you are adding new functionality, you must include basic tests | ||
and documentation. | ||
* Please add your name to the end of the AUTHORS file as part of your pull | ||
request. | ||
|
||
Tests can be run using:: | ||
Testing | ||
------- | ||
|
||
./setup.py test | ||
After cloning the repository and working on your contribution, install the extra testing requirements and run ``pytest``. | ||
|
||
Or specified tests using:: | ||
.. code-block:: bash | ||
./mezzanine/bin/runtests.py mezzanine.core.tests.CoreTests | ||
pip install -e ".[testing]" | ||
pytest | ||
* If you are adding new functionality, you must include basic tests | ||
and documentation. | ||
* Please add your name to the end of the AUTHORS file as part of your pull | ||
request. | ||
Since the test suite is quite big you may want to run only a specific test case: | ||
|
||
.. code-block:: bash | ||
# Test the "galleries" app only | ||
pytest tests/test_galleries.py | ||
Code Style | ||
---------- | ||
|
||
Python code style is enforced with ``flake8`` and ``black``. You can install and run both as follows: | ||
|
||
.. code-block:: bash | ||
pip install -e ".[codestyle]" | ||
black . --check # Omit the flag to have black autofix errors | ||
flake8 . | ||
If your editor is configured to integrate with ``black`` and ``flake8`` it should pick up the project's configuration automatically. | ||
|
||
Continous Integration | ||
--------------------- | ||
|
||
When you are ready to contribute your changes `create and submit a pull request <https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request>`_ against the ``master`` branch. This will run all tests in all supported Python and Django versions and alert you if any of them fail. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters