Skip to content

Commit 1115db4

Browse files
authored
Merge pull request #34 from chaimleib/dev2.x
Merge Dev2.x (v3.0.0)
2 parents 30fdc1b + a904b22 commit 1115db4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1135
-578
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*.pyc
77
dist/
88
build/
9+
.cache/
910

1011
# generated by coverage
1112
.coverage

.travis.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
language: python
22
python:
3-
- "2.6"
43
- "2.7"
5-
- "3.2"
6-
- "3.3"
74
- "3.4"
5+
- "3.5"
6+
- "3.6"
87
install:
98
- make deps-dev
109
- pip install coverage

CHANGELOG.md

Lines changed: 34 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,23 @@
1-
Change log
2-
==========
1+
# Change log
2+
3+
## Version 3.0.0
4+
- Dropped support for Python 2.6, 3.2, and 3.3
5+
- Add support for Python 3.5 and 3.6
6+
- Updated README:
7+
- new restructuring methods from 2.1.0
8+
- example of `from_tuples()` added
9+
- more info about `chop()`, `split_overlaps()`, `merge_overlaps()` and `merge_equals()`.
10+
- Fixes:
11+
- `Node.from_tuples()` will now raise an error if given an empty iterable. This should never happen, and it should error if it does.
12+
- `Interval.distance_to()` gave an incorrect distance when passed the `Interval`'s upper boundary
13+
- Maintainers:
14+
- use github.com/kennethreitz/pyandoc
15+
- reorganize tests
16+
- more tests added to improve code coverage (We're at 95%! Woohoo!)
17+
- test for issue #4 had a broken import reference
318

4-
Version 2.1.0
5-
-------------
6-
- Added:
19+
## Version 2.1.0
20+
- Added:
721
- `merge_overlaps()` method and tests
822
- `merge_equals()` method and tests
923
- `range()` method
@@ -16,25 +30,20 @@ Version 2.1.0
1630
- Added coverage test (`make coverage`) with html report (`htmlcov/index.html`)
1731
- Tests run slightly faster
1832

19-
Version 2.0.4
20-
-------------
33+
## Version 2.0.4
2134
- Fix: Issue #27: README incorrectly showed using a comma instead of a colon when querying the `IntervalTree`: it showed `tree[begin, end]` instead of `tree[begin:end]`
2235

23-
Version 2.0.3
24-
-------------
36+
## Version 2.0.3
2537
- Fix: README showed using + operator for setlike union instead of the correct | operator
2638
- Removed tests from release package to speed up installation; to get the tests, download from GitHub
2739

28-
Version 2.0.2
29-
-------------
40+
## Version 2.0.2
3041
- Fix: Issue #20: performance enhancement for large trees. `IntervalTree.search()` made a copy of the entire `boundary_table` resulting in linear search time. The `sortedcollections` package is now the sole install dependency
3142

32-
Version 2.0.1
33-
-------------
43+
## Version 2.0.1
3444
- Fix: Issue #26: failed to prune empty `Node` after a rotation promoted contents of `s_center`
3545

36-
Version 2.0.0
37-
-------------
46+
## Version 2.0.0
3847
- `IntervalTree` now supports the full `collections.MutableSet` API
3948
- Added:
4049
- `__delitem__` to `IntervalTree`
@@ -62,12 +71,10 @@ Version 2.0.0
6271
- `IntervalTree.overlaps()` and friends returned `None` instead of `False`
6372
- Maintainers: `make install-testpypi` failed because the `pip` was missing a `--pre` flag
6473

65-
Version 1.1.1
66-
-------------
74+
## Version 1.1.1
6775
- Removed requirement for pyandoc in order to run functionality tests.
6876

69-
Version 1.1.0
70-
-------------
77+
## Version 1.1.0
7178
- Added ability to use `Interval.distance_to()` with points, not just `Intervals`
7279
- Added documentation on return types to `IntervalTree` and `Interval`
7380
- `Interval.__cmp__()` works with points too
@@ -77,18 +84,15 @@ Version 1.1.0
7784
- Optimality tests added
7885
- `Interval` overlap tests for ranges, `Interval`s and points added
7986

80-
Version 1.0.2
81-
-------------
87+
## Version 1.0.2
8288
-Bug fixes:
8389
- `Node.depth_score_helper()` raised `AttributeError`
8490
- README formatting
8591

86-
Version 1.0.1
87-
-------------
92+
## Version 1.0.1
8893
- Fix: pip install failure because of failure to generate README.rst
8994

90-
Version 1.0.0
91-
-------------
95+
## Version 1.0.0
9296
- Renamed from PyIntervalTree to intervaltree
9397
- Speed improvements for adding and removing Intervals (~70% faster than 0.4)
9498
- Bug fixes:
@@ -99,23 +103,17 @@ Version 1.0.0
99103
- More robust local testing tools
100104
- Long series of interdependent tests have been separated into sections
101105

102-
Version 0.4
103-
-------------
104-
106+
## Version 0.4
105107
- Faster balancing (~80% faster)
106108
- Bug fixes:
107109
- Double rotations were performed in place of a single rotation when presented an unbalanced Node with a balanced child.
108110
- During single rotation, kept referencing an unrotated Node instead of the new, rotated one
109111

110-
Version 0.3.3
111-
-------------
112-
112+
## Version 0.3.3
113113
- Made IntervalTree crash if inited with a null Interval (end <= begin)
114114
- IntervalTree raises ValueError instead of AssertionError when a null Interval is inserted
115115

116-
Version 0.3.2
117-
-------------
118-
116+
## Version 0.3.2
119117
- Support for Python 3.2+ and 2.6+
120118
- Changed license from LGPL to more permissive Apache license
121119
- Merged changes from https://github.com/konstantint/PyIntervalTree to
@@ -144,16 +142,12 @@ Version 0.3.2
144142
- Local script to test in all supported versions of Python
145143
- Added IntervalTree.score() to measure how optimally a tree is structured
146144

147-
Version 0.2.3
148-
-------------
149-
145+
## Version 0.2.3
150146
- Slight changes for inclusion in PyPI.
151147
- Some documentation changes
152148
- Added tests
153149
- Bug fix: interval addition via [] was broken in Python 2.7 (see http://bugs.python.org/issue21785)
154150
- Added intervaltree.bio subpackage, adding some utilities for use in bioinformatics
155151

156-
Version 0.2.2b
157-
--------------
158-
152+
## Version 0.2.2b
159153
- Forked from https://github.com/MusashiAharon/PyIntervalTree

HACKING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This is a developer's guide to modifying and maintaining `intervaltree`.
99

1010
* On Linux, you will need `apt-get`.
1111

12-
On all systems, Python 2.6, 2.7, 3.2, 3.3 and 3.4 are needed to run the complete test suite.
12+
On all systems, Python 2.6, 2.7, 3.2, 3.3, 3.4 and 3.5 are needed to run the complete test suite.
1313

1414
### Single version of Python
1515

@@ -87,7 +87,7 @@ The two commands above run all the available tests on all versions of Python sup
8787

8888
The first time you run `make`, you may be asked for your password. This is in order to install `pandoc`, a tool used for processing the README file.
8989

90-
Running all tests requires that you have all the supported versions of Python installed. These are 2.6, 2.7, 3.2, 3.3, and 3.4. Try to use your packaga manager to install them if possible. Otherwise, go to [python.org/downloads][] and install them manually.
90+
Running all tests requires that you have all the supported versions of Python installed. These are 2.6, 2.7, 3.2, 3.3, 3.4 and 3.5. Try to use your package manager to install them if possible. Otherwise, go to [python.org/downloads][] and install them manually.
9191

9292
#### Single version of Python
9393

@@ -125,7 +125,7 @@ To update the README on PyPI, run
125125

126126
make register
127127

128-
This will test the README's syntax stricly and push it up to the PyPI test server.
128+
This will test the README's syntax strictly and push it up to the PyPI test server.
129129

130130
If you are satisfied with the results, run
131131

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
include README.md CHANGELOG.md LICENSE.txt
1+
include README.md CHANGELOG.md LICENSE.txt

Makefile

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,22 @@ SCRIPTS_DIR:=$(PWD)/scripts
44

55
# any files ending in .py?, and any folders named __pycache__
66
TEMPS=$(shell \
7-
find intervaltree/ test/ \
7+
find intervaltree test \
88
\( -type f -name '*.py?' ! -path '*/__pycache__/*' \) \
99
-o \( -type d -name '__pycache__' \) \
1010
)
1111

12-
PYTHONS:=2.6 2.7 3.2 3.3 3.4
13-
PYTHON_MAJORS:=$(shell \
12+
PYTHONS:=2.7.14 3.4.3 3.5.4 3.6.3
13+
PYTHON_MAJORS:=$(shell \
1414
echo "$(PYTHONS)" | \
1515
tr ' ' '\n' | cut -d. -f1 | \
1616
uniq \
1717
)
18+
PYTHON_MINORS:=$(shell \
19+
echo "$(PYTHONS)" | \
20+
tr ' ' '\n' | cut -d. -f1,2 | \
21+
uniq \
22+
)
1823

1924
# PyPI server name, as specified in ~/.pypirc
2025
# See http://peterdowns.com/posts/first-time-with-pypi.html
@@ -34,7 +39,7 @@ coverage:
3439
coverage html
3540

3641
pytest: deps-dev
37-
"$(SCRIPTS_DIR)/testall.sh"
42+
PYTHONS="$(PYTHONS)" PYTHON_MINORS="$(PYTHON_MINORS)" "$(SCRIPTS_DIR)/testall.sh"
3843

3944
clean: clean-build clean-eggs clean-temps
4045

@@ -82,10 +87,12 @@ release:
8287
sdist-upload:
8388
PYPI=$(PYPI) python setup.py sdist upload -r $(PYPI)
8489

85-
deps-dev: pyandoc
90+
deps-ci: pyandoc
91+
92+
deps-dev: pyandoc pyenv-install-versions
8693

8794
pyandoc: pandoc-bin
88-
[[ -d pyandoc/pandoc ]] || git clone --depth=50 git://github.com/chaimleib/pyandoc.git
95+
[[ -d pyandoc/pandoc ]] || git clone --depth=50 git://github.com/kennethreitz/pyandoc.git
8996
[[ "`readlink pandoc`" == "pyandoc/pandoc" ]] || ln -s pyandoc/pandoc pandoc
9097

9198
pandoc-bin: pm-update
@@ -103,13 +110,21 @@ pm-update:
103110
# Uploads to test server, unless the release target was run too
104111
upload: test clean sdist-upload
105112

113+
pyenv-is-installed:
114+
pyenv --version || (echo "ERROR: pyenv not installed" && false)
115+
116+
pyenv-install-versions: pyenv-is-installed
117+
for pyver in $(PYTHONS); do (echo N | pyenv install $$pyver) || true; done
118+
for pyver in $(PYTHONS); do export PYENV_VERSION=$$pyver; pip install -U pip; pip install -U pytest; done
119+
pyenv rehash
106120

107121
# for debugging the Makefile
108122
env:
109123
@echo
110124
@echo TEMPS="\"$(TEMPS)\""
111125
@echo PYTHONS="\"$(PYTHONS)\""
112126
@echo PYTHON_MAJORS="\"$(PYTHON_MAJORS)\""
127+
@echo PYTHON_MINORS="\"$(PYTHON_MINORS)\""
113128
@echo PYPI="\"$(PYPI)\""
114129

115130

@@ -126,11 +141,14 @@ env:
126141
install-testpypi \
127142
install-pypi \
128143
install-develop \
144+
pyenv-install-versions \
145+
pyenv-is-installed \
129146
uninstall \
130147
rst \
131148
register \
132149
release \
133150
sdist-upload \
151+
deps-ci \
134152
deps-dev \
135153
pyandoc \
136154
pandoc-bin \

0 commit comments

Comments
 (0)