Newer
Older
*************
Get Involved
*************
We use `tox`_ as the development interface. This means that as a contributor
you do not have to manage a virtual environment or dependencies. You can safely
run ``pip install --user tox`` as a standard `user package install`_ and then use
the following commands below to perform day-to-day development tasks.
An alternative installation method is provided below however.
.. warning::
This project uses `black`_ which is a tool that requires Python3.6 in order
to run correctly. While we aim for Python 3.5 support from the tool,
developers of this tool are required to use Python 3.6. Please see `pyenv`_
as a convenient tool to install multiple Python versions without
interfering with your system level installation.
.. _black: https://black.readthedocs.io/en/stable/
.. _pyenv: https://github.com/pyenv/pyenv
.. _user package install: https://packaging.python.org/tutorials/installing-packages/#installing-to-the-user-site
Run tests
---------
.. code-block:: bash
tox -e test
Lint source
-----------
.. code-block:: bash
tox -e lint
Format source
-------------
.. code-block:: bash
tox -e format
Type check source
-----------------
.. code-block:: bash
tox -e type
Development install
-------------------
The following command can be used to install the development package without
the use of Tox. This is not required for doing development work but is provided
for the convenience of those who wish to avoid using Tox for some personal
preference.
.. code-block:: bash
$ pip install -e .'[test,lint,format,type,docs,pkg]'
.. warning::
If you see an error message such as:
No matching distribution found for black
Then you should try passing the ``--pre`` option to ``pip install``. The
`black`_ formatting tool is still in the `beta development`_ phase.
.. _black: https://black.readthedocs.io/en/stable/
.. _beta development: https://github.com/ambv/black#note-this-is-a-beta-product
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
Add a new dependency
--------------------
You add to the `install_requires`_ entry in the `setup.cfg`_.
.. _install_requires: https://setuptools.readthedocs.io/en/latest/setuptools.html#options
.. _setup.cfg: ./setup.cfg
Release Process
---------------
.. code-block:: bash
$ git tag x.x.x
$ git push --tags
Test release
============
.. code-block:: bash
$ tox -e metadata-release
$ tox -e test-release
Validate that you can install the package:
.. code-block:: bash
$ pip install -i https://test.pypi.org/simple/ librehosters-cli
$ pip show librehosters-cli
Production release
==================
.. code-block:: bash
$ tox -e metadata-release
$ tox -e prod-release
Validate that you can install the package:
.. code-block:: bash
$ pip install librehosters-cli
$ pip show librehosters-cli