Skip to content

Commit

Permalink
Setup CI
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasLM committed Aug 3, 2017
1 parent cb6647f commit 03b61d7
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 1 deletion.
1 change: 1 addition & 0 deletions .coverage
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
!coverage.py: This is a private format, don't read it directly!{"lines":{"/home/nicolas/dev/bplustree/bplustree/__init__.py":[1,2],"/home/nicolas/dev/bplustree/bplustree/tree.py":[1,2,4,5,6,7,8,11,15,16,17,18,37,40,52,62,66,71,80,95,99,101,105,109,114,120,125,133,134,139,140,146,174,198,223,247,19,20,21,126,127,128,129,130,131,22,23,24,121,122,123,38,26,27,28,30,31,32,33,41,44,135,136,137,175,176,45,46,47,35,53,54,55,59,60,56,57,63,64,72,141,142,144,73,74,75,76,77,49,50,199,200,201,202,203,204,205,207,209,210,248,249,250,251,252,218,220,221,178,180,183,184,192,194,195,196,211,212,213,215,216,224,225,226,227,229,230,231,233,235,236,244,245,237,238,239,241,242,143,78,81,82,84,86,88,90,91,93,110,96,147,150,154,155,159,160,169,172,112,161,164,167,97,111,181,170,106,107,102,103,148,151,152,165,157,162,187,188,189,190],"/home/nicolas/dev/bplustree/bplustree/utils.py":[1,2,5,10,11,12],"/home/nicolas/dev/bplustree/bplustree/const.py":[1,4,8,11,14,18,19,22,25,26,27,28,29],"/home/nicolas/dev/bplustree/bplustree/entry.py":[1,3,7,9,11,12,15,16,19,22,25,28,31,35,36,39,52,74,90,96,97,100,113,131,148,40,41,42,45,47,49,50,75,76,77,78,79,85,86,88,48,53,55,56,57,59,60,63,65,66,67,69,71,72,20,101,104,105,107,108,109,110,132,133,134,136,137,143,144,146,111,114,115,116,118,119,120,122,124,125,127,128,129,23],"/home/nicolas/dev/bplustree/bplustree/memory.py":[1,2,3,4,6,8,9,12,13,14,17,38,40,45,51,54,61,65,66,70,74,77,89,96,101,129,142,146,159,41,42,43,46,47,48,49,52,71,55,56,58,59,62,63,57,67,68,78,79,24,25,28,29,33,35,80,81,82,85,86,87,90,91,92,93,147,148,149,150,151,152,153,154,97,98,160,161,162,163,164,165,99,143,144,102,103,104,105,130,131,137,138,140,155,156,157,106,107,108,110,111,112,114,115,116,118,119,120,122,123,124,126,127,31,26,94],"/home/nicolas/dev/bplustree/bplustree/node.py":[1,2,3,4,6,8,11,14,15,16,17,20,29,48,71,72,75,76,79,83,87,91,95,96,97,100,104,107,110,113,123,134,136,150,155,163,166,170,171,175,179,182,188,194,195,198,205,208,212,213,216,234,235,238,244,250,251,254,199,200,201,202,167,168,21,22,23,24,25,26,157,158,159,49,50,53,54,55,58,59,62,64,65,66,67,69,151,152,183,184,185,186,239,240,241,242,209,210,255,256,257,258,27,30,31,32,33,35,36,37,39,40,42,43,137,138,139,141,143,145,146,144,142,140,105,51,44,45,46,221,222,223,226,227,228,229,231,114,115,116,118,119,121,111,108,120,102,85,81,93,89,73,172,128,129,130,131,132,189,190,191,214,224,225,245,246,247]}}
15 changes: 15 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
language: python

python:
- "3.5"
- "3.6"

install:
- pip install -r requirements.txt

script:
- pytest -v --cov=bplustree tests/
- pep8 bplustree tests

after_success:
- coveralls
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ Bplustree

An on-disk B+tree for Python 3.

[![Build Status](https://travis-ci.org/NicolasLM/bplustree.svg?branch=master)](https://travis-ci.org/NicolasLM/bplustree)
[![Coverage Status](https://coveralls.io/repos/github/NicolasLM/bplustree/badge.svg?branch=master)](https://coveralls.io/github/NicolasLM/bplustree?branch=master)

```python
>>> from bplustree import BPlusTree
>>> tree = BPlusTree(filename='/tmp/bplustree.db', order=50)
Expand Down
14 changes: 14 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
cachetools==2.0.0
certifi==2017.7.27.1
chardet==3.0.4
coverage==4.0.3
idna==2.5
pep8==1.7.0
py==1.4.33
pytest==3.0.7
pytest-cov==2.5.1
python-coveralls==2.9.1
PyYAML==3.12
requests==2.18.3
six==1.10.0
urllib3==1.22
2 changes: 1 addition & 1 deletion tests/test_memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def test_file_memory_fsync(mock_fsync, clean_file):
mem = FileMemory(filename, tree_conf, fsync=Fsync.ALWAYS)
mem._write_page(0, bytes(tree_conf.page_size))
mem.close()
mock_fsync.assert_called()
mock_fsync.assert_called_with(mock.ANY)


def test_open_file_in_dir(clean_file):
Expand Down

0 comments on commit 03b61d7

Please sign in to comment.