[med-svn] [Git][med-team/kineticstools][master] 9 commits: routine-update: New upstream version
Étienne Mollier (@emollier)
gitlab at salsa.debian.org
Mon Oct 25 22:24:11 BST 2021
Étienne Mollier pushed to branch master at Debian Med / kineticstools
Commits:
78fab25a by Étienne Mollier at 2021-10-25T22:05:00+02:00
routine-update: New upstream version
- - - - -
1261423e by Étienne Mollier at 2021-10-25T22:05:02+02:00
New upstream version 0.6.1+git20210811.276ca9c+dfsg
- - - - -
44d4fa4b by Étienne Mollier at 2021-10-25T22:05:33+02:00
Update upstream source from tag 'upstream/0.6.1+git20210811.276ca9c+dfsg'
Update to upstream version '0.6.1+git20210811.276ca9c+dfsg'
with Debian dir 95d14914d0206c6f3f726f5d4df371056d11754e
- - - - -
2f0bfb94 by Étienne Mollier at 2021-10-25T22:05:34+02:00
routine-update: Standards-Version: 4.6.0
- - - - -
5c5b7068 by Étienne Mollier at 2021-10-25T22:05:40+02:00
routine-update: No tab in license text
- - - - -
24d2c70c by Étienne Mollier at 2021-10-25T22:31:52+02:00
d/rules: remove python3-nose environment
- - - - -
c10e400d by Étienne Mollier at 2021-10-25T23:00:50+02:00
Extend tests2to3.patch to pytest-3 in Makefile.
- - - - -
456c7280 by Étienne Mollier at 2021-10-25T23:01:39+02:00
Replace autopkgtest dependency on nose to pytest
This also involves adjusting the test launcher to call the proper
Makefile target, in order to call the test as intended by upstream.
- - - - -
4e3919b8 by Étienne Mollier at 2021-10-25T23:22:34+02:00
ready changelog to upload to unstable
- - - - -
15 changed files:
- .gitignore
- debian/changelog
- debian/control
- debian/copyright
- debian/patches/tests2to3.patch
- debian/rules
- debian/tests/control
- kineticsTools/ModificationDecode.py
- kineticsTools/MultiSiteCommon.py
- kineticsTools/MultiSiteDetection.py
- kineticsTools/WorkerProcess.py
- kineticsTools/loader.py
- kineticsTools/summarizeModifications.py
- setup.py
- test/test_loader.py
Changes:
=====================================
.gitignore
=====================================
@@ -8,3 +8,6 @@ kineticsTools.egg-info/
/nosetests.xml
/tree_predict*.so
test/cram/*.err
+test/TestOutputs.csv
+test/TestOutputs.gff
+test/nosetests.xml
=====================================
debian/changelog
=====================================
@@ -1,8 +1,16 @@
-kineticstools (0.6.1+git20200729.e3723e0+dfsg-2) UNRELEASED; urgency=medium
+kineticstools (0.6.1+git20210811.276ca9c+dfsg-1) unstable; urgency=medium
+ * New upstream version
* d/control: update uploader address
-
- -- Étienne Mollier <emollier at debian.org> Mon, 12 Jul 2021 23:21:08 +0200
+ * Standards-Version: 4.6.0 (routine-update)
+ * No tab in license text (routine-update)
+ * d/rules: remove python nose test environment and leftovers.
+ * Extend tests2to3.patch to cover pytest-3 in Makefile.
+ * Replace autopkgtest dependency on python3-nose to python3-pytest and call
+ the Makefile target with the proper py-tests target instead of the now
+ non-existent one.
+
+ -- Étienne Mollier <emollier at debian.org> Mon, 25 Oct 2021 23:20:10 +0200
kineticstools (0.6.1+git20200729.e3723e0+dfsg-1) unstable; urgency=medium
=====================================
debian/control
=====================================
@@ -18,7 +18,7 @@ Build-Depends: debhelper-compat (= 13),
python3-pytest <!nocheck>,
python3-pytest-runner <!nocheck>,
python3-pytest-xdist <!nocheck>
-Standards-Version: 4.5.1
+Standards-Version: 4.6.0
Vcs-Browser: https://salsa.debian.org/med-team/kineticstools
Vcs-Git: https://salsa.debian.org/med-team/kineticstools.git
Homepage: https://github.com/PacificBiosciences/kineticsTools
=====================================
debian/copyright
=====================================
@@ -6,8 +6,8 @@ Files-Excluded: */whitepaper
Files: *
Copyright:
- 2011-2015 Pacific Biosciences of California, Inc.,
- 2012 Patrick Marks, David Alexander, Onureena Banerjee
+ 2011-2015 Pacific Biosciences of California, Inc.,
+ 2012 Patrick Marks, David Alexander, Onureena Banerjee
License: PacBio-BSD-3-Clause
Files: debian/*
=====================================
debian/patches/tests2to3.patch
=====================================
@@ -3,9 +3,9 @@ Last-Update: 2020-03-26 04:21:08 +0100
Description: Use Python3 in test
Bug: https://github.com/PacificBiosciences/kineticsTools/pull/76
---- a/test/test_gather_bigwig.py
-+++ b/test/test_gather_bigwig.py
-@@ -72,7 +72,7 @@ class TestGatherBigwig:
+--- kineticstools.orig/test/test_gather_bigwig.py
++++ kineticstools/test/test_gather_bigwig.py
+@@ -72,7 +72,7 @@
def test_gather_bigwig_cli(self):
tmp_dir = tempfile.mkdtemp()
ofn = op.join(tmp_dir, "gathered.bw")
@@ -14,9 +14,9 @@ Bug: https://github.com/PacificBiosciences/kineticsTools/pull/76
ofn] + self._data_files
log.info("Output will be in %s", tmp_dir)
with open(op.join(tmp_dir, "stdout"), "w") as stdout:
---- a/Makefile
-+++ b/Makefile
-@@ -6,17 +6,17 @@ utest:
+--- kineticstools.orig/Makefile
++++ kineticstools/Makefile
+@@ -6,17 +6,17 @@
all: build install
build:
@@ -39,7 +39,7 @@ Bug: https://github.com/PacificBiosciences/kineticsTools/pull/76
clean:
rm -rf build/;\
-@@ -29,17 +29,17 @@ check: tests
+@@ -29,17 +29,17 @@
tests: cram-tests py-tests extra-tests
cram-tests:
@@ -52,7 +52,8 @@ Bug: https://github.com/PacificBiosciences/kineticsTools/pull/76
py-tests:
# pytest --cov=kineticsTools # does not quite work since we run in test/ dir.
- cd test/; pytest -s -v -p no:warnings -n auto --dist=loadscope --durations=20 --junitxml=../nosetests.xml --cov-report=xml:../coverage.xml test_*.py
+- cd test/; pytest -s -v -p no:warnings -n auto --dist=loadscope --durations=20 --junitxml=../nosetests.xml --cov-report=xml:../coverage.xml test_*.py
++ cd test/; pytest-3 -s -v -p no:warnings --durations=20 --junitxml=../nosetests.xml test_*.py
extra-tests:
- #cram --verbose --xunit-file=cramtests-extra.xml test/cram/extra/*.t
=====================================
debian/rules
=====================================
@@ -5,11 +5,6 @@ include /usr/share/dpkg/default.mk
export LC_ALL=C.UTF-8
export PYBUILD_NAME=kineticstools
-export PYBUILD_TEST_NOSE=0
-export NOSE_VERBOSE=2
-export NOSE_NOCAPTURE=1
-export NOSE_INCLUDE_EXE=1
-export NOSE_TESTS=$(shell ls $(CURDIR)/test/*.py | tr '[:space:]' ',')
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
INSTDIR = $(CURDIR)/debian/$(DEB_SOURCE)
=====================================
debian/tests/control
=====================================
@@ -2,11 +2,11 @@ Test-Command:
cp -r Makefile test $AUTOPKGTEST_TMP/
&& cd $AUTOPKGTEST_TMP
&& ln -s /usr/share/kineticstools kineticsTools
- && make -k unit-tests cram-tests
+ && make -k py-tests cram-tests
Depends:
make,
@,
python3-cram,
- python3-nose,
+ python3-pytest,
hdf5-tools,
Restrictions: allow-stderr,
=====================================
kineticsTools/ModificationDecode.py
=====================================
@@ -237,7 +237,7 @@ class ModificationDecode(MultiSiteCommon):
qvModCalls = dict()
modSeq = a.array('b')
- modSeq.fromstring(self.sequence)
+ modSeq.frombytes(bytes(self.sequence, "ascii"))
# Apply the found modifications to the raw sequence
for (pos, call) in modCalls.items():
@@ -319,7 +319,7 @@ class ModificationDecode(MultiSiteCommon):
sc = 0.0
for pos in range(start, end + 1):
ctx = sequence[(pos - self.pre):(pos + self.post + 1)
- ].tostring().decode("ascii")
+ ].tobytes().decode("ascii")
if pos in self.scores:
sc += self.scores[pos][ctx]
@@ -330,7 +330,7 @@ class ModificationDecode(MultiSiteCommon):
for pos in range(start, end + 1):
ctx = sequence[(pos - self.pre):(pos + self.post + 1)
- ].tostring().decode("ascii")
+ ].tobytes().decode("ascii")
if pos in self.scores:
scores[pos - start] = self.scores[pos][ctx]
=====================================
kineticsTools/MultiSiteCommon.py
=====================================
@@ -143,7 +143,7 @@ class MultiSiteCommon(object):
def getContextMeans(self, start, end, sequence):
meanVector = []
for pos in range(start, end + 1):
- ctx = sequence[(pos - self.pre):(pos + self.post + 1)].tostring().decode("ascii")
+ ctx = sequence[(pos - self.pre):(pos + self.post + 1)].tobytes().decode("ascii")
if ctx in self.contextMeanTable:
meanVector.append(self.contextMeanTable[ctx])
else:
=====================================
kineticsTools/MultiSiteDetection.py
=====================================
@@ -138,7 +138,7 @@ class MultiSiteDetection(object):
contexts = []
for pos in range(start, end + 1):
- ctx = sequence[(pos - self.pre):(pos + self.post + 1)].tostring()
+ ctx = sequence[(pos - self.pre):(pos + self.post + 1)].tobytes()
contexts.append(ctx)
return contexts
@@ -263,7 +263,7 @@ class MultiSiteDetection(object):
qvModCalls = dict()
dnaSeq = a.array('c')
- dnaSeq.fromstring(self.sequence)
+ dnaSeq.frombytes(bytes(self.sequence, "ascii"))
for pos in self.motifPositions:
if pos in self.rawKinetics:
@@ -295,7 +295,7 @@ class MultiSiteDetection(object):
predictions = np.zeros(end - start + 1)
for pos in range(start, end + 1):
- ctx = sequence[(pos - self.pre):(pos + self.post + 1)].tostring()
+ ctx = sequence[(pos - self.pre):(pos + self.post + 1)].tobytes()
predictions[pos - start] = self.contextMeanTable[ctx]
return predictions
=====================================
kineticsTools/WorkerProcess.py
=====================================
@@ -124,8 +124,8 @@ class WorkerProcess(Process):
(chunkId, datum) = chunkDesc
logging.info("Got chunk: (%s, %s) -- Process: %s" %
(chunkId, str(datum), current_process()))
- result = self.onChunk(
- datum) # pylint: disable=assignment-from-none
+ result = self.onChunk( # pylint: disable=assignment-from-none
+ datum)
logging.debug("Process %s: putting result." %
current_process())
=====================================
kineticsTools/loader.py
=====================================
@@ -36,8 +36,8 @@ def getIpdModelFilename(ipdModel, majorityChem, paramsPath):
# go through each paramsPath in-order, checking if the model exists there
# or no
- for paramsPath in paramsPath:
- ipdModel = os.path.join(paramsPath, majorityChem + ".npz.gz")
+ for paramPath in paramsPath:
+ ipdModel = os.path.join(paramPath, majorityChem + ".npz.gz")
if os.path.isfile(ipdModel):
LOG.info(
"Using chemistry-matched kinetics model: {!r}".format(ipdModel))
=====================================
kineticsTools/summarizeModifications.py
=====================================
@@ -118,10 +118,10 @@ class ModificationSummary(object):
cRev = self.countModificationTypes(
[h for h in intervalHits if h['strand'] == '-'])
- rec.modsfwd = ",".join(
- [str(cFwd[x]) for x in self.knownModificationEvents]) # pylint: disable=assigning-non-slot
- rec.modsrev = ",".join(
- [str(cRev[x]) for x in self.knownModificationEvents]) # pylint: disable=assigning-non-slot
+ rec.modsfwd = ",".join( # pylint: disable=assigning-non-slot
+ [str(cFwd[x]) for x in self.knownModificationEvents])
+ rec.modsrev = ",".join( # pylint: disable=assigning-non-slot
+ [str(cRev[x]) for x in self.knownModificationEvents])
print(str(rec), file=summaryWriter)
return 0
=====================================
setup.py
=====================================
@@ -11,7 +11,7 @@ test_deps = [
setup(
name='kineticsTools',
- version='0.7.0',
+ version='0.8.0',
author='Pacific Biosciences',
author_email='devnet at pacificbiosciences.com',
license='BSD-3-Clause-Clear',
@@ -26,17 +26,14 @@ setup(
'ipdSummary = kineticsTools.ipdSummary:main',
'summarizeModifications = kineticsTools.summarizeModifications:main',
]},
- setup_requires=[
- 'pytest-runner',
- ],
install_requires=[
- 'numpy >= 1.17',
+ 'numpy >= 1.21.0',
'pbcommand >= 2.0.0',
- 'pbcore >= 2.0.0',
+ 'pbcore >= 2.2.4',
'pyBigWig',
'scipy >= 1.3',
],
tests_require=test_deps,
extras_require={'test': test_deps},
- python_requires='>=3.7',
+ python_requires='>=3.9',
)
=====================================
test/test_loader.py
=====================================
@@ -44,6 +44,10 @@ def test_path(monkeypatch):
expected = 'path1/foo.npz.gz'
assert expected == B.getIpdModelFilename(None, chem, ['path1', 'path2'])
+ # Missing path first.
+ expected = 'path1/foo.npz.gz'
+ assert expected == B.getIpdModelFilename(None, chem, ['pathmissing', 'path1', 'path2'])
+
def test_path_with_prefixed_chem(monkeypatch):
def isfile(fn):
View it on GitLab: https://salsa.debian.org/med-team/kineticstools/-/compare/fbe5134caa09a1e014ae79d4ad9152d8e40cd164...4e3919b810f535ad129be68ea002dda37147318b
--
View it on GitLab: https://salsa.debian.org/med-team/kineticstools/-/compare/fbe5134caa09a1e014ae79d4ad9152d8e40cd164...4e3919b810f535ad129be68ea002dda37147318b
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20211025/1db8956f/attachment-0001.htm>
More information about the debian-med-commit
mailing list