2011-02-25 23:48:40 +01:00
Contributing
============
2019-03-15 21:53:35 +01:00
We're really glad you're reading this and considering contributing to
`django-helpdesk` ! As an open source project, we rely on volunteers
to improve and grow the project. Welcome!
2019-12-17 14:34:49 +01:00
`django-helpdesk` is an open-source project and as such contributions from the
2017-03-20 08:19:53 +01:00
community are welcomed and encouraged!
Please read these guidelines to get up to speed quickly. If you have any
questions, please file an issue ticket on GitHub. Our main project
repository is available at:
https://github.com/django-helpdesk/django-helpdesk
2011-02-25 23:48:40 +01:00
2017-03-20 08:19:53 +01:00
2019-03-15 21:53:35 +01:00
Testing
-------
2011-02-25 23:48:40 +01:00
2023-10-17 11:31:58 +02:00
If you are interested in specific features that are in the development stage and are willing to test the feature prior to release, please register your willingness against the issue and you will be notified when it reaches testing phase.
2023-10-17 01:26:06 +02:00
You can see a list of possible enhancements here:
https://github.com/django-helpdesk/django-helpdesk/labels/enhancement
2011-02-25 23:48:40 +01:00
2019-03-15 21:53:35 +01:00
This is an easy way to get involved that doesn't require programming.
2011-02-25 23:48:40 +01:00
2012-08-08 07:21:29 +02:00
2019-03-15 21:53:35 +01:00
Pull Requests
-------------
2011-02-25 23:48:40 +01:00
2017-09-13 03:16:30 +02:00
Please fork the project on GitHub, make your changes, and submit a
2023-10-17 01:26:06 +02:00
pull request against the `main` branch of the `django-helpdesk` repository.
2017-09-13 03:16:30 +02:00
2023-10-17 12:01:21 +02:00
The `main` branch always contains the bleeding edge code that has been reviewed and tested.
all features are developed entirely in a separate branch and are only merged to `main` once all tests and maintainer reviews
have been passed.
2017-09-13 06:58:00 +02:00
2023-10-17 12:01:21 +02:00
If for some reason you are forced to stay on an older version and need a patch that may apply to others with the same road
block preventing upgrading to the latest release,
then you can check out that versions code using the version tag and push your patch to a branch that we can then tag with a
patch release - it will not be merged to the `main` branch.
2017-10-24 07:06:51 +02:00
2023-10-17 12:01:21 +02:00
We reserve the right to decline a pull request raised against the `main` branch if it does not contain adequate unit tests.
2017-10-24 07:06:51 +02:00
2023-10-17 12:01:21 +02:00
Ideally a PR should be as small as possible to avoid complex and time consuming code reviews.
Break up complex new features or code refactoring into manageable chunks and raise sequential PR's.
If there are small bugs encountered whilst developing a new feature and they do not have a significant code impact then
they can be included in the feature PR.
Otherwise each bugfix, feature, code refactoring or functionality change should be in its own PR.
2017-10-24 07:06:51 +02:00
2023-10-17 12:01:21 +02:00
Please provide clear commit messages per file explaining *what* , precisely, has been changed in that file - it aids in
researching behaviour issues down the line.
2011-02-25 23:48:40 +01:00
2017-02-16 01:59:59 +01:00
All commits should include appropriate new or updated tests; see the Tests
section below for more details.
2017-02-11 05:20:59 +01:00
2017-10-24 07:06:51 +02:00
If your changes affect the Django models for `django-helpdesk` , be aware
2017-09-13 03:16:30 +02:00
that your commits should include database schema python scripts; see the
Database Schema Changes section below for more details.
2011-04-27 11:57:03 +02:00
2019-03-15 21:53:35 +01:00
Coding Conventions
------------------
Be sure all Python code follows PEP8 conventions.
Ideally, add comments and documentation whenever you touch code.
HTML and Javascript templates should be appropriately indented.
Database schema changes
-----------------------
As well as making your normal code changes to `` models.py `` , please generate a
Django migration file and commit it with your code. You will want to use a
command similar to the following::
./manage.py migrate helpdesk --auto [migration_name]
Make sure that `` migration_name `` is a sensible single-string explanation of
what this migration does, such as *add_priority_options* or *add_basket_table* .
This will add a file to the `` migrations/ `` folder, which must be committed to
git with your other code changes.
2017-09-13 07:04:51 +02:00
Tests
2019-03-15 21:53:35 +01:00
-----
2012-08-08 07:21:29 +02:00
2023-10-17 01:26:06 +02:00
There is a CI/CD pipeline implemented using Github actions that covers code formatting, code security and unit tests.
2023-10-17 12:01:21 +02:00
All PR's are required to pass the full test coverage suite and a code review by one or more of the maintainers before
it can be merged to the main branch.
2023-10-17 01:26:06 +02:00
Currently, test coverage is very low but all new pull requests are required to have appropriate unit tests
2023-10-17 12:01:21 +02:00
to cover any new or changed functionality which will increase the coverage over time.
2023-10-17 01:26:06 +02:00
2017-02-11 05:20:59 +01:00
2017-02-16 01:59:59 +01:00
As a general policy, we will only accept new feature commits if they are
accompanied by appropriate unit/functional tests (that is, tests for the
functionality you just added). Bugfixes should also include new unit tests to
2023-10-17 01:26:06 +02:00
ensure the bug has been fixed and there is no later regression due to other changes.
2017-02-11 05:20:59 +01:00
2017-02-16 01:59:59 +01:00
More significant code refactoring must also include proper integration or
2017-09-13 03:16:30 +02:00
validation tests, to be committed *BEFORE* the refactoring patches. This is to
2017-02-16 01:59:59 +01:00
ensure that the refactored code produces the same results as the previous code
base.
2017-02-11 05:20:59 +01:00
2017-02-16 01:59:59 +01:00
Any further integration or validation tests (tests for the entire
django-helpdesk application) are not required but greatly appreciated until we
can improve our overall test coverage.
2012-08-08 07:21:29 +02:00
Please include tests in the `` tests/ `` folder when committing code changes.
2017-02-16 01:59:59 +01:00
If you have any questions about creating or maintaining proper tests, please
start a discussion on the GitHub issue tracker at
2017-02-11 05:20:59 +01:00
https://github.com/django-helpdesk/django-helpdesk/issues
2012-08-08 07:21:29 +02:00
2011-04-27 11:57:03 +02:00
2019-03-15 21:53:35 +01:00
Ways to Contribute
------------------
2011-04-27 11:57:03 +02:00
2019-03-15 21:53:35 +01:00
We're happy to include any type of contribution! This can be:
2011-04-27 11:57:03 +02:00
2019-03-15 21:53:35 +01:00
* back-end python/django code development
* front-end web development (HTML/Javascript, especially jQuery)
* language translations
* writing improved documentation and demos
More details on each of theses tasks is below.
If you have any questions on contributing, please start a discussion on
the GitHub issue tracker at
https://github.com/django-helpdesk/django-helpdesk/issues
2011-04-27 11:57:03 +02:00
2017-09-13 03:16:30 +02:00
2017-09-13 07:04:51 +02:00
Translations
2019-03-15 21:53:35 +01:00
------------
2017-09-13 03:16:30 +02:00
2017-10-24 07:06:51 +02:00
Although `django-helpdesk` has originally been written for the English language,
there are already multiple community translations, including Spanish, Polish,
German, and Russian. More translations are welcomed!
2017-09-13 03:16:30 +02:00
Translations are handled using the excellent Transifex service which is much
easier for most users than manually editing .po files. It also allows
collaborative translation. If you want to help translate django-helpdesk into
languages other than English, we encourage you to make use of our Transifex
project:
2020-12-22 18:44:29 +01:00
http://www.transifex.com/projects/p/django-helpdesk/resource/core/
2017-09-13 03:16:30 +02:00
Once you have translated content via Transifex, please raise an issue on the
2019-03-15 21:53:35 +01:00
project Github page and tag it as "translations" to let us know it's ready to
import.
Licensing
---------
All contributions to django-helpdesk *must* be under the BSD license documented
in the LICENSE file in the top-level directory of this project.
By submitting a contribution to this project (in any way: via e-mail,
via GitHub pull requests, ticket attachments, etc), you acknowledge that your
contribution is open-source and licensed under the BSD license.
If you or your organization does not accept these license terms then we cannot
accept your contribution. Please reconsider!