Revived

https://badge.fury.io/py/revived.svg https://travis-ci.org/RookieGameDevs/revived.svg?branch=master https://codecov.io/gh/RookieGameDevs/revived/branch/master/graph/badge.svg Documentation Status

A predictable state container for python heavily inspired by Redux

While not being a strict 1:1 port of Redux API, Revived is supposed to do pretty much the same job in the most pythonic way possible.

NOTE: I needed this piece of code to work with the latest python available at the moment (3.6). While I am not really caring about other versions, the Travis build is running the test suites on all the 3.5+ versions, including the dev ones.

Documentation

Currently the documentation is not buliding into ReadTheDocs (see issue #11). You can build the documentation locally. Check out Contribute section.

Installation

Revived package is available on pypi: to install it use the following command:

pip install revived

Examples

Usage examples are coming soon.

Contribute

  1. Clone the repository.

  2. Create the virtualenv.

    • using virtualenv:

      virtualenv ENV
      bin/activate
      
    • using virtualfish:

      vf new ENV
      # optional: automatically load the virtualenv when entering the dir
      vf connect
      
  3. Update pip and install pip-tools:

    pip install --upgrade pip  # pip-tools needs pip==6.1 or higher (!)
    pip install pip-tools
    
  4. Install the dependencies:

    pip install -r requirements.txt
    
  5. Build the documentation:

    cd docs
    make html  # or whatever format you prefer
    
  6. Work on the revived module. This project uses pip-tools so you want to add your new direct dependencies in requirements.in and then compile the requirements.txt using:

    pip-compile requirements.in
    
  7. Write tests.

  8. Run tests:

    # to have coverage in command line
    pytest --cov revived --pep8 revived tests
    
    # to have html coverage file in the htmlcov directory
    pytest --cov revived --cov-report html --pep8 revived tests
    
  9. Check type hints:

    mypy revived tests
    
  10. Create a pull request.

  11. Profit :)