diff --git a/README.md b/README.md index 02da6a88..d2423ce4 100644 --- a/README.md +++ b/README.md @@ -45,10 +45,11 @@ Once Python is installed, there are two ways you can install the scadnano Python 2. download - As a simple alternative, you can download and place the following file(s) (located in the [scadnano/](https://github.com/UC-Davis-molecular-computing/scadnano-python-package/tree/master/scadnano) subfolder) + As a simple alternative, you can download and place the following files (located in the [scadnano/](https://github.com/UC-Davis-molecular-computing/scadnano-python-package/tree/master/scadnano) subfolder) in your PYTHONPATH (e.g., in the same directory as the scripts you are running): * *required*: [scadnano.py](https://raw.githubusercontent.com/UC-Davis-molecular-computing/scadnano-python-package/master/scadnano/scadnano.py) + * *required*: [scadnano_version.py](https://raw.githubusercontent.com/UC-Davis-molecular-computing/scadnano-python-package/master/scadnano/scadnano_version.py) * *optional*: [modifications.py](https://raw.githubusercontent.com/UC-Davis-molecular-computing/scadnano-python-package/master/scadnano/modifications.py); This contains some common DNA modifications such as biotin and Cy3. * *optional*: [origami_rectangle.py](https://raw.githubusercontent.com/UC-Davis-molecular-computing/scadnano-python-package/master/scadnano/origami_rectangle.py); This can help create origami rectangles, but it is not necessary to use scadnano. diff --git a/dist/scadnano-0.7.2.tar.gz b/dist/scadnano-0.7.2.tar.gz new file mode 100644 index 00000000..ceff4bcd Binary files /dev/null and b/dist/scadnano-0.7.2.tar.gz differ diff --git a/doc/conf.py b/doc/conf.py index 7a54dc01..a2573bf1 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -16,11 +16,13 @@ import os import sys -import scadnano_version + sys.path.insert(0, os.path.abspath('../scadnano')) # print(sys.path) +import scadnano_version + # Type "make html" at the command line to generate the documentation. diff --git a/scadnano/origami_rectangle.py b/scadnano/origami_rectangle.py index d73b977d..123127a7 100644 --- a/scadnano/origami_rectangle.py +++ b/scadnano/origami_rectangle.py @@ -5,6 +5,7 @@ from dataclasses import dataclass, field +# from . import scadnano as sc import scadnano as sc from enum import Enum, auto diff --git a/scadnano/scadnano.py b/scadnano/scadnano.py index 6e8774ae..23c54083 100644 --- a/scadnano/scadnano.py +++ b/scadnano/scadnano.py @@ -57,13 +57,6 @@ import xlwt -# TODO: make explicit rules about when strands can be added and sequences assigned. -# For instance, if we add a strand to overlap one that already has a DNA sequence sequence assigned, -# should the complement be automatically assigned? - -# TODO: see if :param the_parameter: and :return: can be used with Sphinx - - def _pairwise(iterable): """s -> (s0,s1), (s1,s2), (s2, s3), ...""" a, b = itertools.tee(iterable) @@ -299,9 +292,12 @@ class Grid(str, enum.Enum): ########################################################################## # constants -import scadnano_version -current_version: str = scadnano_version.current_version -initial_version: str = scadnano_version.initial_version +# from . import scadnano_version +# import scadnano_version +# current_version: str = scadnano_version.current_version +# initial_version: str = scadnano_version.initial_version +current_version: str = "0.7.2" +initial_version: str = "0.0.1" default_idt_scale = "25nm" default_idt_purification = "STD" diff --git a/scadnano/scadnano_version.py b/scadnano/scadnano_version.py new file mode 100644 index 00000000..1ff32bb9 --- /dev/null +++ b/scadnano/scadnano_version.py @@ -0,0 +1,2 @@ +current_version = "0.7.2" +initial_version = "0.0.1" \ No newline at end of file diff --git a/scadnano_version.py b/scadnano_version.py deleted file mode 100644 index dabcfe58..00000000 --- a/scadnano_version.py +++ /dev/null @@ -1,2 +0,0 @@ -current_version = "0.7.1" -initial_version = "0.0.1" \ No newline at end of file diff --git a/setup.py b/setup.py index 5960481f..62ab050c 100644 --- a/setup.py +++ b/setup.py @@ -8,9 +8,11 @@ # not including the README.md file and not formatting it as Markdown on PyPI # https://setuptools.readthedocs.io/en/latest/setuptools.html -from setuptools import setup, find_packages +from setuptools import setup -from scadnano_version import current_version +# import scadnano.scadnano_version as sv + +# from scadnano.scadnano_version import current_version # read the contents of your README file from os import path @@ -21,10 +23,10 @@ setup(name='scadnano', packages=['scadnano'], - version=current_version, - # version='0.7.0', - download_url=f'https://github.com/UC-Davis-molecular-computing/scadnano-python-package/archive/v{current_version}.zip', - # download_url=f'https://github.com/UC-Davis-molecular-computing/scadnano-python-package/archive/v0.7.0.zip', + # version=sv.current_version, + version='0.7.2', + # download_url=f'https://github.com/UC-Davis-molecular-computing/scadnano-python-package/archive/v{sv.current_version}.zip', + download_url=f'https://github.com/UC-Davis-molecular-computing/scadnano-python-package/archive/v0.7.0.zip', license='MIT', description="Python scripting library for generating designs readable by scadnano.", author="David Doty", diff --git a/tests/scadnano_tests.py b/tests/scadnano_tests.py index 9635c454..c0e9b0f2 100644 --- a/tests/scadnano_tests.py +++ b/tests/scadnano_tests.py @@ -621,7 +621,7 @@ def test_from_json__helices_non_default_indices_mixed_with_default(self): self.design_pre_json = sc.DNADesign(helices=helices, strands=[s1, s2], grid=sc.square) json_str = self.design_pre_json.to_json() - print(json_str) + json_map = json.loads(json_str) design = sc.DNADesign._from_scadnano_json(json_map) diff --git a/tests_inputs/cadnano_v2_export/test_16_helix_origami_rectangle_no_twist.dna b/tests_inputs/cadnano_v2_export/test_16_helix_origami_rectangle_no_twist.dna index 14d195cd..b69b7247 100644 --- a/tests_inputs/cadnano_v2_export/test_16_helix_origami_rectangle_no_twist.dna +++ b/tests_inputs/cadnano_v2_export/test_16_helix_origami_rectangle_no_twist.dna @@ -1,5 +1,5 @@ { - "version": "0.7.0", + "version": "0.7.2", "grid": "square", "helices": [ {"max_offset": 448, "grid_position": [0, 0]}, diff --git a/tests_inputs/cadnano_v2_export/test_2_stape_2_helix_origami_deletions_insertions.dna b/tests_inputs/cadnano_v2_export/test_2_stape_2_helix_origami_deletions_insertions.dna index 0b32a066..e53270e5 100644 --- a/tests_inputs/cadnano_v2_export/test_2_stape_2_helix_origami_deletions_insertions.dna +++ b/tests_inputs/cadnano_v2_export/test_2_stape_2_helix_origami_deletions_insertions.dna @@ -1,5 +1,5 @@ { - "version": "0.7.0", + "version": "0.7.2", "grid": "square", "helices": [ {"grid_position": [0, 0]}, diff --git a/tests_inputs/cadnano_v2_export/test_2_stape_2_helix_origami_extremely_simple.dna b/tests_inputs/cadnano_v2_export/test_2_stape_2_helix_origami_extremely_simple.dna index d1d166ea..58b98d9e 100644 --- a/tests_inputs/cadnano_v2_export/test_2_stape_2_helix_origami_extremely_simple.dna +++ b/tests_inputs/cadnano_v2_export/test_2_stape_2_helix_origami_extremely_simple.dna @@ -1,5 +1,5 @@ { - "version": "0.7.0", + "version": "0.7.2", "grid": "square", "helices": [ {"grid_position": [0, 0]}, diff --git a/tests_inputs/cadnano_v2_export/test_2_stape_2_helix_origami_extremely_simple_2.dna b/tests_inputs/cadnano_v2_export/test_2_stape_2_helix_origami_extremely_simple_2.dna index f32359d4..a038307e 100644 --- a/tests_inputs/cadnano_v2_export/test_2_stape_2_helix_origami_extremely_simple_2.dna +++ b/tests_inputs/cadnano_v2_export/test_2_stape_2_helix_origami_extremely_simple_2.dna @@ -1,5 +1,5 @@ { - "version": "0.7.0", + "version": "0.7.2", "grid": "square", "helices": [ {"grid_position": [0, 0]}, diff --git a/tests_inputs/cadnano_v2_export/test_6_helix_origami_rectangle.dna b/tests_inputs/cadnano_v2_export/test_6_helix_origami_rectangle.dna index bb1281c4..cfbbb3bc 100644 --- a/tests_inputs/cadnano_v2_export/test_6_helix_origami_rectangle.dna +++ b/tests_inputs/cadnano_v2_export/test_6_helix_origami_rectangle.dna @@ -1,5 +1,5 @@ { - "version": "0.7.0", + "version": "0.7.2", "grid": "square", "helices": [ {"max_offset": 192, "grid_position": [0, 0]},