2018-04-19 08:22:07 +00:00
|
|
|
.. Forward declarations for all the custom interpreted text roles that
|
|
|
|
Sphinx defines and that are used below. This helps Sphinx-unaware tools
|
|
|
|
(e.g. rst2html, PyPI's and GitHub's renderers, etc.).
|
|
|
|
.. role:: doc
|
|
|
|
.. role:: ref
|
|
|
|
|
|
|
|
|
2015-03-22 18:21:15 +00:00
|
|
|
Contributors' Guide
|
|
|
|
===================
|
|
|
|
|
2016-06-28 04:05:22 +00:00
|
|
|
Bug reports, feature requests, patches, and other contributions are warmly welcomed.
|
|
|
|
Contribution should be as easy and friendly as possible.
|
|
|
|
Below are a few guidelines contributors should follow to facilitate the process.
|
2015-03-22 18:21:15 +00:00
|
|
|
|
2018-02-24 09:14:42 +00:00
|
|
|
|
2015-03-22 18:21:15 +00:00
|
|
|
Getting Started
|
|
|
|
---------------
|
|
|
|
|
2018-04-06 04:28:44 +00:00
|
|
|
- `Create a GitHub account <https://github.com/join>`__ if you don't have one
|
2016-06-28 04:05:22 +00:00
|
|
|
already.
|
2015-03-22 18:21:15 +00:00
|
|
|
|
2018-04-06 04:28:44 +00:00
|
|
|
- Search through the `issue tracker <https://github.com/jab/bidict/issues>`__
|
2015-03-22 18:21:15 +00:00
|
|
|
to see if an issue or pull request has already been created for what you're interested in.
|
|
|
|
If so, feel free to add comments to it or just hit the "subscribe" button to follow progress.
|
2018-04-06 04:28:44 +00:00
|
|
|
If not, you can `join the chat room <https://gitter.im/jab/bidict>`__ to discuss there,
|
|
|
|
or go ahead and `create a new issue <https://github.com/jab/bidict/issues/new>`__:
|
2015-03-22 18:21:15 +00:00
|
|
|
|
|
|
|
- Clearly describe the issue giving as much relevant context as possible.
|
|
|
|
|
|
|
|
- If it is a bug, include reproduction steps,
|
|
|
|
all known environments in which the bug is exhibited,
|
|
|
|
and ideally a failing test case.
|
|
|
|
|
|
|
|
- If you would like to contribute a patch,
|
2018-04-06 04:28:44 +00:00
|
|
|
make sure you've `created your own fork <https://github.com/jab/bidict/fork>`__
|
2016-06-28 04:05:22 +00:00
|
|
|
and have cloned it to your computer.
|
2015-03-22 18:21:15 +00:00
|
|
|
|
2018-02-24 09:14:42 +00:00
|
|
|
|
2015-03-22 18:21:15 +00:00
|
|
|
Making Changes
|
|
|
|
--------------
|
|
|
|
|
2020-11-28 15:09:30 +00:00
|
|
|
- Before making changes, please
|
|
|
|
(create a `virtualenv <http://virtualenv.pypa.io>`__ and)
|
|
|
|
install the extra packages required for development:
|
|
|
|
``pip install -r requirements/dev.txt``
|
2015-03-22 18:21:15 +00:00
|
|
|
|
2018-08-19 18:53:20 +00:00
|
|
|
We use `EditorConfig <https://editorconfig.org/>`__
|
2018-04-06 04:28:44 +00:00
|
|
|
and `pre-commit <https://pre-commit.com/>`__
|
2015-03-22 18:21:15 +00:00
|
|
|
to help achieve uniform style and quality standards
|
|
|
|
across a diversity of development environments.
|
|
|
|
|
2020-11-28 15:09:30 +00:00
|
|
|
pre-commit gets installed when you run the command above
|
2015-03-22 18:21:15 +00:00
|
|
|
and ensures that various code checks are run before every commit
|
|
|
|
(look in ``.pre-commit-config.yaml`` to see which hooks are run).
|
2020-11-28 15:09:30 +00:00
|
|
|
Ensure the configured hooks are installed by running
|
|
|
|
``pre-commit install --install-hooks``.
|
2015-03-22 18:21:15 +00:00
|
|
|
|
|
|
|
EditorConfig allows us to provide a single ``.editorconfig`` file
|
|
|
|
to configure settings like indentation consistently
|
2019-11-18 06:13:36 +00:00
|
|
|
across a variety of supported editors.
|
2018-08-19 18:53:20 +00:00
|
|
|
See https://editorconfig.org/#download to install the plugin for your editor.
|
2015-03-22 18:21:15 +00:00
|
|
|
|
|
|
|
- Create a topic branch off of master for your changes:
|
|
|
|
``git checkout -b <topic> master``
|
|
|
|
|
|
|
|
- Make commits of logical units.
|
|
|
|
|
|
|
|
- Match the existing code style and quality standards.
|
|
|
|
If you're adding a feature, include accompanying tests and documentation
|
|
|
|
demonstrating its correctness and usage.
|
|
|
|
|
2018-04-06 04:28:44 +00:00
|
|
|
- Run the tests locally with `tox <https://tox.readthedocs.io>`__
|
squashed changes for 0.13.0
- support Python 3.6, refactor CI/test setup, increase test coverage
- refactor BidirectionalMapping, BidictBase, OrderedBidictBase,
FrozenBidictBase, and subclasses
- move frozenorderedbidict into _frozen and looseorderedbidict into _loose
- register bidict as a virtual subclass of MutableMapping rather than
inheriting from it directly. This makes it clearer that it does not use any
of the concrete generic methods that MutableMapping provides.
- improve performance and flexibility of frozenbidict and
frozenorderedbidict hashing
- docs, including new type-hierarchy.png diagram
- rm unused imap, ifilter, izip_longest from compat, add PYPY
- update to latest versions of dependencies
- restore benchmarking on travis
2017-01-09 15:37:31 +00:00
|
|
|
to make sure they pass for all supported Python versions
|
|
|
|
(see ``envlist`` in ``tox.ini`` for the complete list).
|
|
|
|
If you do not have all the referenced Python versions available locally,
|
|
|
|
you can also push the changes on your branch to GitHub
|
2020-12-20 15:40:40 +00:00
|
|
|
to automatically trigger a new
|
|
|
|
`GitHub Actions <https://github.com/jab/bidict/actions>`__ build,
|
squashed changes for 0.13.0
- support Python 3.6, refactor CI/test setup, increase test coverage
- refactor BidirectionalMapping, BidictBase, OrderedBidictBase,
FrozenBidictBase, and subclasses
- move frozenorderedbidict into _frozen and looseorderedbidict into _loose
- register bidict as a virtual subclass of MutableMapping rather than
inheriting from it directly. This makes it clearer that it does not use any
of the concrete generic methods that MutableMapping provides.
- improve performance and flexibility of frozenbidict and
frozenorderedbidict hashing
- docs, including new type-hierarchy.png diagram
- rm unused imap, ifilter, izip_longest from compat, add PYPY
- update to latest versions of dependencies
- restore benchmarking on travis
2017-01-09 15:37:31 +00:00
|
|
|
which should run the tests for all supported Python versions.
|
2015-03-22 18:21:15 +00:00
|
|
|
|
|
|
|
- Create a concise but comprehensive commit message in the following style::
|
|
|
|
|
2018-04-06 04:28:44 +00:00
|
|
|
Include an example commit message in CONTRIBUTING guide #9999
|
2015-03-22 18:21:15 +00:00
|
|
|
|
2018-04-06 04:28:44 +00:00
|
|
|
Without this patch the CONTRIBUTING guide would contain no examples of
|
|
|
|
a model commit message. This is a problem because the contributor is left
|
|
|
|
to imagine what the commit message should look like and may not get it
|
|
|
|
right. This patch fixes the problem by providing a concrete example.
|
2015-03-22 18:21:15 +00:00
|
|
|
|
2018-04-06 04:28:44 +00:00
|
|
|
The first line is an imperative statement summarizing the changes with an
|
|
|
|
issue number from the tracker. The body describes the behavior without
|
|
|
|
the patch, why it's a problem, and how the patch fixes the problem.
|
2015-03-22 18:21:15 +00:00
|
|
|
|
2018-02-24 09:14:42 +00:00
|
|
|
|
2015-03-22 18:21:15 +00:00
|
|
|
Submitting Changes
|
|
|
|
------------------
|
|
|
|
|
|
|
|
- Push your changes to a topic branch in your fork of the repository:
|
|
|
|
``git push --set-upstream origin <topic>``
|
|
|
|
|
|
|
|
- Submit a pull request providing any additional relevant details necessary.
|
|
|
|
|
|
|
|
- Acknowledgment should typically be fast
|
|
|
|
but please allow 1-2 weeks for a full response / code review.
|
|
|
|
|
|
|
|
- The code review process often involves some back-and-forth
|
|
|
|
to get everything right before merging.
|
|
|
|
This is typical of quality software projects that accept patches.
|
|
|
|
|
|
|
|
- All communication should be supportive and appreciative of good faith efforts to contribute,
|
|
|
|
creating a welcoming and inclusive community.
|
|
|
|
Expect nothing less of any project.
|
|
|
|
|
2016-06-28 04:05:22 +00:00
|
|
|
|
2021-01-10 17:13:26 +00:00
|
|
|
Sponsoring
|
|
|
|
----------
|
2016-06-28 04:05:22 +00:00
|
|
|
|
2021-01-10 17:13:26 +00:00
|
|
|
.. image:: https://img.shields.io/badge/GitHub-sponsor-ff69b4
|
|
|
|
:target: https://github.com/sponsors/jab
|
|
|
|
:alt: Sponsor through GitHub
|
squashed changes for 0.13.0
- support Python 3.6, refactor CI/test setup, increase test coverage
- refactor BidirectionalMapping, BidictBase, OrderedBidictBase,
FrozenBidictBase, and subclasses
- move frozenorderedbidict into _frozen and looseorderedbidict into _loose
- register bidict as a virtual subclass of MutableMapping rather than
inheriting from it directly. This makes it clearer that it does not use any
of the concrete generic methods that MutableMapping provides.
- improve performance and flexibility of frozenbidict and
frozenorderedbidict hashing
- docs, including new type-hierarchy.png diagram
- rm unused imap, ifilter, izip_longest from compat, add PYPY
- update to latest versions of dependencies
- restore benchmarking on travis
2017-01-09 15:37:31 +00:00
|
|
|
|
2021-01-10 17:13:26 +00:00
|
|
|
.. image:: https://img.shields.io/badge/Gumroad-sponsor-55a0a4.svg
|
|
|
|
:target: https://gumroad.com/l/bidict
|
|
|
|
:alt: Sponsor through Gumroad
|
2016-12-06 23:09:45 +00:00
|
|
|
|
2021-01-10 17:13:26 +00:00
|
|
|
.. image:: https://img.shields.io/badge/PayPal-sponsor-blue.svg
|
|
|
|
:target: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=jabronson%40gmail%2ecom&lc=US&item_name=Sponsor%20bidict%20(name%20a%20fair%20price)
|
|
|
|
:alt: Sponsor through PayPal
|
2020-01-01 19:11:46 +00:00
|
|
|
|
2018-04-06 04:28:44 +00:00
|
|
|
.. duplicated in README.rst
|
|
|
|
(would use `.. include::` but GitHub doesn't understand it)
|
|
|
|
|
2021-01-10 17:13:26 +00:00
|
|
|
Bidict is the product of thousands of hours of my unpaid work
|
|
|
|
over the 12+ years I've been maintaining it.
|
2018-10-17 15:16:43 +00:00
|
|
|
|
2018-04-06 04:28:44 +00:00
|
|
|
If bidict has helped you accomplish your work,
|
|
|
|
especially work you've been paid for,
|
2021-01-10 17:13:26 +00:00
|
|
|
it's easy to
|
|
|
|
`sponsor me through GitHub <https://github.com/sponsors/jab>`__.
|
|
|
|
|
|
|
|
Choose a tier and GitHub handles everything else.
|
|
|
|
The sponsorship just goes on your regular GitHub bill;
|
|
|
|
there's nothing extra to do.
|
|
|
|
You can also sponsor me through
|
|
|
|
`Gumroad <https://gumroad.com/l/bidict>`__ or
|
|
|
|
`PayPal <https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=jabronson%40gmail%2ecom&lc=US&item_name=Sponsor%20bidict%20(name%20a%20fair%20price)>`__.
|
|
|
|
|
|
|
|
Read more about
|
|
|
|
`companies supporting open source developers
|
|
|
|
<https://www.cognitect.com/blog/supporting-open-source-developers>`__.
|
2016-06-28 04:05:22 +00:00
|
|
|
|
2018-02-24 09:14:42 +00:00
|
|
|
|
2016-06-28 04:05:22 +00:00
|
|
|
Code of Conduct
|
|
|
|
---------------
|
2015-03-22 18:21:15 +00:00
|
|
|
|
2016-06-28 04:05:22 +00:00
|
|
|
All participation in this project should respect the
|
2017-11-20 03:24:08 +00:00
|
|
|
:doc:`code-of-conduct`. [#fn-coc]_
|
|
|
|
|
2016-06-28 04:05:22 +00:00
|
|
|
By participating, you are expected to honor this code.
|
2015-03-22 18:21:15 +00:00
|
|
|
|
2018-04-06 04:28:44 +00:00
|
|
|
.. [#fn-let-me-know] `<https://bidict.readthedocs.io/#notice-of-usage>`__
|
|
|
|
.. [#fn-coc] `<CODE_OF_CONDUCT.rst>`_ | `<https://bidict.readthedocs.io/code-of-conduct.html>`__
|