Skip to content

Commit

Permalink
Merge pull request #1178 from pysam-developers/update-release-notes
Browse files Browse the repository at this point in the history
updated release notes
  • Loading branch information
AndreasHeger committed Apr 1, 2023
2 parents d542468 + cdc4a54 commit c1869c8
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 32 deletions.
2 changes: 2 additions & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
3.6
3.11
27 changes: 18 additions & 9 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,27 @@ http://pysam.readthedocs.io/en/latest/release.html
Release notes
=============

Release 1.0.0?
==============

* python 2.7 support has been removed. The minimum python version is now 3.2 with
versions 3.6-3.11 tested.

Release 0.21.0
==============

This release wraps htslib/bcftools version 1.17 and samtools version 1.17.

* [
This release wraps htslib/samtools/bcftools version 1.17.

Pysam is now compatible with Python 3.11. We have removed python 2.x
support. Pysam is tested with python versions 3.6 to 3.11.

* [#1175] VariantHeader.new_record: set start/stop before alleles
* [#1173] Add multiple build improvements in htscodecs on multi-arch macOS
* [#1148] Ignore CIGAR-less reads in find_introns.
* [#1172] Add new `samtools cram-size` and `samtools reset` commands
* [#1169] Fix CRAM index-related crash when using the musl C standard library.
* [#1168] Add a minimal pyproject.toml for PEP517.
* [#1158] Fix type hints and add FastqProxy type hints.
* [#1147] Py3.11 compatibility, get shared object suffix from EXT_SUFFIX.
* [#1143] Add mypy symbols for samtools and bcftools.
* [#1155] Fix pysam.index() when using recent `samtools index` options.
* [#1151] Test suite py3.11 compatibility, work around failing test case.
* [#1149] MacOS universal build compatibility.
* [#1146] Fix build when CFLAGS/etc environment variables are set.

Release 0.20.0
==============
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
name = "pysam"
description = "pysam - a python module for reading, manipulating and writing genomic data sets."
license = { text = "MIT License" }
version = "0.20.0"
version = "0.21.0"
authors = [
{ name = "Andreas Heger", email = "andreas.heger@gmail.com"}
]
requires-python = ">=3.8"
requires-python = ">=3.6"

dynamic = [
"classifiers",
Expand All @@ -19,5 +19,5 @@ dependencies = [


[build-system]
requires = ["setuptools>=61.0", "wheel", "Cython>=0.29.30,<3.0"]
requires = ["setuptools>=59.0", "wheel", "Cython>=0.29.30,<3.0"]
build-backend = "setuptools.build_meta:__legacy__"
38 changes: 18 additions & 20 deletions tests/compile_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

# clean up previous compilation
import os
import unittest
import pytest
import pysam
from TestUtils import make_data_files, BAM_DATADIR, TABIX_DATADIR

Expand All @@ -24,31 +24,29 @@ def setUpModule():
except OSError:
pass

import pyximport
pyximport.install(build_in_temp=False)
import _compile_test
NO_PYXIMPORT = False
try:
import pyximport
pyximport.install(build_in_temp=False)
import _compile_test
except:
NO_PYXIMPORT = True


class BAMTest(unittest.TestCase):
@pytest.mark.skipif(NO_PYXIMPORT, reason="no pyximport")
def test_bam():

input_filename = os.path.join(BAM_DATADIR, "ex1.bam")

def testCount(self):

nread = _compile_test.testCountBAM(
pysam.Samfile(self.input_filename))
self.assertEqual(nread, 3270)
nread = _compile_test.testCountBAM(
pysam.Samfile(input_filename))
assert nread == 3270


class GTFTest(unittest.TestCase):
@pytest.mark.skipif(NO_PYXIMPORT, reason="no pyximport")
def test_gtf():

input_filename = os.path.join(TABIX_DATADIR, "example.gtf.gz")

def testCount(self):
nread = _compile_test.testCountGTF(
pysam.Tabixfile(self.input_filename))
self.assertEqual(nread, 237)


if __name__ == "__main__":
unittest.main()
nread = _compile_test.testCountGTF(
pysam.Tabixfile(input_filename))
assert nread == 237
8 changes: 8 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# content of: tox.ini , put in same dir as setup.py
[tox]
envlist = py36 py311

[testenv]
deps = pytest # install pytest in the virtualenv where commands will be executed
commands =
pytest tests

0 comments on commit c1869c8

Please sign in to comment.