Skip to content

Commit

Permalink
fixed CI
Browse files Browse the repository at this point in the history
  • Loading branch information
fangfufu committed May 27, 2024
1 parent 7127e1b commit 297ac04
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 3 deletions.
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ urls.Issues = "https://github.com/fangfufu/AmplifyP/issues"
author = [
{ name = "Fufu Fang", email = "fangfufu2003@gmail.com" },
]

[tool.pytest.ini_options]
pythonpath = "src"
addopts = [
"--import-mode=importlib",
]

[project.optional-dependencies]
47 changes: 47 additions & 0 deletions src/amplifyp/amplicon.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,49 @@
# -*- coding: utf-8 -*-
"""Amplify P - amplicon related."""

from dataclasses import dataclass
from typing import List

from .dna import DNA, Primer
from .repliconf import Repliconf


@dataclass
class Amplicon:
"""
A class representing the amplicons
An amplicon is defined by the sequence that had been amplified. It starts
with the forward replication origin, it ends with the reverse replication
origin.
"""

sequence: DNA
fwd_origin: Primer
rev_origin: Primer

def __post_init__(self) -> None:
pass


class AmpliconGenerator:
"""
A class for generating the amplicons
"""

# pylint: disable=too-few-public-methods

def __init__(self, template: DNA) -> None:
"""Construct an AmpliconGenerator"""
self.template = template
self.repliconfs: List[Repliconf] = []

def add(self, repliconf: Repliconf) -> None:
"""Add a Repliconf to the AmpliconGenerator"""
if self.template != repliconf.template:
raise ValueError(
"The Repliconf contains a different template to the AmpliconGenerator."
)

if not self.repliconfs:
self.repliconfs.append(repliconf)
2 changes: 1 addition & 1 deletion src/amplifyp/repliconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __init__(
primer: Primer,
settings: Settings,
) -> None:
"""Initialize the ReplicationConfig object."""
"""Construct the ReplicationConfig object."""
self.padding_len = len(primer)

self.primer = primer
Expand Down

0 comments on commit 297ac04

Please sign in to comment.