Giter Club home page Giter Club logo

proof's Introduction

wireservice

Name Badges
agate Docs CI Coverage Lint PyPI PyPI downloads
agate-charts Docs CI Coverage Lint PyPI PyPI downloads
agate-dbf Docs CI Coverage Lint PyPI PyPI downloads
agate-excel Docs CI Coverage Lint PyPI PyPI downloads
agate-lookup Docs CI Coverage Lint PyPI PyPI downloads
agate-remote Docs CI Coverage Lint PyPI PyPI downloads
agate-sql Docs CI Coverage Lint PyPI PyPI downloads
agate-stats Docs CI Coverage Lint PyPI PyPI downloads
csvkit Docs CI Coverage Lint PyPI PyPI downloads
leather Docs CI Coverage Lint PyPI PyPI downloads
proof Docs CI Coverage Lint PyPI PyPI downloads

proof's People

Contributors

jean avatar jpmckinney avatar onyxfish avatar pmlandwehr avatar

Stargazers

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

Watchers

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

proof's Issues

Adding argument to the processes

Hi
If there will be a feature that let us add argument to the process would be good. for example:

proof.arguments({'file_path': "path/to/file", "lr": .1})

So the arguments will be shared between process. It is just a raw idea. Maybe be a better way exists for this.
Thank you for your project ๐Ÿ‘

Factor analysis step caching into separate package

I like the idea behind proof, but find the step chaining cumbersome in some cases. I know this isn't very constructive feedback and I'm still working out exactly which cases these are. Rather than feature requesting and making the tool more opinionated about workflow, I'm wondering if the caching logic/API could be factored out into a separate package, allowing the persisting of data and passing it between steps to work using a different task runner, such as invoke.

Factoring this out into a separate package could also parameterize this operation, one day allowing power users to address #11 by serializing to a different format assuming their data is easily serialized as JSON (or something else).

Can't hash unicode data

File "/Users/tylerfisher/.virtualenvs/amazon-data/lib/python2.7/site-packages/proof/analysis.py", line 133, in then
    _trace=self._trace
  File "/Users/tylerfisher/.virtualenvs/amazon-data/lib/python2.7/site-packages/proof/analysis.py", line 92, in __init__
    self._cache_path = os.path.join(self._cache_dir, '%s.cache' % self._fingerprint())
  File "/Users/tylerfisher/.virtualenvs/amazon-data/lib/python2.7/site-packages/proof/analysis.py", line 108, in _fingerprint
    hasher.update(source.encode('utf-8'))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 106: ordinal not in range(128)

Branching architecture?

In broca there's support for branching pipelines so you can combine pipelines which have many redundant components - I was thinking of breaking that out into a separate package but it seems like it may be appropriate for proof - what do you think?

Why not proof.py?

Any reason the library is a package and not a single Python module?

Make cache a parameter to Analysis constructor

There are often cases where multiple reporters, with different skillsets, will be working on analysis in parallel. Often the common language is a SQL database. It would be cool to be able to replace the disk-based Pickle cache with a cache that is storing the data to SQL tables. This is outside the scope of proof, but parameterizing the cache would let people write their own cache implementations.

A built-in way to define a process as the last one to be executed

Hello,

Would be great if there was a built-in way to define that a process will be the last one executed. Something like:

works as expected...

analysis = proof.Analysis(initialize_data, last_process=last_process)
analysis.then(process_0)
analysis.then(process_1)
analysis.then(process_2)
analysis.then(last_process)

raises an exception

analysis = proof.Analysis(initialize_data, last_process=last_process)
analysis.then(process_0)
analysis.then(process_1)
analysis.then(process_2)
analysis.then(last_process)
analysis.then(process_3)
# Exception(Other process was added after the one specified as the last one.)

raises an exception

analysis = proof.Analysis(initialize_data, last_process=last_process)
analysis.then(process_0)
analysis.then(process_1)
analysis.then(process_2)
# Exception(It's missing the last one!)

In the last example, instead an exception, the call of the method then (with the last process) could be implicit, but you know... "Explicit is better than implicit."

What do you think ?

deepcopy bug

I think this is a proof issue?

Sample code:

import agate
import proof

def load_data(data):
    data['responses'] = agate.Table.from_csv('responses.csv')

def unweighted_totals(data):
    data['first'] = data['responses'].group_by('first')

if __name__ == '__main__':

    data_loaded = proof.Analysis(load_data)
    data_loaded.then(unweighted_totals)

Result:

File "tally.py", line 31, in <module>
    data_loaded.run()
  File "/Users/tylerfisher/.virtualenvs/listeners2015/lib/python2.7/site-packages/proof/analysis.py", line 204, in run
    analysis.run(refresh=refresh, _parent_cache=self._cache)
  File "/Users/tylerfisher/.virtualenvs/listeners2015/lib/python2.7/site-packages/proof/analysis.py", line 192, in run
    local_data = _parent_cache.get()
  File "/Users/tylerfisher/.virtualenvs/listeners2015/lib/python2.7/site-packages/proof/analysis.py", line 50, in get
    return deepcopy(self._data)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 163, in deepcopy
    y = copier(x, memo)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 257, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 190, in deepcopy
    y = _reconstruct(x, rv, 1, memo)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 334, in _reconstruct
    state = deepcopy(state, memo)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 163, in deepcopy
    y = copier(x, memo)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 257, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 190, in deepcopy
    y = _reconstruct(x, rv, 1, memo)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 334, in _reconstruct
    state = deepcopy(state, memo)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 163, in deepcopy
    y = copier(x, memo)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 257, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 163, in deepcopy
    y = copier(x, memo)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 237, in _deepcopy_tuple
    y.append(deepcopy(a, memo))
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 190, in deepcopy
    y = _reconstruct(x, rv, 1, memo)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 334, in _reconstruct
    state = deepcopy(state, memo)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 163, in deepcopy
    y = copier(x, memo)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 257, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 190, in deepcopy
    y = _reconstruct(x, rv, 1, memo)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 334, in _reconstruct
    state = deepcopy(state, memo)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 163, in deepcopy
    y = copier(x, memo)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 257, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 163, in deepcopy
    y = copier(x, memo)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 298, in _deepcopy_inst
    state = deepcopy(state, memo)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 163, in deepcopy
    y = copier(x, memo)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 257, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 190, in deepcopy
    y = _reconstruct(x, rv, 1, memo)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 334, in _reconstruct
    state = deepcopy(state, memo)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 163, in deepcopy
    y = copier(x, memo)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 257, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 174, in deepcopy
    y = copier(memo)
TypeError: cannot deepcopy this pattern object

If I remove proof from the equation:

import agate

data = {}

def load_data():
    data['responses'] = agate.Table.from_csv('responses.csv')

def unweighted_totals():
    data['first'] = data['responses'].group_by('first')

if __name__ == '__main__':
    load_data()
    unweighted_totals()

It all works, and I can do things with my grouped data.

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.