Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
6884a70
removing tyto and doc
Gonza10V Mar 27, 2025
8097e8e
added tests for helper functions
doublergreer Mar 29, 2025
0d67fc3
added tests for part digestion(checking annos and interactions)
doublergreer Apr 1, 2025
2a68f8d
remove prints
doublergreer Apr 1, 2025
08ffdc7
added test for backbone digestion
doublergreer Apr 2, 2025
21b3647
corrected URI
doublergreer Apr 2, 2025
b88a833
added annotation, validation, and role tests for ligation
doublergreer Apr 3, 2025
914aa76
fixed doc references
doublergreer Apr 3, 2025
221c764
Merge pull request #7 from MyersResearchGroup/main
Gonza10V Apr 3, 2025
1084062
implemented golden gate assembly class + helper func
doublergreer Apr 4, 2025
0684503
gg assembly test draft
doublergreer Apr 4, 2025
b6441e0
fixed ligation scar naming error
doublergreer Apr 8, 2025
5668e00
test for append_extracts_to_doc
doublergreer Apr 8, 2025
4cdaa31
Update python-package.yml
doublergreer Apr 9, 2025
19130d0
Create requirements.txt
doublergreer Apr 9, 2025
1d02f34
modified test file directory to work when running from main dir
doublergreer Apr 9, 2025
06abf18
changed to test with unittest
doublergreer Apr 9, 2025
906c10f
adding pypi api secret
doublergreer Apr 9, 2025
a011445
Update python-publish.yml
doublergreer Apr 9, 2025
79ea82b
updating string description
doublergreer Apr 14, 2025
e3abd40
added readthedocs yaml
doublergreer Apr 14, 2025
ea567da
Update .readthedocs.yaml
doublergreer Apr 14, 2025
bf63c74
sphinx files
doublergreer Apr 14, 2025
57b976f
updated docs
doublergreer Apr 14, 2025
b10df15
dependencies
doublergreer Apr 14, 2025
240fd92
wrong requirements.txt
doublergreer Apr 14, 2025
6679300
separated package and docs dependencies
doublergreer Apr 14, 2025
17f19ed
pip install package in src/ on rtd build
doublergreer Apr 14, 2025
199bdd7
updating documentation homepage & docstrings
doublergreer Apr 15, 2025
2f35a5a
removed differentiation numbers from function names
doublergreer Apr 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
jobs:
build:

runs-on: [ubuntu-latest, macos-latest, windows-2019]
runs-on: [ubuntu-latest]
strategy:
fail-fast: false
matrix:
Expand All @@ -36,6 +36,6 @@ jobs:
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
- name: Test with unittest
run: |
pytest
python -m unittest discover -s tests
8 changes: 2 additions & 6 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,7 @@ jobs:
# For more information, see: https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#deployment-protection-rules
environment:
name: pypi
# OPTIONAL: uncomment and update to include your PyPI project URL in the deployment status:
# url: https://pypi.org/p/YOURPROJECT
#
# ALTERNATIVE: if your GitHub Release name is the PyPI project version string
# ALTERNATIVE: exactly, uncomment the following line instead:
# url: https://pypi.org/project/YOURPROJECT/${{ github.event.release.name }}
url: https://pypi.org/p/sbol2build/

steps:
- name: Retrieve release distributions
Expand All @@ -67,4 +62,5 @@ jobs:
- name: Publish release distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
packages-dir: dist/
25 changes: 25 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version, and other tools you might need
build:
os: ubuntu-24.04
tools:
python: "3.13"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

# Optionally, but recommended,
# declare the Python requirements required to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- method: pip
path: .
- requirements: docs/requirements.txt

14 changes: 7 additions & 7 deletions SBOL2Build.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,7 @@
},
{
"cell_type": "code",
"execution_count": 117,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -973,7 +973,7 @@
],
"source": [
"pro_in_bb_doc = sbol2.Document()\n",
"pro_in_bb_doc.read('Test/pro_in_bb.xml')\n",
"pro_in_bb_doc.read('tests/test_files/test_files/pro_in_bb.xml')\n",
"md = pro_in_bb_doc.getModuleDefinition(\"https://sbolcanvas.org/module1\")\n",
"assembly_plan = sbol2.ModuleDefinition('insert_assembly_plan')\n",
"\n",
Expand Down Expand Up @@ -1188,7 +1188,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -1223,7 +1223,7 @@
],
"source": [
"bb_doc = sbol2.Document()\n",
"bb_doc.read('Test/backbone.xml')\n",
"bb_doc.read('tests/test_files/backbone.xml')\n",
"\n",
"md = bb_doc.getModuleDefinition(\"https://sbolcanvas.org/module1\")\n",
"assembly_plan = sbol2.ModuleDefinition('bb_assembly_plan')\n",
Expand Down Expand Up @@ -1600,7 +1600,7 @@
},
{
"cell_type": "code",
"execution_count": 44,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -1660,7 +1660,7 @@
"temp_doc = sbol2.Document()\n",
"reactants_list = []\n",
"assembly_plan = sbol2.ModuleDefinition('assembly_plan')\n",
"parts = ['Test/pro_in_bb.xml','Test/rbs_in_bb.xml', 'Test/cds_in_bb.xml', 'Test/terminator_in_bb.xml']\n",
"parts = ['tests/test_files/pro_in_bb.xml','tests/test_files/rbs_in_bb.xml', 'tests/test_files/cds_in_bb.xml', 'tests/test_files/terminator_in_bb.xml']\n",
"\n",
"for i, part in enumerate(parts):\n",
" temp_doc.read(part)\n",
Expand All @@ -1676,7 +1676,7 @@
"\n",
" reactants_list.append(extracts_tuple_list[0][0])\n",
"\n",
"temp_doc.read('Test/backbone.xml')\n",
"temp_doc.read('tests/test_files/backbone.xml')\n",
"# run digestion, extract component + sequence, add to ligation_doc, reactants_list\n",
"md = temp_doc.getModuleDefinition('https://sbolcanvas.org/module1')\n",
"extracts_tuple_list, assembly_plan = backbone_digestion(md, [bsai], assembly_plan, temp_doc)\n",
Expand Down
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
32 changes: 32 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import os
import sys
sys.path.insert(0, os.path.abspath('../src')) #adjust file path

# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = 'SBOL2Build'
copyright = '2025, Ryan Greer'
author = 'Ryan Greer'
release = '0.0b1'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = [ "sphinx.ext.autodoc", "sphinx.ext.viewcode"]

templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']



# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = 'furo'
html_static_path = ['_static']
25 changes: 25 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
.. SBOL2Build documentation master file, created by
sphinx-quickstart on Mon Apr 14 14:04:32 2025.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.

Welcome to SBOL2Build's documentation!
======================================

SBOL2Build is a Python library for assisting in the planning, documentation, and distribution of DNA assembly plans using the Synthetic Biology Open Language 2.3 data standard.

It was developed to support build functionality and workflows in `SynBioSuite <https://synbiosuite.org/>`_, based off the `SBOL Best Practices <https://github.com/SynBioDex/SBOL-examples/tree/main/SBOL/best-practices/BP011/>`_.


.. toctree::
:maxdepth: 2
:caption: Contents:

API Reference
=============

.. automodule:: sbol2build.sbol2build
:members:
:undoc-members:
:show-inheritance:

35 changes: 35 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)

if "%1" == "" goto help

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
2 changes: 2 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
sphinx
furo
8 changes: 4 additions & 4 deletions notebooks/test_notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"pro = s2b.dna_componentdefinition_with_sequence2('promoter', 'acgt')"
"pro = s2b.dna_componentdefinition_with_sequence('promoter', 'acgt')"
]
},
{
Expand Down Expand Up @@ -98,7 +98,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "GLLDB",
"display_name": "base",
"language": "python",
"name": "python3"
},
Expand All @@ -112,7 +112,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.19"
"version": "3.12.7"
}
},
"nbformat": 4,
Expand Down
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
sbol2
biopython
pydna
Loading
Loading