Skip to content

Commit

Permalink
Merge pull request #74 from LondonBiofoundry/#73_basic_linker_feature
Browse files Browse the repository at this point in the history
changes 'temp_id' to name of linker and adds a test with black format
  • Loading branch information
hainesm6 committed Jan 16, 2021
2 parents 3e40e55 + e159df5 commit 1189496
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 11 deletions.
2 changes: 1 addition & 1 deletion basicsynbio/parts_linkers/basic_linkers.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def _make_linker(
object of type linker_class specified in Args.
"""
seq = Seq("GG" + str_seq)
linker = linker_class(seq, id="temp_id", name=name, description=description)
linker = linker_class(seq, id=name, name=name, description=description)
linker.id = seqrecord_hexdigest(linker)
return linker

Expand Down
5 changes: 5 additions & 0 deletions docsource/source/literal_includes/make_literals.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,26 +41,31 @@ def export_json(build):
with open("build.json", "w") as json_file:
json.dump(build, json_file, cls=bsb.BuildEncoder, indent=4, ensure_ascii=False)


def export_BASIC_BIOLEGIO_LINKERS():
sys.stdout = open("BASIC_BIOLEGIO_LINKERS.txt", "w")
print(bsb.BASIC_BIOLEGIO_LINKERS["v0.1"])
sys.stdout.close()


def export_BASIC_CDS_PARTS():
sys.stdout = open("BASIC_CDS_PARTS.txt", "w")
print(bsb.BASIC_CDS_PARTS["v0.1"])
sys.stdout.close()


def export_BASIC_PROMOTER_PARTS():
sys.stdout = open("BASIC_PROMOTER_PARTS.txt", "w")
print(bsb.BASIC_PROMOTER_PARTS["v0.1"])
sys.stdout.close()


def export_BASIC_SEVA_PARTS():
sys.stdout = open("BASIC_SEVA_PARTS.txt", "w")
print(bsb.BASIC_SEVA_PARTS["v0.1"])
sys.stdout.close()


if __name__ == "__main__":
export_json(build_json())
export_BASIC_BIOLEGIO_LINKERS()
Expand Down
18 changes: 8 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,22 @@
description="An open-source Python package to facilitate BASIC DNA Assembly workflows",
long_description=long_description,
long_description_content_type="text/markdown",
packages=setuptools.find_packages(exclude=("tests")), # package_data not correctly migrated if "where" arg used.
packages=setuptools.find_packages(
exclude=("tests")
), # package_data not correctly migrated if "where" arg used.
include_package_data=True,
classifiers=[
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.7",
"Topic :: Scientific/Engineering :: Bio-Informatics"
"Topic :: Scientific/Engineering :: Bio-Informatics",
],
python_requires=">=3.7",
install_requires=[
"biopython>=1.78",
"python-Levenshtein",
"sbol2"
],
install_requires=["biopython>=1.78", "python-Levenshtein", "sbol2"],
project_urls={
"Documentation": "https://londonbiofoundry.github.io/basicsynbio/index.html",
"Source": "https://github.com/LondonBiofoundry/basicsynbio"
}
"Source": "https://github.com/LondonBiofoundry/basicsynbio",
},
)
5 changes: 5 additions & 0 deletions tests/test_basicsynbio.py
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,11 @@ def test_warning_raise_basic_slice_90_150():
)


def test_basic_linker_label():
mylinker = bsb.BASIC_BIOLEGIO_LINKERS["v0.1"]["LMP"]
assert "LMP" in mylinker.features[0].qualifiers["label"]


@pytest.mark.slow
def test_import_sbol_part():
from basicsynbio.cam import seqrecord_hexdigest
Expand Down

0 comments on commit 1189496

Please sign in to comment.