[med-svn] [Git][med-team/python-py2bit][upstream] New upstream version 0.3.2
Étienne Mollier (@emollier)
gitlab at salsa.debian.org
Mon Nov 18 18:52:38 GMT 2024
Étienne Mollier pushed to branch upstream at Debian Med / python-py2bit
Commits:
2d49dd5d by Étienne Mollier at 2024-11-18T19:50:17+01:00
New upstream version 0.3.2
- - - - -
7 changed files:
- azure-pipelines.yml
- lib2bit/2bit.c
- py2bit.c
- py2bit.h
- py2bitTest/test.py
- setup.cfg
- setup.py
Changes:
=====================================
azure-pipelines.yml
=====================================
@@ -8,16 +8,14 @@ jobs:
vmImage: 'ubuntu-latest'
strategy:
matrix:
- Python36:
- python.version: '3.6'
- Python37:
- python.version: '3.7'
Python38:
python.version: '3.8'
Python39:
python.version: '3.9'
Python310:
python.version: '3.10'
+ Python311:
+ python.version: '3.11'
maxParallel: 5
steps:
=====================================
lib2bit/2bit.c
=====================================
@@ -69,7 +69,7 @@ void bytes2bases(char *seq, uint8_t *byte, uint32_t sz, int offset) {
// Deal with the first partial byte
if(offset != 0) {
- while(offset < 4) {
+ while(offset < 4 && pos < sz) {
seq[pos++] = byte2base(foo, offset++);
}
if(pos >= sz) return;
=====================================
py2bit.c
=====================================
@@ -32,9 +32,9 @@ error:
}
PyObject *py2bitEnter(pyTwoBit_t *self, PyObject *args) {
- pyTwoBit_t *pytb = self->tb;
+ TwoBit *tb = self->tb;
- if(!pytb) {
+ if(!tb) {
PyErr_SetString(PyExc_RuntimeError, "The 2bit file handle is not open!");
return NULL;
}
=====================================
py2bit.h
=====================================
@@ -1,7 +1,7 @@
#include <Python.h>
#include "2bit.h"
-#define pyTwoBitVersion "0.3.1"
+#define pyTwoBitVersion "0.3.2"
typedef struct {
PyObject_HEAD
=====================================
py2bitTest/test.py
=====================================
@@ -42,6 +42,8 @@ class Test():
assert(tb.bases("chr1") == {'A': 0.08, 'C': 0.08, 'T': 0.08666666666666667, 'G': 0.08666666666666667})
assert(tb.bases("chr1", 24, 74) == {'A': 0.12, 'C': 0.12, 'T': 0.12, 'G': 0.12})
assert(tb.bases("chr1", 24, 74, False) == {'A': 6, 'C': 6, 'T': 6, 'G': 6})
+ assert(tb.bases("chr2", 10, 20) == {'A': 0.2, 'C': 0.2, 'T': 0.3, 'G': 0.3})
+ assert(tb.bases("chr2", 10, 20, False) == {'A': 2, 'C': 2, 'T': 3, 'G': 3})
tb.close()
def testHardMaskedBlocks(self):
=====================================
setup.cfg
=====================================
@@ -1,2 +1,2 @@
[metadata]
-description-file = README.md
+description_file = README.md
=====================================
setup.py
=====================================
@@ -17,7 +17,7 @@ module1 = Extension('py2bit',
include_dirs = ['lib2bit', sysconfig.get_config_var("INCLUDEPY")])
setup(name = 'py2bit',
- version = '0.3.1',
+ version = '0.3.2',
description = 'A package for accessing 2bit files using lib2bit',
author = "Devon P. Ryan",
author_email = "dpryan79 at gmail.com",
View it on GitLab: https://salsa.debian.org/med-team/python-py2bit/-/commit/2d49dd5dad00bdd10372abacd2550980d25cc6be
--
View it on GitLab: https://salsa.debian.org/med-team/python-py2bit/-/commit/2d49dd5dad00bdd10372abacd2550980d25cc6be
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/20241118/03bcb8a3/attachment-0001.htm>
More information about the debian-med-commit
mailing list