Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
a14b674
feat(oligos): Implement basic functions to work with oligonucleotides.
Spill-Tea Jun 25, 2025
0977f36
feat(packaging): Correct packaging to implement cython dependencies.
Spill-Tea Jun 25, 2025
90cb749
feat(docs): Update readme.
Spill-Tea Jun 25, 2025
5f5f344
feat(tox): Update tox environments to limit python versions and corre…
Spill-Tea Jun 25, 2025
bb298ff
feat(docs): Update api documentation, and implement custom code highl…
Spill-Tea Jun 25, 2025
be5870e
fix(license): add license to python files within docs folder.
Spill-Tea Jun 25, 2025
3aee328
fix(docs): Correct docstrings.
Spill-Tea Jun 25, 2025
06ec781
fix(_oligos): lint unnecessary imports.
Spill-Tea Jun 25, 2025
42c3a70
fix(src): remove previous folder or src.
Spill-Tea Jun 25, 2025
8fc48ff
feat(headers.common): Implement, extract, and cleanup common utilitie…
Spill-Tea Jun 26, 2025
676f21b
feat(_oligos): Improve stretch function, and to a minor degree, nrepe…
Spill-Tea Jun 26, 2025
057a67e
fix(pyproject): Include pxd files as part of package data for correct…
Spill-Tea Jun 26, 2025
c003deb
feat(_oligos): Drastically improve speed of palindrom function by ove…
Spill-Tea Jun 26, 2025
bc3aaf5
chore(_oligos): change variable names of palindrome function to be mo…
Spill-Tea Jun 26, 2025
d46dfc1
chore(tests): Include additional unit tests for palindrome function.
Spill-Tea Jun 26, 2025
0cf2f8d
feat(_oligos): Improve nrepeats function speed by an order of magnitude.
Spill-Tea Jun 26, 2025
cf20b28
chore(tests): Include additional unit tests for higher order n for nr…
Spill-Tea Jun 26, 2025
e39d6ba
chore(headers.oligos): Add license to file.
Spill-Tea Jun 26, 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@
# recursively re-ignore
__pycache__
*.egg-info/
docs/build
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
# PyTemplate
# DesignerDNA
[![build status][buildstatus-image]][buildstatus-url]

[buildstatus-image]: https://github.com/Spill-Tea/PyTemplate/actions/workflows/python-app.yml/badge.svg?branch=main
[buildstatus-url]: https://github.com/Spill-Tea/PyTemplate/actions?query=branch%3Amain
[buildstatus-image]: https://github.com/Spill-Tea/DesignerDNA/actions/workflows/python-app.yml/badge.svg?branch=main
[buildstatus-url]: https://github.com/Spill-Tea/DesignerDNA/actions?query=branch%3Amain

Python Project Template. Be sure to create a template directly
from github.
DesignerDNA - Design DNA sequences with intent.

<!-- omit in toc -->
## Table of Contents
- [PyTemplate](#pytemplate)
- [DesignerDNA](#designerdna)
- [Installation](#installation)
- [For Developers](#for-developers)
- [License](#license)
Expand All @@ -19,29 +18,30 @@ from github.
Clone the repository and pip install.

```bash
git clone https://github.com/Spill-Tea/PyTemplate.git
cd PyTemplate
git clone https://github.com/Spill-Tea/DesignerDNA.git
cd DesignerDNA
pip install .
```

Alternatively, you may install directly from github.
```bash
pip install git+https://github.com/Spill-Tea/PyTemplate@main
pip install git+https://github.com/Spill-Tea/DesignerDNA@main
```


## For Developers
After cloning the repository, create a new virtual environment and run the following commands:
After cloning the repository, create a new virtual environment and run the following
commands:

```bash
pip install -e ".[dev]"
pre-commit install
pre-commit run --all-files
```

Running unit tests locally is straightforward with tox. Make sure
you have all python versions available required for your project
The `p` flag is not required, but it runs tox environments in parallel.
Running unit tests locally is straightforward with tox. Make sure you have all python
versions available required for your project. The `p` flag is not required, but it runs
tox environments in parallel.
```bash
tox -p
```
Expand Down
55 changes: 47 additions & 8 deletions tests/unit/test_version.py → docs/source/_ext/styles.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,55 @@
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

"""Example unit tests."""
"""Custom Pygment styles."""

from PyTemplate import __version__
from typing import ClassVar

from pygments.style import Style
from pygments.token import (
Comment,
Error,
Keyword,
Name,
Number,
Operator,
Punctuation,
String,
_TokenType,
)

def test_version_type():
"""Test defined version is a string."""
assert isinstance(__version__, str), "Expected string format version"

class VSCodeDarkPlus(Style):
"""VSCode Dark+ Style."""

def test_version_value():
"""Test version string starts with the letter v."""
assert __version__.lower().startswith("v"), "Expected version to begin with `v`"
background_color: str = "#1E1E1E"

styles: ClassVar[dict[_TokenType, str]] = {
Number: "#B6CEA9",
Operator: "#D4D4D4",
Operator.Word: "#C586C0",
Comment: "#6D9957",
Comment.Preproc: "#639BD4",
Keyword.Namespace: "#C287A0",
# Keyword.Reserved: "#C287A0",
Keyword.Reserved: "#639BD4",
Keyword.Type: "#61C8B0",
Keyword.Constant: "#4FC1FF",
# Keyword: "#639BD4",
Keyword: "#C586C0",
Name: "#7FD0FD",
Name.Class: "#61C8B0",
Name.Namespace: "#61C8B0",
Name.Function: "#DCDCAA",
# Name.Builtin: "#DCDCAA",
Name.Builtin: "#4EC9B0",
Name.Type: "#4EC9B0",
Name.Builtin.Pseudo: "#9CDCFE",
Name.Variable: "#9CDCFE",
Name.Variable.Class: "#61C8B0",
Name.Variable.Magic: "#DCDCAA",
Name.Exception: "#61C8B0",
Error: "#61C8B0",
String: "#C9937A",
Punctuation: "#F9C922",
}
5 changes: 0 additions & 5 deletions docs/source/api.rst

This file was deleted.

21 changes: 21 additions & 0 deletions docs/source/api/designer_dna.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
designer\_dna package
=====================

Submodules
----------

designer\_dna.oligos module
---------------------------

.. automodule:: designer_dna.oligos
:members:
:show-inheritance:
:undoc-members:

Module contents
---------------

.. automodule:: designer_dna
:members:
:show-inheritance:
:undoc-members:
7 changes: 7 additions & 0 deletions docs/source/api/modules.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
designer_dna
============

.. toctree::
:maxdepth: 4

designer_dna
39 changes: 32 additions & 7 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,42 @@
# Configuration file for the Sphinx documentation builder.
# BSD 3-Clause License
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# Copyright (c) 2025, Spill-Tea
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

"""Sphinx configuration file."""

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


sys.path.insert(0, os.path.abspath("../src/"))
sys.path.append(os.path.abspath("./_ext")) # Required for custom extensions


project = "PyTemplate"
project = "DesignerDNA"
copyright = "2025, Jason C Del Rio (Spill-Tea)"
author = "Jason C Del Rio (Spill-Tea)"
release = "v0.0.1"
Expand All @@ -38,3 +62,4 @@
html_theme = "sphinx_rtd_theme"
html_static_path = ["_static"]
html_css_files = ["custom.css"]
pygments_style = "styles.VSCodeDarkPlus"
22 changes: 5 additions & 17 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,29 +1,17 @@
.. PyTemplate documentation master file, created by
sphinx-quickstart on Thu Jun 12 22:11:46 2025.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
DesignerDNA documentation
=========================

PyTemplate documentation
========================

Add your content using ``reStructuredText`` syntax. See the
`reStructuredText <https://www.sphinx-doc.org/en/master/usage/restructuredtext/index.html>`_
documentation for details.

.. automodule:: PyTemplate.__init__
:members:
:undoc-members:
:show-inheritance:
Design, fiddle, and optimize DNA sequences.

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

api
api/modules


Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
* :ref:`search`
44 changes: 27 additions & 17 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,39 +1,46 @@
[build-system]
requires = ["setuptools>=67.6.1"]
requires = ["setuptools>=67.6.1", "cython>=3.0.0"]
build-backend = "setuptools.build_meta"

[project]
name = "PyTemplate"
name = "designer_dna"
authors = [{ name = "Jason C Del Rio", email = "spillthetea917@gmail.com" }]
maintainers = [{ name = "Jason C Del Rio", email = "spillthetea917@gmail.com" }]
description = "Project description here."
license = { file = "LICENSE" }
requires-python = ">=3.7"
keywords = ["keyword1", "keyword2"]
classifiers = ["Programming Language :: Python :: 3"]
requires-python = ">=3.11"
keywords = ["DNA", "design", "ligation", "optimization"]
classifiers = [
"Programming Language :: Python :: 3",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Bio-Informatics"
]
dynamic = ["version", "readme", "dependencies"]

[project.urls]
homepage = "https://github.com/Spill-Tea/PyTemplate"
issues = "https://github.com/Spill-Tea/PyTemplate/issues"
homepage = "https://github.com/Spill-Tea/DesignerDNA"
issues = "https://github.com/Spill-Tea/DesignerDNA/issues"

[tool.setuptools.dynamic]
version = { attr = "PyTemplate.__version__" }
version = { attr = "designer_dna.__version__" }
readme = { file = ["README.md"], content-type = "text/markdown" }
dependencies = { file = ["requirements.txt"] }

[tool.setuptools]
package-dir = { "" = "src" }
package-dir = { "" = "src"}

[tool.setuptools.packages.find]
where = ["src"]
exclude = ["benchmarks", "docs", "tests"]
exclude = ["benchmarks", "build", "docs", "tests", "scripts"]

[tool.setuptools.package-data]
"*" = ["py.typed", "*.pyi"]
"designer_dna.headers" = ["*.h", "*.pxd"]

[project.optional-dependencies]
dev = ["PyTemplate[doc,test,lint,type]", "tox", "pre-commit"]
dev = ["designer_dna[doc,test,lint,type,commit]", "tox"]
commit = ["pre-commit"]
doc = ["sphinx", "sphinx-rtd-theme"]
test = ["pytest", "coverage", "pytest-xdist"]
lint = ["pylint", "ruff"]
Expand All @@ -46,7 +53,7 @@ addopts = "-n auto -rA"
[tool.coverage.run]
parallel = true
branch = true
source = ["PyTemplate"]
source = ["designer_dna"]
disable_warnings = ["no-data-collected", "module-not-imported"]

[tool.coverage.paths]
Expand All @@ -61,14 +68,14 @@ skip_empty = true
exclude_also = ["def __repr__", 'if __name__ == "__main__"']

[tool.mypy]
mypy_path = "PyTemplate"
mypy_path = "designer_dna"
warn_unused_ignores = true
allow_redefinition = false
force_uppercase_builtins = true

[tool.pylint.main]
# extension-pkg-whitelist = []
ignore = ["tests", "dist", "build"]
ignore = ["dist", "build"]
fail-under = 9.0
jobs = 0
limit-inference-results = 100
Expand All @@ -86,8 +93,10 @@ module-naming-style = "any"
[tool.pylint.format]
max-line-length = 88

# [tool.pylint."messages control"]
# disable = []
[tool.pylint."messages control"]
disable = [
"R1731" # consider-using-max-builtin
]

[tool.ruff]
line-length = 88
Expand Down Expand Up @@ -118,6 +127,7 @@ ignore = [
"D213", # multi-line-summary-second-line (D213)
"PLR0913", # too-many-arguments (PLR0913)
"C408", # unnecessary-collection-call (C408)
"PYI021", # docstring-in-stub (PYI021)
]

[tool.ruff.lint.pydocstyle]
Expand All @@ -128,7 +138,7 @@ lines-after-imports = 2

[tool.ruff.lint.per-file-ignores]
"__init__.py" = [
"E402", # Import Statement not at Top of File
"E402", # Import Statement not at top of file
"F401", # Unused Imports
]
"tests/*.py" = [
Expand Down
Loading
Loading