From 19239e10933a226db211cd4f2ced895bb1705775 Mon Sep 17 00:00:00 2001 From: Lioscro Date: Wed, 30 Oct 2019 13:55:35 -0700 Subject: [PATCH] update readme and docs --- README.md | 6 +++--- docs/index.rst | 43 ++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 45 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 35fe9f9..cc42e14 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# kb_python +# kb-python ![github version](https://img.shields.io/badge/Version-0.2.0-informational) [![pypi version](https://img.shields.io/pypi/v/kb-python)](https://pypi.org/project/kb-python/0.2.0/) ![python versions](https://img.shields.io/pypi/pyversions/kb_python) @@ -23,7 +23,7 @@ Visit the [Getting Started](https://www.kallistobus.tools/kb_getting_started) pa Developer documentation is hosted on [Read the Docs](https://kb-python.readthedocs.io/en/latest/). ### Code Quality -`kb_python` uses `flake8` and `yapf` to ensure code quality and `nose` +`kb-python` uses `flake8` and `yapf` to ensure code quality and `nose` to run unittests. All necessary dependencies for development can be installed by running `pip install -r dev-requirements.txt`. @@ -40,7 +40,7 @@ version and release the new version to Pypi, 1. Run `make bump_patch`, `make bump_minor` or `make bump_major` depending on which version to bump. This will make a new commit and create a new tag with the new version. -2. Push the commit and tag with `git push --tag`. +2. Push the commit and tag with `make push_release`. 3. Go to the `releases` tab on Github. Select the version that was just commited. `Edit tag`, write a description, and `Publish release`. 4. A Github Actions workflow will be triggered to build and upload the updated diff --git a/docs/index.rst b/docs/index.rst index 4295436..e151535 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -6,9 +6,50 @@ Welcome to kb-python's documentation! ===================================== -This page contains **DEVELOPER** documentation for `kb-python`. +This page contains **DEVELOPER** documentation for ``kb-python``. For user documentation and tutorials, please go to `kallisto | bustools `_. +Development Prerequisites +^^^^^^^^^^^^^^^^^^^^^^^^^ +There are a couple of things you must set up on your machine so that all of your +commits satisfy code quality and unit-testing requirements. First, install all +necessary packages by running:: + + pip install -r requirements.txt + pip install -r dev-requirements.txt + +Code qualty and unit tests are strictly enforced for every pull request via +Github actions. + +Code Quality +"""""""""""" +``kb-python`` uses ``flake8`` and ``yapf`` to ensure code quality. The easiest +way to set these up so that they run automatically for every commit is to install +``pre-commit`` hooks by running:: + + pre-commit install + +at the root of the repository. + +Unit-testing +"""""""""""" +``kb-python`` uses ``nose`` to run unit tests. There is a convenient Makefile +rule in place to run all tests.:: + + make test + +Releasing New Versions +^^^^^^^^^^^^^^^^^^^^^^ +This section walks you through, step-by-step, how to release a new version. + +1. Make sure you are on the up-to-date ``master`` branch. +2. Run ``make bump_patch``, ``make bump_minor``, or ``make bump_major`` depending + on what version you will be bumping. +3. Run ``make push_release``. This will push the new commit and tag. +4. Go to the `releases` tab on Github. +5. Select the new release, edit the release description, and `Publish release`. +6. A Github action will automatically trigger to upload the new release to PyPi. + .. toctree:: :maxdepth: 2 :caption: Contents: