Git Product home page Git Product logo

revived's Introduction

Revived

pypi latest version pypi packge license dependencies status travis build status coverage status 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.

Contents

Documentation

You can find the compiled documentation here:

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 :)

revived's People

Contributors

duploduplo avatar requires avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

revived's Issues

Add explicative docstrings

We need decent docstrings at least, to allow possible users to actually try the module and give feedbacks and contributions.

Documentation build fails on Read The Docs

Currently, the documentation building process fails on Read The Docs during the following command:

python /home/docs/checkouts/readthedocs.org/user_builds/revived/envs/initial_documentation/bin/sphinx-build -T -E -b readthedocs -d _build/doctrees-readthedocs -D language=en . _build/html

with this error:

Running Sphinx v1.3.5
making output directory...
loading translations [en]... done
building [mo]: targets for 0 po files that are out of date
building [readthedocs]: targets for 7 source files that are out of date
updating environment: 7 added, 0 changed, 0 removed
reading sources... [ 14%] api
reading sources... [ 28%] api/action

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/revived/envs/initial_documentation/lib/python3.5/site-packages/sphinx/cmdline.py", line 244, in main
    app.build(opts.force_all, filenames)
  File "/home/docs/checkouts/readthedocs.org/user_builds/revived/envs/initial_documentation/lib/python3.5/site-packages/sphinx/application.py", line 266, in build
    self.builder.build_update()
  File "/home/docs/checkouts/readthedocs.org/user_builds/revived/envs/initial_documentation/lib/python3.5/site-packages/sphinx/builders/__init__.py", line 251, in build_update
    'out of date' % len(to_build))
  File "/home/docs/checkouts/readthedocs.org/user_builds/revived/envs/initial_documentation/lib/python3.5/site-packages/sphinx/builders/__init__.py", line 265, in build
    self.doctreedir, self.app))
  File "/home/docs/checkouts/readthedocs.org/user_builds/revived/envs/initial_documentation/lib/python3.5/site-packages/sphinx/environment.py", line 618, in update
    self._read_serial(docnames, app)
  File "/home/docs/checkouts/readthedocs.org/user_builds/revived/envs/initial_documentation/lib/python3.5/site-packages/sphinx/environment.py", line 638, in _read_serial
    self.read_doc(docname, app)
  File "/home/docs/checkouts/readthedocs.org/user_builds/revived/envs/initial_documentation/lib/python3.5/site-packages/sphinx/environment.py", line 791, in read_doc
    pub.publish()
  File "/home/docs/checkouts/readthedocs.org/user_builds/revived/envs/initial_documentation/lib/python3.5/site-packages/docutils/core.py", line 217, in publish
    self.settings)
  File "/home/docs/checkouts/readthedocs.org/user_builds/revived/envs/initial_documentation/lib/python3.5/site-packages/sphinx/environment.py", line 128, in read
    self.parse()
  File "/home/docs/checkouts/readthedocs.org/user_builds/revived/envs/initial_documentation/lib/python3.5/site-packages/docutils/readers/__init__.py", line 78, in parse
    self.parser.parse(self.input, document)
  File "/home/docs/checkouts/readthedocs.org/user_builds/revived/envs/initial_documentation/lib/python3.5/site-packages/docutils/parsers/rst/__init__.py", line 172, in parse
    self.statemachine.run(inputlines, document, inliner=self.inliner)
  File "/home/docs/checkouts/readthedocs.org/user_builds/revived/envs/initial_documentation/lib/python3.5/site-packages/docutils/parsers/rst/states.py", line 170, in run
    input_source=document['source'])
  File "/home/docs/checkouts/readthedocs.org/user_builds/revived/envs/initial_documentation/lib/python3.5/site-packages/docutils/statemachine.py", line 239, in run
    context, state, transitions)
  File "/home/docs/checkouts/readthedocs.org/user_builds/revived/envs/initial_documentation/lib/python3.5/site-packages/docutils/statemachine.py", line 460, in check_line
    return method(match, context, next_state)
  File "/home/docs/checkouts/readthedocs.org/user_builds/revived/envs/initial_documentation/lib/python3.5/site-packages/docutils/parsers/rst/states.py", line 2726, in underline
    self.section(title, source, style, lineno - 1, messages)
  File "/home/docs/checkouts/readthedocs.org/user_builds/revived/envs/initial_documentation/lib/python3.5/site-packages/docutils/parsers/rst/states.py", line 327, in section
    self.new_subsection(title, lineno, messages)
  File "/home/docs/checkouts/readthedocs.org/user_builds/revived/envs/initial_documentation/lib/python3.5/site-packages/docutils/parsers/rst/states.py", line 395, in new_subsection
    node=section_node, match_titles=True)
  File "/home/docs/checkouts/readthedocs.org/user_builds/revived/envs/initial_documentation/lib/python3.5/site-packages/docutils/parsers/rst/states.py", line 282, in nested_parse
    node=node, match_titles=match_titles)
  File "/home/docs/checkouts/readthedocs.org/user_builds/revived/envs/initial_documentation/lib/python3.5/site-packages/docutils/parsers/rst/states.py", line 195, in run
    results = StateMachineWS.run(self, input_lines, input_offset)
  File "/home/docs/checkouts/readthedocs.org/user_builds/revived/envs/initial_documentation/lib/python3.5/site-packages/docutils/statemachine.py", line 239, in run
    context, state, transitions)
  File "/home/docs/checkouts/readthedocs.org/user_builds/revived/envs/initial_documentation/lib/python3.5/site-packages/docutils/statemachine.py", line 460, in check_line
    return method(match, context, next_state)
  File "/home/docs/checkouts/readthedocs.org/user_builds/revived/envs/initial_documentation/lib/python3.5/site-packages/docutils/parsers/rst/states.py", line 2299, in explicit_markup
    nodelist, blank_finish = self.explicit_construct(match)
  File "/home/docs/checkouts/readthedocs.org/user_builds/revived/envs/initial_documentation/lib/python3.5/site-packages/docutils/parsers/rst/states.py", line 2311, in explicit_construct
    return method(self, expmatch)
  File "/home/docs/checkouts/readthedocs.org/user_builds/revived/envs/initial_documentation/lib/python3.5/site-packages/docutils/parsers/rst/states.py", line 2054, in directive
    directive_class, match, type_name, option_presets)
  File "/home/docs/checkouts/readthedocs.org/user_builds/revived/envs/initial_documentation/lib/python3.5/site-packages/docutils/parsers/rst/states.py", line 2103, in run_directive
    result = directive_instance.run()
  File "/home/docs/checkouts/readthedocs.org/user_builds/revived/envs/initial_documentation/lib/python3.5/site-packages/sphinx/ext/autodoc.py", line 1469, in run
    documenter.generate(more_content=self.content)
  File "/home/docs/checkouts/readthedocs.org/user_builds/revived/envs/initial_documentation/lib/python3.5/site-packages/sphinx/ext/autodoc.py", line 828, in generate
    self.document_members(all_members)
  File "/home/docs/checkouts/readthedocs.org/user_builds/revived/envs/initial_documentation/lib/python3.5/site-packages/sphinx/ext/autodoc.py", line 750, in document_members
    check_module=members_check_module and not isattr)
  File "/home/docs/checkouts/readthedocs.org/user_builds/revived/envs/initial_documentation/lib/python3.5/site-packages/sphinx/ext/autodoc.py", line 815, in generate
    sig = self.format_signature()
  File "/home/docs/checkouts/readthedocs.org/user_builds/revived/envs/initial_documentation/lib/python3.5/site-packages/sphinx/ext/autodoc.py", line 1125, in format_signature
    return DocstringSignatureMixin.format_signature(self)
  File "/home/docs/checkouts/readthedocs.org/user_builds/revived/envs/initial_documentation/lib/python3.5/site-packages/sphinx/ext/autodoc.py", line 1011, in format_signature
    return Documenter.format_signature(self)
  File "/home/docs/checkouts/readthedocs.org/user_builds/revived/envs/initial_documentation/lib/python3.5/site-packages/sphinx/ext/autodoc.py", line 477, in format_signature
    self.object, self.options, args, retann)
  File "/home/docs/checkouts/readthedocs.org/user_builds/revived/envs/initial_documentation/lib/python3.5/site-packages/sphinx/application.py", line 512, in emit_firstresult
    for result in self.emit(event, *args):
  File "/home/docs/checkouts/readthedocs.org/user_builds/revived/envs/initial_documentation/lib/python3.5/site-packages/sphinx/application.py", line 508, in emit
    results.append(callback(self, *args))
  File "/home/docs/checkouts/readthedocs.org/user_builds/revived/envs/initial_documentation/lib/python3.5/site-packages/sphinx_autodoc_typehints.py", line 55, in process_signature
    return formatargspec(obj, *argspec[:-1]), None
  File "/home/docs/checkouts/readthedocs.org/user_builds/revived/envs/initial_documentation/lib/python3.5/site-packages/sphinx/ext/autodoc.py", line 250, in formatargspec
    formatvalue=lambda x: '=' + object_description(x))
  File "/usr/lib/python3.5/inspect.py", line 1192, in formatargspec
    for i, arg in enumerate(args):
TypeError: 'function' object is not iterable

Exception occurred:
  File "/usr/lib/python3.5/inspect.py", line 1192, in formatargspec
    for i, arg in enumerate(args):
TypeError: 'function' object is not iterable
The full traceback has been saved in /tmp/sphinx-err-2udmquql.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.