Skip to content

Commit

Permalink
Merge pull request #101 from chaimleib/v3.1.0
Browse files Browse the repository at this point in the history
V3.1.0
  • Loading branch information
chaimleib committed Aug 3, 2020
2 parents 1624413 + c4bc2af commit f586928
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 24 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ language: python
matrix:
include:
- python: 2.7
- python: 3.4
- python: 3.5
- python: 3.6
- python: 3.7
- python: 3.8
dist: xenial
sudo: true
- python: 3.8-dev
- python: 3.9-dev
env: FAILOK=y
dist: xenial
sudo: true
Expand Down
11 changes: 8 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Change log

## Version 3.1.0
- Dropped support for Python 3.4, added Python 3.8
- Add `__slots__` optimization in Node class, should give performance improvement
- Fixed:
- Restore universal wheels
- Bytes/str type incompatibility in setup.py
- New version of distutils rejects version suffixes of `.postNN`, use `aNN` instead

## Version 3.0.2
- Fixed:
- 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.
Expand Down Expand Up @@ -171,6 +179,3 @@
- Added tests
- Bug fix: interval addition via [] was broken in Python 2.7 (see http://bugs.python.org/issue21785)
- Added intervaltree.bio subpackage, adding some utilities for use in bioinformatics

## Version 0.2.2b
- Forked from https://github.com/MusashiAharon/PyIntervalTree
22 changes: 10 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ TEMPS=$(shell \
-o \( -type d -name '__pycache__' \) \
)

PYTHONS:=2.7.15 3.4.9 3.5.6 3.6.7 3.7.1
PYTHONS:=2.7.18 3.5.9 3.6.11 3.7.8 3.8.5
PYTHON_MAJORS:=$(shell \
echo "$(PYTHONS)" | \
tr ' ' '\n' | cut -d. -f1 | \
Expand All @@ -24,16 +24,7 @@ PYTHON_MINORS:=$(shell \
# PyPI server name, as specified in ~/.pypirc
# See http://peterdowns.com/posts/first-time-with-pypi.html
PYPI=pypitest

TWINE=$(shell \
if twine --version &>/dev/null; then \
echo twine ;\
elif [[ -x ~/Library/Python/3.7/bin/twine ]]; then \
echo '~/Library/Python/3.7/bin/twine' ;\
else \
echo twine ;\
fi \
)
TWINE=twine

# default target
all: test
Expand Down Expand Up @@ -111,8 +102,15 @@ pyenv-install-versions: pyenv-is-installed
export PYENV_VERSION=$$pyver; \
pip install -U pip; \
pip install -U pytest; \
pip install -U twine; \
done | grep -v 'Requirement already satisfied, skipping upgrade'
# twine and wheel needed only under latest PYTHONS version for uploading to PYPI
export PYENV_VERSION=$(shell \
echo $(PYTHONS) | \
tr ' ' '\n' | \
tail -n1 \
)
pip install -U twine
pip install -U wheel
pyenv rehash

# for debugging the Makefile
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pip install intervaltree
Features
--------

* Supports Python 2.7 and Python 3.4+ (Tested under 2.7, and 3.4 thru 3.7)
* Supports Python 2.7 and Python 3.5+ (Tested under 2.7, and 3.5 thru 3.8)
* Initializing
* blank `tree = IntervalTree()`
* from an iterable of `Interval` objects (`tree = IntervalTree(intervals)`)
Expand Down Expand Up @@ -350,11 +350,12 @@ Based on
* [konstantint/Konstantin Tretyakov][Konstantin intervaltree] of the University of Tartu (Estonia)
* [siniG/Avi Gabay][siniG intervaltree]
* [lmcarril/Luis M. Carril][lmcarril intervaltree] of the Karlsruhe Institute for Technology (Germany)
* [depristo/MarkDePristo][depristo intervaltree]

Copyright
---------

* [Chaim Leib Halbert][GH], 2013-2018
* [Chaim Leib Halbert][GH], 2013-2020
* Modifications, [Konstantin Tretyakov][Konstantin intervaltree], 2014

Licensed under the [Apache License, version 2.0][Apache].
Expand All @@ -369,6 +370,7 @@ The source code for this project is at https://github.com/chaimleib/intervaltree
[Konstantin intervaltree]: https://github.com/konstantint/PyIntervalTree
[siniG intervaltree]: https://github.com/siniG/intervaltree
[lmcarril intervaltree]: https://github.com/lmcarril/intervaltree
[depristo intervaltree]: https://github.com/depristo/intervaltree
[Confuzzled AVL tree]: http://www.eternallyconfuzzled.com/tuts/datastructures/jsw_tut_avl.aspx
[Wiki intervaltree]: http://en.wikipedia.org/wiki/Interval_tree
[Kahn intervaltree]: http://zurb.com/forrst/posts/Interval_Tree_implementation_in_python-e0K
Expand Down
8 changes: 8 additions & 0 deletions intervaltree/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ def l2(num):


class Node(object):
__slots__ = (
'x_center',
's_center',
'left_node',
'right_node',
'depth',
'balance'
)
def __init__(self,
x_center=None,
s_center=set(),
Expand Down
3 changes: 3 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ tag_svn_revision = false
[tool:pytest]
addopts = --doctest-modules --doctest-glob='README.md' --ignore=setup.py --ignore=*.pyc
norecursedirs=*.egg* *doc* .* _* htmlcov scripts dist bin test/data

[bdist_wheel]
universal = 1
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@
import subprocess

## CONFIG
target_version = '3.0.3'
target_version = '3.1.0'


def version_info(target_version):
is_dev_version = 'PYPI' in os.environ and os.environ['PYPI'] == 'pypitest'
if is_dev_version:
p = subprocess.Popen('git describe --tag'.split(), stdout=subprocess.PIPE)
git_describe = p.communicate()[0].strip()
git_describe = str(p.communicate()[0]).strip()
release, build, commitish = git_describe.split('-')
version = "{0}.post{1}".format(release, build)
version = "{0}a{1}".format(target_version, build)
else: # This is a RELEASE version
version = target_version
return {
Expand Down Expand Up @@ -86,7 +86,7 @@ def run_tests(self):
long_description=long_description,
long_description_content_type='text/markdown',
classifiers=[ # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
'Development Status :: 4 - Beta',
'Development Status :: 5 - Production/Stable',
'Programming Language :: Python :: Implementation :: PyPy',
'Intended Audience :: Developers',
'Intended Audience :: Information Technology',
Expand All @@ -95,10 +95,10 @@ def run_tests(self):
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'License :: OSI Approved :: Apache Software License',
'Topic :: Scientific/Engineering :: Artificial Intelligence',
'Topic :: Scientific/Engineering :: Bio-Informatics',
Expand Down

0 comments on commit f586928

Please sign in to comment.