%global srcname dnaweaver %global ghname DnaWeaver Name: python-%{srcname} Version: 0.3.10 Release: 1%{?dist} Summary: Plan the cheapest route to assemble a DNA sequence from vendors License: MIT URL: https://github.com/Edinburgh-Genome-Foundry/%{ghname} # GitHub tag archive rather than the PyPI sdist: the sdist ships tests/*.py but # not tests/data/, so the cases that read the 50 kb example sequence or the # domestication scenario fail on a missing file. Source0: %{url}/archive/refs/tags/v%{version}/%{ghname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel BuildRequires: pyproject-rpm-macros # %%check BuildRequires: python3-pytest # test_optimization drives DnaChisel through OptimizeManufacturability. BuildRequires: python3-dnachisel # The scenario test plots its assembly plan. BuildRequires: python3-matplotlib %global _description %{expand: DnaWeaver takes a sequence you want built and works out how to buy it. It models a supply network -- vendors with their own price per base, length limits, lead times and forbidden patterns, plus assembly methods such as Gibson or Golden Gate -- and searches for the decomposition into orderable fragments that is cheapest, or fastest, or within a price ceiling. The output is an assembly plan with a costed bill of fragments, which it can render as a standalone HTML or PDF report showing the chosen cuts over the sequence. Note that the report needs the blastn program, which Fedora does not ship: to_assembly_plan_report() locates the final fragments by BLAST. Planning, pricing and lead-time optimisation all work without it. Install NCBI BLAST+ by hand for the rest; nothing else is missing.} %description %_description %package -n python3-%{srcname} Summary: %{summary} %description -n python3-%{srcname} %_description %prep %autosetup -p1 -n %{ghname}-%{version} %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l %{srcname} %check # Seven of upstream's eleven test files run here. The other four are skipped for # two reasons, neither of them a defect in this package. # # blastn. Fedora retired ncbi-blast+ after f30 over an FTBFS (rhbz#1606895); # the last spec in dist-git is 2.2.31 against an upstream now past 2.17, and # rawhide carries a dead.package. Nothing provides blastn today. # # Two library paths reach it. PcrExtractionStation blasts a supplied # blast_database=, which test_full_report, test_lead_time_limit, # test_max_price, test_sapi_enzyme_restriction_site and # test_domestication_from_json all pass. Less obviously, # DnaQuote.compute_fragments_final_locations blasts too, and # to_assembly_plan_report() calls it -- so every test that renders a report # needs blastn even when it never mentions BLAST. That is what excludes # test_example_with_adapters, which reads as a pure planning scenario and was # caught by building, not by reading it. # # dnacauldron. Two files import it and it is not packaged yet; it needs # fuzzywuzzy and snapgene_reader first. test_circular_sequences and, again, # test_sapi_enzyme_restriction_site. # # What runs covers the planner itself: the supply network with its price and # length constraints (test_basics), the sequence utilities (test_biotools), the # DnaChisel manufacturability path (test_optimization) and one end-to-end # scenario that builds a real multi-station assembly plan # (test_emma_homology_cassette). Report rendering is not covered here at all, # because it cannot be. %pytest -q \ tests/test_basics.py \ tests/test_biotools.py \ tests/test_optimization.py \ tests/test_scenarios/test_emma_homology_cassette %files -n python3-%{srcname} -f %{pyproject_files} %doc README.rst %changelog * Sun Sep 27 2026 Morgan Hough - 0.3.10-1 - Initial package: DnaWeaver 0.3.10. Net-new to Fedora. - Every runtime dependency was already available: numpy, Biopython, networkx, pandas, jinja2 and WeasyPrint from Fedora, proglog, flametree and dna-features-viewer from this repository. - Sourced from the GitHub tag; the sdist omits tests/data/. - Four of eleven test files are not run: three need blastn, which Fedora retired after f30 (rhbz#1606895), and two need dnacauldron, not packaged yet, with one file in both sets. See the comment in %%check. - The blast limit is wider than it first looks, so it is stated in the description and not only here. blast_sequence is not merely one biotools function: DnaQuote.compute_fragments_final_locations calls it and to_assembly_plan_report() calls that, so report rendering does not work without blastn at all. test_example_with_adapters is excluded for exactly that reason despite never mentioning BLAST. The planner, its pricing and its lead-time optimisation are unaffected.