[med-svn] [Git][med-team/pybigwig][master] 5 commits: Remove python2 tests since it was removed (Closes: #930762)

Diane Trout gitlab at salsa.debian.org
Thu Sep 5 05:28:38 BST 2019



Diane Trout pushed to branch master at Debian Med / pybigwig


Commits:
a79e30ce by Diane Trout at 2019-09-05T04:23:46Z
Remove python2 tests since it was removed (Closes: #930762)

- - - - -
4b02bb20 by Diane Trout at 2019-09-05T04:23:50Z
Remove commented out Python2 package block

- - - - -
b0527a23 by Diane Trout at 2019-09-05T04:25:21Z
New upstream version 0.3.17
- - - - -
be779e37 by Diane Trout at 2019-09-05T04:25:21Z
Update upstream source from tag 'upstream/0.3.17'

Update to upstream version '0.3.17'
with Debian dir e0802d0735ae9e87fc37188cba219f1108b46d6a
- - - - -
dabdb0a0 by Diane Trout at 2019-09-05T04:26:35Z
Release to unstable

- - - - -


7 changed files:

- README.md
- debian/changelog
- debian/control
- debian/tests/control
- pyBigWig.c
- pyBigWig.h
- setup.py


Changes:

=====================================
README.md
=====================================
@@ -144,9 +144,6 @@ For the sake of consistency with other tools, pyBigWig adopts this same methodol
     0.22213841940688142
     >>> bw.stats('chr1', 89294, 91629, exact=True)
     [0.22213841940688142]
-Additionally, `values()` can directly output a numpy vector:
-
-    >>> bw = bw.open("
 
 ## Retrieve values for individual bases in a range
 
@@ -218,6 +215,8 @@ By default, up to 10 "zoom levels" are constructed for bigWig files. You can cha
 
     >>> bw.addHeader([("chr1", 1000000), ("chr2", 1500000)], maxZooms=0)
 
+If you set `maxTooms=0`, please note that IGV and many other tools WILL NOT WORK as they assume that at least one zoom level will be present. You are advised to use the default unless you do not expect the bigWig files to be used by other packages.
+
 ## Adding entries to a bigWig file
 
 Assuming you've opened a file for writing and added a header, you can then add entries. Note that the entries **must** be added in order, as bigWig files always contain ordered intervals. There are three formats that bigWig files can use internally to store entries. The most commonly observed format is identical to a [bedGraph](https://genome.ucsc.edu/goldenpath/help/bedgraph.html) file:


=====================================
debian/changelog
=====================================
@@ -1,3 +1,15 @@
+pybigwig (0.3.17-1) UNRELEASED; urgency=medium
+
+  [ Steffen Möller ]
+  * Adjusted maintainer for team maintenance
+
+  [ Diane Trout ]
+  * Remove python2 tests since it was removed (Closes: #930762)
+  * Remove commented out Python2 package block
+  * New upstream version 0.3.17
+
+ -- Diane Trout <diane at ghic.org>  Wed, 04 Sep 2019 21:26:01 -0700
+
 pybigwig (0.3.16+dfsg-1) unstable; urgency=medium
 
   * Team upload.


=====================================
debian/control
=====================================
@@ -21,15 +21,6 @@ Vcs-Browser: https://salsa.debian.org/med-team/pybigwig
 Section: science
 Homepage: https://github.com/dpryan79/pyBigWig
 
-#Package: python-pybigwig
-#Architecture: any
-#Depends: ${misc:Depends}, ${python:Depends}, ${shlibs:Depends}
-#Description: Python 2 module for quick access to bigBed and bigWig files
-# This is a Python extension, written in C, for quick access to bigBed files,
-# and access to and creation of bigWig files.
-# .
-# This contains the Python 2 version
-
 Package: python3-pybigwig
 Architecture: any
 Depends: ${misc:Depends}, ${python3:Depends}, ${shlibs:Depends}


=====================================
debian/tests/control
=====================================
@@ -1,11 +1,3 @@
-Test-Command: set -e
- ; for py in $(pyversions -r 2>/dev/null)
- ; do cd pyBigWigTest
- ; $py test.py
- ; cd ..
- ; done
-Depends: python-pybigwig, python-all
-
 Test-Command: set -e
  ; for py in $(py3versions -r 2>/dev/null)
  ; do cd pyBigWigTest


=====================================
pyBigWig.c
=====================================
@@ -276,6 +276,10 @@ static PyObject *pyBwGetHeader(pyBigWigFile_t *self, PyObject *args) {
         PyErr_SetString(PyExc_RuntimeError, "The bigWig file handle is not opened!");
         return NULL;
     }
+    if(bw->isWrite == 1) {
+        PyErr_SetString(PyExc_RuntimeError, "The header cannot be accessed in files opened for writing!");
+        return NULL;
+    }
 
     ret = PyDict_New();
     val = PyLong_FromUnsignedLong(bw->hdr->version);
@@ -321,6 +325,11 @@ static PyObject *pyBwGetChroms(pyBigWigFile_t *self, PyObject *args) {
         return NULL;
     }
 
+    if(bw->isWrite == 1) {
+        PyErr_SetString(PyExc_RuntimeError, "Chromosomes cannot be accessed in files opened for writing!");
+        return NULL;
+    }
+
     if(!(PyArg_ParseTuple(args, "|s", &chrom)) || !chrom) {
         ret = PyDict_New();
         for(i=0; i<bw->cl->nKeys; i++) {
@@ -380,6 +389,11 @@ static PyObject *pyBwGetStats(pyBigWigFile_t *self, PyObject *args, PyObject *kw
         return NULL;
     }
 
+    if(bw->isWrite == 1) {
+        PyErr_SetString(PyExc_RuntimeError, "Statistics cannot be accessed in files opened for writing!");
+        return NULL;
+    }
+
     if(bw->type == 1) {
         PyErr_SetString(PyExc_RuntimeError, "bigBed files have no statistics!");
         return NULL;
@@ -621,6 +635,11 @@ static PyObject *pyBwGetIntervals(pyBigWigFile_t *self, PyObject *args, PyObject
         return NULL;
     }
 
+    if(bw->isWrite == 1) {
+        PyErr_SetString(PyExc_RuntimeError, "Intervals cannot be accessed in files opened for writing!");
+        return NULL;
+    }
+
     if(bw->type == 1) {
         PyErr_SetString(PyExc_RuntimeError, "bigBed files have no intervals! Use 'entries()' instead.");
         return NULL;
@@ -724,7 +743,7 @@ int PyString_Check(PyObject *obj) {
 
 //I don't know what happens if PyBytes_AsString(NULL) is used...
 char *PyString_AsString(PyObject *obj) {
-    return PyBytes_AsString(PyUnicode_AsASCIIString(obj));
+    return PyUnicode_AsUTF8(obj);
 }
 #endif
 


=====================================
pyBigWig.h
=====================================
@@ -2,7 +2,7 @@
 #include <structmember.h>
 #include "bigWig.h"
 
-#define pyBigWigVersion "0.3.16"
+#define pyBigWigVersion "0.3.17"
 
 typedef struct {
     PyObject_HEAD


=====================================
setup.py
=====================================
@@ -62,7 +62,7 @@ module1 = Extension('pyBigWig',
                     include_dirs = include_dirs)
 
 setup(name = 'pyBigWig',
-       version = '0.3.16',
+       version = '0.3.17',
        description = 'A package for accessing bigWig files using libBigWig',
        author = "Devon P. Ryan",
        author_email = "ryan at ie-freiburg.mpg.de",



View it on GitLab: https://salsa.debian.org/med-team/pybigwig/compare/d691d1f0220791995593532c2ec4a3bd1a99dcf7...dabdb0a027ac5a975ad308d37604ff2817377bb7

-- 
View it on GitLab: https://salsa.debian.org/med-team/pybigwig/compare/d691d1f0220791995593532c2ec4a3bd1a99dcf7...dabdb0a027ac5a975ad308d37604ff2817377bb7
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/20190905/f96cab06/attachment-0001.html>


More information about the debian-med-commit mailing list