Skip to content

Commit

Permalink
2.0.1 release (libnano#124)
Browse files Browse the repository at this point in the history
* Missing space in change-log

* fix ``todict`` method of ``Thermoanalysis`` and add unit test coverage (libnano#123)

* version bump to 2.0.1 + release notes update

---------

Co-authored-by: Peter Cock <[email protected]>
  • Loading branch information
benpruitt and peterjc authored Sep 19, 2023
1 parent 83018cd commit 102ae1c
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 5 deletions.
6 changes: 5 additions & 1 deletion CHANGES
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
# Changelog

## Version 2.0.1 (September 18, 2023)

- Fixed bug in `todict` method of `ThermoAnalysis`

## Version 2.0.0 (May 30, 2023)

- Migrated primer3 header file Cython extern imports to `thermoanalysis.pxi`
- Optional C structure string argument `c_ascii_structure` added to `_ThermoAnalysis` methods to enable 3rd party use for structures
- Version bump to 2.0.0 due to breaking change
- Fix issue whereby no_structure is not correctly 1 set to 1 when no secondary structure in found
- Add list version of `PRIMER_{PAIR, LEFT, RIGHT, INTERNAL}` to design output dictionary keys.Retaining original keys as well for compatibility.
- Add list version of `PRIMER_{PAIR, LEFT, RIGHT, INTERNAL}` to design output dictionary keys. Retaining original keys as well for compatibility.
- Fix for missing `thal_result.sec_struct` and `dpal_results.sec_struct` initialization to `NULL` in `recalc_primer_sec_struct`

## Version 1.2.2 (May 16, 2023)
Expand Down
2 changes: 1 addition & 1 deletion primer3/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
from typing import List

# Per PEP-440 https://peps.python.org/pep-0440/#public-version-identifiers
__version__ = '2.0.0'
__version__ = '2.0.1'
__author__ = 'Ben Pruitt, Nick Conway'
__copyright__ = (
'Copyright 2014-2023, Ben Pruitt & Nick Conway; 2014-2018 Wyss Institute'
Expand Down
4 changes: 2 additions & 2 deletions primer3/thermoanalysis.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ cdef class _ThermoAnalysis:
representation.

'''
return self._salt_correction_method
return self._salt_correction_methods_int_dict[self._salt_correction_method]

@salt_correction_method.setter
def salt_correction_method(self, value: Union[int, str]):
Expand Down Expand Up @@ -1082,7 +1082,7 @@ cdef class _ThermoAnalysis:
'dv_conc': self.dv_conc,
'dntp_conc': self.dntp_conc,
'dna_conc': self.dna_conc,
'temp_c': self.temp,
'temp_c': self.temp_c,
'max_loop': self.max_loop,
# 'temp_only': self.temp_only,
# 'debug': self.thalargs.debug,
Expand Down
23 changes: 22 additions & 1 deletion tests/test_thermoanalysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@
except (ImportError, ModuleNotFoundError): # For Windows compatibility
resource = None # type: ignore

from primer3 import bindings
from primer3 import (
bindings,
thermoanalysis,
)

from . import wrappers

Expand Down Expand Up @@ -409,6 +412,24 @@ def test_memory_leaks(self):
f'\n\t memory leak (mem increase: {em - sm})',
)

def test_todict(self):
'''Unit test coverage for ``Thermoanalysis.todict``'''
args = {
'mv_conc': 51.0,
'dv_conc': 1.7,
'dntp_conc': 0.5,
'dna_conc': 52.0,
'temp_c': 36.0,
'max_loop': 31,
'max_nn_length': 61,
'tm_method': 'santalucia',
'salt_correction_method': 'santalucia',
}
ta = thermoanalysis.ThermoAnalysis(**args)
dict_out = ta.todict()
for k, v in args.items():
assert v == dict_out[k]


def suite():
'''Define the test suite'''
Expand Down

0 comments on commit 102ae1c

Please sign in to comment.