Updated naming (again).

This commit is contained in:
Harrison Deng 2025-01-22 21:05:19 +00:00
parent 1372141b57
commit 1773bb9dcb
17 changed files with 20 additions and 20 deletions

4
.vscode/launch.json vendored
View File

@ -6,10 +6,10 @@
"configurations": [ "configurations": [
{ {
"name": "autobigsst info -lschema pubmlst_bordetella_seqdef", "name": "autobigs info -lschema pubmlst_bordetella_seqdef",
"type": "debugpy", "type": "debugpy",
"request": "launch", "request": "launch",
"program": "${workspaceFolder}/src/autobigsst/cli/program.py", "program": "${workspaceFolder}/src/autobigs/cli/program.py",
"console": "integratedTerminal", "console": "integratedTerminal",
"args": [ "args": [
"info", "info",

View File

@ -1,4 +1,4 @@
# autobigsst.Engine # autoBIGS.Engine
A python library implementing common BIGSdb MLST schemes and databases. Implementation follows the RESTful API outlined by the official [BIGSdb documentation](https://bigsdb.readthedocs.io/en/latest/rest.html) up to `V1.50.0`. A python library implementing common BIGSdb MLST schemes and databases. Implementation follows the RESTful API outlined by the official [BIGSdb documentation](https://bigsdb.readthedocs.io/en/latest/rest.html) up to `V1.50.0`.
@ -18,8 +18,8 @@ Furthermore, this library is highly asynchronous where any potentially blocking
This library can be installed through pip. Learn how to [setup and install pip first](https://pip.pypa.io/en/stable/installation/). This library can be installed through pip. Learn how to [setup and install pip first](https://pip.pypa.io/en/stable/installation/).
Then, it's as easy as running `pip install autobigsst-engine` in any terminal that has pip in it's path (any terminal where `pip --version` returns a valid version and install path). Then, it's as easy as running `pip install autobigs-engine` in any terminal that has pip in it's path (any terminal where `pip --version` returns a valid version and install path).
### CLI usage ### CLI usage
This is a independent python library and thus does not have any form of direct user interface. One way of using it could be to create your own Python script that makes calls to this libraries functions. Alternatively, you may use `autobigsst-cli`, a `Python` package that implements a CLI for calling this library. This is a independent python library and thus does not have any form of direct user interface. One way of using it could be to create your own Python script that makes calls to this libraries functions. Alternatively, you may use `autobigs-cli`, a `Python` package that implements a CLI for calling this library.

View File

@ -3,7 +3,7 @@ requires = ["setuptools>=64", "setuptools_scm>=8"]
build-backend = "setuptools.build_meta" build-backend = "setuptools.build_meta"
[project] [project]
name = "autobigsst.engine" name = "autoBIGS.engine"
dynamic = ["version"] dynamic = ["version"]
readme = "README.md" readme = "README.md"
@ -15,8 +15,8 @@ requires-python = ">=3.11"
description = "A library to rapidly fetch fetch MLST profiles given sequences for various diseases." description = "A library to rapidly fetch fetch MLST profiles given sequences for various diseases."
[project.urls] [project.urls]
Repository = "https://github.com/RealYHD/autobigsst.engine.git" Repository = "https://github.com/RealYHD/autobigs.engine.git"
Issues = "https://github.com/RealYHD/autobigsst.engine/issues" Issues = "https://github.com/RealYHD/autobigs.engine/issues"
[tool.setuptools_scm] [tool.setuptools_scm]

View File

@ -2,7 +2,7 @@ import csv
from os import PathLike from os import PathLike
from typing import AsyncIterable, Mapping, Sequence, Union from typing import AsyncIterable, Mapping, Sequence, Union
from autobigsst.engine.data.structures.mlst import Allele, MLSTProfile from autobigs.engine.data.structures.mlst import Allele, MLSTProfile
def dict_loci_alleles_variants_from_loci(alleles_map: Mapping[str, Sequence[Allele]]): def dict_loci_alleles_variants_from_loci(alleles_map: Mapping[str, Sequence[Allele]]):

View File

@ -3,7 +3,7 @@ from io import TextIOWrapper
from typing import Any, AsyncGenerator, Generator, Iterable, Sequence, Union from typing import Any, AsyncGenerator, Generator, Iterable, Sequence, Union
from Bio import SeqIO from Bio import SeqIO
from autobigsst.engine.data.structures.genomics import NamedString from autobigs.engine.data.structures.genomics import NamedString
async def read_fasta(handle: Union[str, TextIOWrapper]) -> AsyncGenerator[NamedString, Any]: async def read_fasta(handle: Union[str, TextIOWrapper]) -> AsyncGenerator[NamedString, Any]:
fasta_sequences = asyncio.to_thread(SeqIO.parse, handle=handle, format="fasta") fasta_sequences = asyncio.to_thread(SeqIO.parse, handle=handle, format="fasta")

View File

@ -5,9 +5,9 @@ from typing import Any, AsyncGenerator, AsyncIterable, Collection, Generator, It
from aiohttp import ClientSession, ClientTimeout from aiohttp import ClientSession, ClientTimeout
from autobigsst.engine.data.structures.genomics import NamedString from autobigs.engine.data.structures.genomics import NamedString
from autobigsst.engine.data.structures.mlst import Allele, PartialAllelicMatchProfile, MLSTProfile from autobigs.engine.data.structures.mlst import Allele, PartialAllelicMatchProfile, MLSTProfile
from autobigsst.engine.exceptions.database import NoBIGSdbExactMatchesException, NoBIGSdbMatchesException, NoSuchBIGSdbDatabaseException from autobigs.engine.exceptions.database import NoBIGSdbExactMatchesException, NoBIGSdbMatchesException, NoSuchBIGSdbDatabaseException
class BIGSdbMLSTProfiler(AbstractAsyncContextManager): class BIGSdbMLSTProfiler(AbstractAsyncContextManager):

View File

@ -1,5 +1,5 @@
from autobigsst.engine.data.local.csv import dict_loci_alleles_variants_from_loci from autobigs.engine.data.local.csv import dict_loci_alleles_variants_from_loci
from autobigsst.engine.data.structures.mlst import Allele from autobigs.engine.data.structures.mlst import Allele
def test_dict_loci_alleles_variants_from_loci_single_loci_not_list(): def test_dict_loci_alleles_variants_from_loci_single_loci_not_list():

View File

@ -1,4 +1,4 @@
from autobigsst.engine.data.local.fasta import read_fasta from autobigs.engine.data.local.fasta import read_fasta
async def test_fasta_reader_not_none(): async def test_fasta_reader_not_none():

View File

@ -3,10 +3,10 @@ import re
from typing import Collection, Sequence, Union from typing import Collection, Sequence, Union
from Bio import SeqIO from Bio import SeqIO
import pytest import pytest
from autobigsst.engine.data.structures.genomics import NamedString from autobigs.engine.data.structures.genomics import NamedString
from autobigsst.engine.data.structures.mlst import Allele, MLSTProfile from autobigs.engine.data.structures.mlst import Allele, MLSTProfile
from autobigsst.engine.exceptions.database import NoBIGSdbExactMatchesException, NoBIGSdbMatchesException from autobigs.engine.exceptions.database import NoBIGSdbExactMatchesException, NoBIGSdbMatchesException
from autobigsst.engine.data.remote.databases.bigsdb import BIGSdbIndex, BIGSdbMLSTProfiler from autobigs.engine.data.remote.databases.bigsdb import BIGSdbIndex, BIGSdbMLSTProfiler
def gene_scrambler(gene: str, mutation_site_count: Union[int, float], alphabet: Sequence[str] = ["A", "T", "C", "G"]): def gene_scrambler(gene: str, mutation_site_count: Union[int, float], alphabet: Sequence[str] = ["A", "T", "C", "G"]):
rand = random.Random(gene) rand = random.Random(gene)