|
| 1 | +Contributor's guide |
| 2 | +=================== |
| 3 | + |
| 4 | +Coding style |
| 5 | +------------ |
| 6 | + |
| 7 | +- Follow `PEP 8`_. flake8_ would help. |
| 8 | +- Order imports by lexicographical order. |
| 9 | +- Prefer relative imports. |
| 10 | +- All functions, classes, methods, attributes, and modules should have |
| 11 | + the docstring. |
| 12 | +- Functions and methods should contain ``:param:``, ``:type:`` |
| 13 | + (``:return:``, ``:rtype`` if it returns something), |
| 14 | + (``:raise:`` if it may raise an error) in their docstring. |
| 15 | + |
| 16 | +.. _flake8: https://gitlab.com/pycqa/flake8 |
| 17 | +.. _PEP 8: www.python.org/dev/peps/pep-0008 |
| 18 | + |
| 19 | + |
| 20 | +Tests |
| 21 | +----- |
| 22 | + |
| 23 | +- All code patches should contain one or more unit tests or regression tests. |
| 24 | +- All code patches have to successfully run tests on every Python version |
| 25 | + we aim to support. tox_ would help. |
| 26 | +- All commits will be tested by Travis_ (Linux) and |
| 27 | + AppVeyor_ (Windows). |
| 28 | + |
| 29 | +.. _tox: http://tox.testrun.org/ |
| 30 | +.. _Travis: http://travis-ci.org/dahlia/libsass-python |
| 31 | +.. _AppVeyor: https://ci.appveyor.com/project/dahlia/libsass-python |
| 32 | + |
| 33 | + |
| 34 | +Maintainer's guide |
| 35 | +================== |
| 36 | + |
| 37 | +Releasing |
| 38 | +--------- |
| 39 | + |
| 40 | +Here's a breif check list for releasing a new version. |
| 41 | + |
| 42 | +- Double check the version is correctly bumped. |
| 43 | + You can bump the version by changing ``__version__`` in sass.py file. |
| 44 | + Note that it might be already bumped by other maintainers, |
| 45 | + so check what's the latest release version from PyPI_. |
| 46 | +- If the code freeze for the release is done (including version bump), |
| 47 | + tag the commit using ``git tag`` command. The tag name has to simply be |
| 48 | + the version name e.g. ``1.2.3``. Of course, the tag also has to be pushed |
| 49 | + to the upstream repository. |
| 50 | +- Make a source distribution and upload it to PyPI |
| 51 | + (``python3 setup.py sdist upload``). |
| 52 | + If it's successful the new version must appear on PyPI_. |
| 53 | +- AppVeyor_ automatically makes binary wheels for Windows, but each CI build |
| 54 | + takes longer than an hour. These wheels are not automatically uploaded, |
| 55 | + but there's upload_appveyor_builds.py script that downloads built wheels and |
| 56 | + uploads them to PyPI. |
| 57 | + |
| 58 | +Ping Hong Minhee (hongminhee@member.fsf.org, @dahlia on GitHub) if you need |
| 59 | +any help! |
| 60 | + |
| 61 | +.. _PyPI: https://pypi.python.org/pypi/libsass |
0 commit comments