Skip to content

Commit dfb33db

Browse files
authored
update miniconda url (daler#124)
* update miniconda url we we use the latest * pin requirements to later versions * use built-in json for now * force py3.6 for testing * go back to simplejson for py2 support
1 parent 754e0b1 commit dfb33db

6 files changed

+17
-19
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ before_script:
33
- export PATH=~/anaconda/bin:$PATH
44
env:
55
- PY=2
6-
- PY=3
6+
- PY=3.6
77

88
install: "ci/travis-setup.sh"
99
script: "ci/travis-run.sh"

ci/travis-setup.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
set -euo pipefail
33
set -x
44
HERE=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
5-
curl -O https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
5+
curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
66
bash Miniconda3-latest-Linux-x86_64.sh -b -p ~/anaconda
77
export PATH=~/anaconda/bin:$PATH
88

gffutils/feature.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from pyfaidx import Fasta
22
import six
3-
import simplejson
3+
import simplejson as json
44
from gffutils import constants
55
from gffutils import helpers
66
from gffutils import parser
@@ -145,7 +145,7 @@ def __init__(self, seqid=".", source=".", featuretype=".",
145145
attributes = helpers._unjsonify(attributes, isattributes=True)
146146

147147
# it's a string but not JSON: assume original attributes string.
148-
except simplejson.JSONDecodeError:
148+
except json.JSONDecodeError:
149149

150150
# But Feature.attributes is still a dict
151151
attributes, _dialect = parser._split_keyvals(attributes)
@@ -159,7 +159,7 @@ def __init__(self, seqid=".", source=".", featuretype=".",
159159
if isinstance(extra, six.string_types):
160160
try:
161161
extra = helpers._unjsonify(extra)
162-
except simplejson.JSONDecodeError:
162+
except json.JSONDecodeError:
163163
extra = extra.split('\t')
164164

165165
self.seqid = seqid

gffutils/helpers.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import copy
22
import sys
33
import os
4-
import simplejson
4+
import simplejson as json
55
import time
66
import tempfile
77
import six
@@ -256,16 +256,16 @@ def _bin_from_dict(d):
256256
def _jsonify(x):
257257
"""Use most compact form of JSON"""
258258
if isinstance(x, dict_class):
259-
return simplejson.dumps(x._d, separators=(',', ':'))
260-
return simplejson.dumps(x, separators=(',', ':'))
259+
return json.dumps(x._d, separators=(',', ':'))
260+
return json.dumps(x, separators=(',', ':'))
261261

262262

263263
def _unjsonify(x, isattributes=False):
264264
"""Convert JSON string to an ordered defaultdict."""
265265
if isattributes:
266-
obj = simplejson.loads(x)
266+
obj = json.loads(x)
267267
return dict_class(obj)
268-
return simplejson.loads(x)
268+
return json.loads(x)
269269

270270

271271
def _feature_to_fields(f, jsonify=True):

optional-requirements.txt

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# use conda install -c bioconda
2-
biopython
3-
bedtools
4-
pybedtools
5-
bedtools
1+
biopython>=1.73
2+
bedtools>=2.27.1
3+
pybedtools>=0.8.0

requirements.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
pyfaidx
2-
six
3-
argh
4-
argcomplete
1+
pyfaidx>=0.5.5.2
2+
six>=1.12.0
3+
argh>=0.26.2
4+
argcomplete>=1.9.4
55
simplejson

0 commit comments

Comments
 (0)