Skip to content

Commit 4a1b7b5

Browse files
author
Oliver Lammas
committed
merge of intervaltree 3.0.2 with own changes
2 parents c882b05 + 73a00f7 commit 4a1b7b5

Some content is hidden

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

43 files changed

+720
-1245
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
# IDE dirs
22
.idea/
33
*.komodoproject
4+
.vscode/
45

56
# Auto-generated
67
*.pyc
78
dist/
89
build/
910
.cache/
11+
.pytest_cache/
1012

1113
# pyenv
1214
.python-version

.travis.yml

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,23 @@
11
language: python
2-
python:
3-
- "2.7"
4-
- "3.4"
5-
- "3.5"
6-
- "3.6"
2+
matrix:
3+
include:
4+
- python: 2.7
5+
- python: 3.4
6+
- python: 3.5
7+
- python: 3.6
8+
- python: 3.7
9+
dist: xenial
10+
sudo: true
11+
- python: 3.8-dev
12+
env: FAILOK=y
13+
dist: xenial
14+
sudo: true
15+
allow_failures:
16+
- env: FAILOK=y
717
install:
8-
- make deps-dev
9-
- pip install coverage
18+
- make deps-dev
19+
- pip install coverage
1020
script:
11-
coverage run --source=intervaltree setup.py develop test
21+
coverage run --source=intervaltree setup.py develop test
1222
after_success:
13-
coverage report
23+
coverage report

CHANGELOG.md

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,34 @@
11
# Change log
22

3-
## Version 3.1.0
4-
###fixed
5-
- import of mutable sets for python 3.8
3+
## Version 4.0.0 (kindjacket edit)
64

7-
###added
5+
### added
86
- `chop_intervals_that_envelope_range()` method and tests
97
- `search_for_period_that_envelopes_range()` method and tests
108
- `search_point_inclusive` method
119
- pyproject.toml for poetry build
1210

11+
## Version 3.0.2
12+
- Fixed:
13+
- On some systems, setup.py opened README.md with a non-unicode encoding. My fault for leaving the encoding flapping in the breeze. It's been fixed.
14+
15+
## Version 3.0.1
16+
- Added:
17+
- Travis testing for 3.7 and 3.8-dev. These needed OpenSSL, sudo and Xenial. 3.8-dev is allowed to fail.
18+
- Fixed:
19+
- PyPI wasn't rendering markdown because I didn't tell it what format to use.
20+
- Python 2 wasn't installing via pip because of a new utils package. It has been zapped.
21+
- Maintainers:
22+
- TestPyPI version strings use `.postN` as the suffix instead of `bN`, and `N` counts from the latest tagged commit, which should be the last release
23+
- Install from TestPyPI works via `make install-testpypi`
24+
1325
## Version 3.0.0
14-
- Dropped support for Python 2.6, 3.2, and 3.3
15-
- Add support for Python 3.5 and 3.6
26+
- Breaking:
27+
- `search(begin, end, strict)` has been replaced with `at(point)`, `overlap(begin, end)`, and `envelop(begin, end)`
28+
- `extend(items)` has been deleted, use `update(items)` instead
29+
- Methods that take a `strict=True/False` argument now consistently default to `strict=True`
30+
- Dropped support for Python 2.6, 3.2, and 3.3
31+
- Add support for Python 3.5, 3.6, and 3.7
1632
- Faster `Interval` overlap checking (@tuxzz, #56)
1733
- Updated README:
1834
- new restructuring methods from 2.1.0
@@ -23,10 +39,12 @@
2339
- `Interval.distance_to()` gave an incorrect distance when passed the `Interval`'s upper boundary
2440
- `Node.pop_greatest_child()` sometimes forgot to `rotate()` when creating new child nodes. (@escalonn, #41, #42)
2541
- `IntervalTree.begin()` and `end()` are O(1), not O(n). (@ProgVal, #40)
42+
- `intersection_update()` and `symmetric_difference()` and `symmetric_difference_update()` didn't actually work. Now they do.
43+
- `collections.abc` deprecation warning no longer happens
2644
- Maintainers:
27-
- use github.com/kennethreitz/pyandoc
45+
- PyPi accepts Markdown! Woohoo!
2846
- reorganize tests
29-
- more tests added to improve code coverage (We're at 95%! Woohoo!)
47+
- more tests added to improve code coverage (We're at 96%! Yay!)
3048
- test for issue #4 had a broken import reference
3149

3250
## Version 2.1.0

Makefile

Lines changed: 35 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ TEMPS=$(shell \
99
-o \( -type d -name '__pycache__' \) \
1010
)
1111

12-
PYTHONS:=2.7.14 3.4.3 3.5.4 3.6.3
12+
PYTHONS:=2.7.15 3.4.9 3.5.6 3.6.7 3.7.1
1313
PYTHON_MAJORS:=$(shell \
1414
echo "$(PYTHONS)" | \
1515
tr ' ' '\n' | cut -d. -f1 | \
@@ -25,12 +25,22 @@ PYTHON_MINORS:=$(shell \
2525
# See http://peterdowns.com/posts/first-time-with-pypi.html
2626
PYPI=pypitest
2727

28+
TWINE=$(shell \
29+
if twine --version &>/dev/null; then \
30+
echo twine ;\
31+
elif [[ -x ~/Library/Python/3.7/bin/twine ]]; then \
32+
echo '~/Library/Python/3.7/bin/twine' ;\
33+
else \
34+
echo twine ;\
35+
fi \
36+
)
37+
2838
# default target
2939
all: test
3040

31-
test: pytest rst
41+
test: pytest
3242

33-
quicktest: rst
43+
quicktest:
3444
PYPI=$(PYPI) python setup.py test
3545

3646
coverage:
@@ -43,23 +53,23 @@ pytest: deps-dev
4353

4454
clean: clean-build clean-eggs clean-temps
4555

46-
distclean: clean clean-deps
56+
distclean: clean
4757

4858
clean-build:
4959
rm -rf dist build
5060

5161
clean-eggs:
5262
rm -rf *.egg* .eggs/
5363

54-
clean-deps:
55-
rm -rf pyandoc docutils bin
56-
rm -f pandoc
57-
5864
clean-temps:
5965
rm -rf $(TEMPS)
6066

6167
install-testpypi:
62-
pip install --pre -i https://testpypi.python.org/pypi intervaltree
68+
pip install \
69+
--no-cache-dir \
70+
--index-url https://test.pypi.org/simple/ \
71+
--extra-index-url https://pypi.org/simple \
72+
intervaltree
6373

6474
install-pypi:
6575
pip install intervaltree
@@ -70,52 +80,39 @@ install-develop:
7080
uninstall:
7181
pip uninstall intervaltree
7282

73-
# Convert README to rst and check the result
74-
rst: pydocutils pyandoc
75-
PYPI=$(PYPI) python setup.py check --restructuredtext
76-
@echo "README is ready for PyPI"
77-
7883
# Register at PyPI
79-
register: rst
84+
register:
8085
PYPI=$(PYPI) python setup.py register -r $(PYPI)
8186

8287
# Setup for live upload
8388
release:
8489
$(eval PYPI=pypi)
8590

8691
# Build source distribution
87-
sdist-upload:
88-
PYPI=$(PYPI) python setup.py sdist upload -r $(PYPI)
89-
90-
deps-ci: pyandoc
92+
sdist-upload: distclean deps-dev
93+
PYPI=$(PYPI) python setup.py sdist
94+
if [[ "$(PYPI)" == pypitest ]]; then \
95+
$(TWINE) upload --repository-url https://test.pypi.org/legacy/ dist/*; \
96+
else \
97+
$(TWINE) upload dist/*; \
98+
fi
9199

92-
deps-dev: pyandoc pyenv-install-versions
100+
deps-dev: pyenv-install-versions
93101

94-
pyandoc: pandoc-bin
95-
[[ -d pyandoc/pandoc ]] || git clone --depth=50 git://github.com/kennethreitz/pyandoc.git
96-
[[ "`readlink pandoc`" == "pyandoc/pandoc" ]] || ln -s pyandoc/pandoc pandoc
97-
98-
pandoc-bin: pm-update
99-
pandoc -h &>/dev/null || brew install pandoc &>/dev/null || sudo apt-get install pandoc
100-
101-
pydocutils:
102-
$(eval PYPKG=docutils)
103-
python -c 'import $(PYPKG)' &>/dev/null || \
104-
pip install --upgrade $(PYPKG) || \
105-
pip install --upgrade --install-options="--install-purelib='$(PWD)'" docutils
106-
107-
pm-update:
108-
pandoc -h &>/dev/null || brew update &>/dev/null || sudo apt-get update
109-
110102
# Uploads to test server, unless the release target was run too
111103
upload: test clean sdist-upload
112104

113105
pyenv-is-installed:
114-
pyenv --version || (echo "ERROR: pyenv not installed" && false)
106+
pyenv --version &>/dev/null || (echo "ERROR: pyenv not installed" && false)
115107

116108
pyenv-install-versions: pyenv-is-installed
117109
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
110+
for pyver in $(PYTHONS); do \
111+
export PYENV_VERSION=$$pyver; \
112+
pip install -U pip; \
113+
pip install -U pytest; \
114+
pip install -U twine; \
115+
done | grep -v 'Requirement already satisfied, skipping upgrade'
119116
pyenv rehash
120117

121118
# for debugging the Makefile
@@ -136,23 +133,18 @@ env:
136133
distclean \
137134
clean-build \
138135
clean-eggs \
139-
clean-deps \
140136
clean-temps \
141137
install-testpypi \
142138
install-pypi \
143139
install-develop \
144140
pyenv-install-versions \
145141
pyenv-is-installed \
146142
uninstall \
147-
rst \
148143
register \
149144
release \
150145
sdist-upload \
151146
deps-ci \
152147
deps-dev \
153-
pyandoc \
154-
pandoc-bin \
155-
pydocutils \
156148
pm-update \
157149
upload \
158150
env

0 commit comments

Comments
 (0)