Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
pipermerriam committed Mar 31, 2017
0 parents commit 4cfc5e3
Show file tree
Hide file tree
Showing 25 changed files with 2,147 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .gitignore
@@ -0,0 +1,51 @@
*.py[cod]

# C extensions
*.so

# Packages
*.egg
*.egg-info
dist
build
eggs
parts
var
sdist
develop-eggs
.installed.cfg
lib
lib64

# Installer logs
pip-log.txt

# Unit test / coverage reports
.coverage
.tox
nosetests.xml

# Translations
*.mo

# Mr Developer
.mr.developer.cfg
.project
.pydevproject

# Complexity
output/*.html
output/*/index.html

# Sphinx
docs/_build
docs/modules.rst

# pytest
.cache/

# fixtures
fixtures/**

# profiling
prof/**
3 changes: 3 additions & 0 deletions .gitmodules
@@ -0,0 +1,3 @@
[submodule "fixtures"]
path = fixtures
url = git@github.com:ethereum/tests.git
22 changes: 22 additions & 0 deletions .travis.yml
@@ -0,0 +1,22 @@
sudo: false
language: python
python:
- "3.5"
dist: trusty
env:
matrix:
- TOX_ENV=py27
- TOX_ENV=py3
- TOX_ENV=py35-stdlib
- TOX_ENV=flake8
cache:
pip: true
install:
- "travis_retry pip install pip setuptools --upgrade"
- "travis_retry pip install tox"
before_script:
- pip freeze
script:
- tox -e $TOX_ENV --recreate
after_script:
- cat .tox/$TOX_ENV/log/*.log
54 changes: 54 additions & 0 deletions Makefile
@@ -0,0 +1,54 @@
.PHONY: clean-pyc clean-build docs

help:
@echo "clean-build - remove build artifacts"
@echo "clean-pyc - remove Python file artifacts"
@echo "lint - check style with flake8"
@echo "test - run tests quickly with the default Python"
@echo "testall - run tests on every Python version with tox"
@echo "coverage - check code coverage quickly with the default Python"
@echo "docs - generate Sphinx HTML documentation, including API docs"
@echo "release - package and upload a release"
@echo "sdist - package"

clean: clean-build clean-pyc

clean-build:
rm -fr build/
rm -fr dist/
rm -fr *.egg-info

clean-pyc:
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +

lint:
flake8 trie

test:
py.test --tb native tests

test-all:
tox

coverage:
coverage run --source trie
coverage report -m
coverage html
open htmlcov/index.html

docs:
rm -f docs/trie.rst
rm -f docs/modules.rst
sphinx-apidoc -o docs/ -d 2 trie/
$(MAKE) -C docs clean
$(MAKE) -C docs html
open docs/_build/html/index.html

release: clean
python setup.py sdist bdist bdist_wheel upload

sdist: clean
python setup.py sdist bdist bdist_wheel
ls -l dist
1 change: 1 addition & 0 deletions README.md
@@ -0,0 +1 @@
# Python Implementation of the Ethereum Trie structure
3 changes: 3 additions & 0 deletions pytest.ini
@@ -0,0 +1,3 @@
[pytest]
addopts= -v --showlocals --durations 10
python_paths= .

0 comments on commit 4cfc5e3

Please sign in to comment.