2015-06-23 14:28:56 +02:00
|
|
|
Contributor Guidelines
|
|
|
|
======================
|
|
|
|
|
2017-06-10 18:08:05 +02:00
|
|
|
Contributions are welcome and greatly appreciated. Every little bit
|
|
|
|
helps in making Hy better. Potential contributions include:
|
|
|
|
|
2017-06-14 22:28:47 +02:00
|
|
|
- Reporting and fixing bugs.
|
|
|
|
- Requesting features.
|
|
|
|
- Adding features.
|
|
|
|
- Writing tests for outstanding bugs or untested features.
|
2017-06-10 18:08:05 +02:00
|
|
|
- You can mark tests that Hy can't pass yet as xfail_.
|
2017-06-14 22:28:47 +02:00
|
|
|
- Cleaning up the code.
|
|
|
|
- Improving the documentation.
|
2017-06-10 18:08:05 +02:00
|
|
|
- Answering questions on `the IRC channel`_, `the mailing list`_, or
|
2017-06-14 22:28:47 +02:00
|
|
|
`Stack Overflow`_.
|
2017-06-10 18:08:05 +02:00
|
|
|
- Evangelizing for Hy in your organization, user group, conference, or
|
2017-06-14 22:28:47 +02:00
|
|
|
bus stop.
|
2017-06-10 18:08:05 +02:00
|
|
|
|
|
|
|
Issues
|
|
|
|
~~~~~~
|
|
|
|
|
2017-06-14 22:28:47 +02:00
|
|
|
In order to report bugs or request features, search the `issue tracker`_ to
|
2017-06-10 18:08:05 +02:00
|
|
|
check for a duplicate. (If you're reporting a bug, make sure you can
|
|
|
|
reproduce it with the very latest, bleeding-edge version of Hy from
|
|
|
|
the ``master`` branch on GitHub. Bugs in stable versions of Hy are
|
|
|
|
fixed on ``master`` before the fix makes it into a new stable
|
2017-06-14 23:07:18 +02:00
|
|
|
release.) If there aren't any duplicates, then you can make a new issue.
|
2017-06-10 18:08:05 +02:00
|
|
|
|
|
|
|
It's totally acceptable to create an issue when you're unsure whether
|
|
|
|
something is a bug or not. We'll help you figure it out.
|
|
|
|
|
|
|
|
Use the same issue tracker to report problems with the documentation.
|
|
|
|
|
|
|
|
Pull requests
|
|
|
|
~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
Submit proposed changes to the code or documentation as pull requests
|
|
|
|
(PRs) on GitHub_. Git can be intimidating and confusing to the
|
2017-06-14 22:28:47 +02:00
|
|
|
uninitiated. `This getting-started guide`_ may be helpful. However, if
|
|
|
|
you're overwhelmed by Git, GitHub, or the rules below, don't sweat
|
|
|
|
it. We want to keep the barrier to contribution low, so we're happy to
|
|
|
|
help you with these finicky things or do them for you if necessary.
|
2017-06-10 18:08:05 +02:00
|
|
|
|
|
|
|
Deciding what to do
|
|
|
|
-------------------
|
|
|
|
|
|
|
|
Issues tagged good-first-bug_ are expected to be relatively easy to
|
|
|
|
fix, so they may be good targets for your first PR for Hy.
|
|
|
|
|
|
|
|
If you're proposing a major change to the Hy language, or you're
|
|
|
|
unsure of the proposed change, create an issue to discuss it before
|
|
|
|
you write any code. This will allow others to give feedback on your
|
2017-06-14 23:07:18 +02:00
|
|
|
idea, and it can avoid wasted work.
|
2017-06-10 18:08:05 +02:00
|
|
|
|
|
|
|
File headers
|
|
|
|
------------
|
|
|
|
|
|
|
|
Every Python or Hy file in the source tree that is potentially
|
|
|
|
copyrightable should have the following header (but with ``;;`` in
|
|
|
|
place of ``#`` for Hy files)::
|
2014-05-02 20:27:04 +02:00
|
|
|
|
2017-06-10 18:08:05 +02:00
|
|
|
# Copyright [current year] the authors.
|
|
|
|
# This file is part of Hy, which is free software licensed under the Expat
|
|
|
|
# license. See the LICENSE.
|
2016-12-08 11:48:50 +01:00
|
|
|
|
2017-06-10 18:08:05 +02:00
|
|
|
As a rule of thumb, a file can be considered potentially copyrightable
|
|
|
|
if it includes at least 10 lines that contain something other than
|
|
|
|
comments or whitespace. If in doubt, include the header.
|
2014-05-02 20:27:04 +02:00
|
|
|
|
2017-06-10 18:08:05 +02:00
|
|
|
Commit formatting
|
|
|
|
-----------------
|
2016-03-29 21:10:07 +02:00
|
|
|
|
2017-06-10 18:08:05 +02:00
|
|
|
Many PRs are small enough that only one commit is necessary, but
|
|
|
|
bigger ones should be organized into logical units as separate
|
|
|
|
commits. PRs should be free of merge commits and commits that fix or
|
|
|
|
revert other commits in the same PR (``git rebase`` is your friend).
|
2017-04-27 23:11:38 +02:00
|
|
|
|
2017-06-10 18:08:05 +02:00
|
|
|
Avoid committing spurious whitespace changes.
|
2017-04-27 23:11:38 +02:00
|
|
|
|
2017-06-14 22:28:47 +02:00
|
|
|
The first line of a commit message should describe the overall change in 50
|
|
|
|
characters or less. If you wish to add more information, separate it from the
|
|
|
|
first line with a blank line.
|
2017-04-27 23:11:38 +02:00
|
|
|
|
2017-06-10 18:08:05 +02:00
|
|
|
Testing
|
|
|
|
-------
|
2014-05-02 20:27:04 +02:00
|
|
|
|
2017-06-10 18:08:05 +02:00
|
|
|
New features and bug fixes should be tested. If you've caused an
|
|
|
|
xfail_ test to start passing, remove the xfail mark. If you're
|
|
|
|
testing a bug that has a GitHub issue, include a comment with the URL
|
|
|
|
of the issue.
|
2014-05-02 20:27:04 +02:00
|
|
|
|
2017-06-10 18:08:05 +02:00
|
|
|
No PR may be merged if it causes any tests to fail. You can run the
|
2017-06-14 22:28:47 +02:00
|
|
|
test suite and check the style of your code with ``make d``. The byte-compiled
|
|
|
|
versions of the test files can be purged using ``git clean -dfx tests/``.
|
|
|
|
If you want to run the tests while skipping the slow ones in ``test_bin.py``,
|
|
|
|
use ``pytest --ignore=tests/test_bin.py``.
|
2014-05-02 20:27:04 +02:00
|
|
|
|
2017-06-10 18:08:05 +02:00
|
|
|
NEWS and AUTHORS
|
|
|
|
----------------
|
2014-05-02 20:27:04 +02:00
|
|
|
|
2017-06-10 18:08:05 +02:00
|
|
|
If you're making user-visible changes to the code, add one or more
|
|
|
|
items describing it to the NEWS file.
|
2014-05-02 20:27:04 +02:00
|
|
|
|
2017-06-10 18:08:05 +02:00
|
|
|
Finally, add yourself to the AUTHORS file (as a separate commit): you
|
|
|
|
deserve it. :)
|
2014-05-02 20:27:04 +02:00
|
|
|
|
2017-06-10 18:08:05 +02:00
|
|
|
The PR itself
|
|
|
|
-------------
|
2017-01-31 23:32:08 +01:00
|
|
|
|
2017-06-10 18:08:05 +02:00
|
|
|
PRs should ask to merge a new branch that you created for the PR into
|
|
|
|
hylang/hy's ``master`` branch, and they should have as their origin
|
|
|
|
the most recent commit possible.
|
2014-05-02 20:27:04 +02:00
|
|
|
|
2017-06-10 18:08:05 +02:00
|
|
|
If the PR fulfills one or more issues, then the body text of the PR
|
|
|
|
(or the commit message for any of its commits) should say "Fixes
|
|
|
|
#123" or "Closes #123" for each affected issue number. Use this exact
|
|
|
|
(case-insensitive) wording, because when a PR containing such text is
|
|
|
|
merged, GitHub automatically closes the mentioned issues, which is
|
|
|
|
handy. Conversely, avoid this exact language if you want to mention
|
2017-06-14 23:07:18 +02:00
|
|
|
an issue without closing it (because e.g. you've partly but not
|
2017-06-10 18:08:05 +02:00
|
|
|
entirely fixed a bug).
|
2014-05-02 20:27:04 +02:00
|
|
|
|
2017-06-14 23:07:18 +02:00
|
|
|
Before any PR is merged, it must be approved by members of Hy's core team
|
|
|
|
other than the PR's author. Changes to the documentation, or trivial changes
|
2017-06-14 22:28:47 +02:00
|
|
|
to code, need to be approved by **one** member; all other PRs need to be
|
|
|
|
approved by **two** members.
|
2014-05-02 20:27:04 +02:00
|
|
|
|
2017-06-14 22:28:47 +02:00
|
|
|
Anybody on the team may perform the merge. Merging should create a merge commit
|
2017-06-14 23:07:18 +02:00
|
|
|
(don't squash unnecessarily, because that would remove separation between
|
|
|
|
logically separate commits, and don't fast-forward, because that would throw
|
|
|
|
away the history of the commits as a separate branch), which should
|
2017-06-10 18:08:05 +02:00
|
|
|
include the PR number in the commit message.
|
2015-06-23 14:28:56 +02:00
|
|
|
|
|
|
|
Contributor Code of Conduct
|
|
|
|
===========================
|
|
|
|
|
|
|
|
As contributors and maintainers of this project, we pledge to respect
|
|
|
|
all people who contribute through reporting issues, posting feature
|
|
|
|
requests, updating documentation, submitting pull requests or patches,
|
|
|
|
and other activities.
|
|
|
|
|
|
|
|
We are committed to making participation in this project a
|
|
|
|
harassment-free experience for everyone, regardless of level of
|
|
|
|
experience, gender, gender identity and expression, sexual
|
|
|
|
orientation, disability, personal appearance, body size, race,
|
|
|
|
ethnicity, age, or religion.
|
|
|
|
|
|
|
|
Examples of unacceptable behavior by participants include the use of
|
|
|
|
sexual language or imagery, derogatory comments or personal attacks,
|
|
|
|
trolling, public or private harassment, insults, or other
|
|
|
|
unprofessional conduct.
|
|
|
|
|
|
|
|
Project maintainers have the right and responsibility to remove, edit,
|
|
|
|
or reject comments, commits, code, wiki edits, issues, and other
|
|
|
|
contributions that are not aligned to this Code of Conduct. Project
|
|
|
|
maintainers who do not follow the Code of Conduct may be removed from
|
|
|
|
the project team.
|
|
|
|
|
|
|
|
This code of conduct applies both within project spaces and in public
|
|
|
|
spaces when an individual is representing the project or its
|
|
|
|
community.
|
|
|
|
|
|
|
|
Instances of abusive, harassing, or otherwise unacceptable behavior
|
|
|
|
may be reported by opening an issue or contacting one or more of the
|
|
|
|
project maintainers.
|
|
|
|
|
|
|
|
This Code of Conduct is adapted from the `Contributor Covenant`_,
|
|
|
|
version 1.1.0, available at
|
|
|
|
http://contributor-covenant.org/version/1/1/0/.
|
|
|
|
|
|
|
|
.. _Contributor Covenant: http://contributor-covenant.org
|
2016-03-30 06:23:27 +02:00
|
|
|
.. _issue tracker: https://github.com/hylang/hy/issues
|
2017-06-10 18:08:05 +02:00
|
|
|
.. _GitHub: https://github.com/hylang/hy
|
|
|
|
.. _This getting-started guide: http://rogerdudler.github.io/git-guide/
|
2017-02-07 20:25:40 +01:00
|
|
|
.. _good-first-bug: https://github.com/hylang/hy/issues?q=is%3Aissue+is%3Aopen+label%3Agood-first-bug
|
2017-06-10 18:08:05 +02:00
|
|
|
.. _the IRC channel: irc://freenode.net/hy
|
|
|
|
.. _the mailing list: https://groups.google.com/forum/#!forum/hylang-discuss
|
|
|
|
.. _Stack Overflow: https://stackoverflow.com/questions/tagged/hy
|
|
|
|
.. _xfail: https://docs.pytest.org/en/latest/skipping.html#mark-a-test-function-as-expected-to-fail
|