From 47c895191662bfb3edc1e3e842cdbdf0044f7cc9 Mon Sep 17 00:00:00 2001 From: Harrison Deng Date: Wed, 22 Jan 2025 18:43:21 +0000 Subject: [PATCH] Refactoring package name --- README.md | 20 ++++++++++---------- pyproject.toml | 6 +++--- requirements.txt | 2 +- src/{automlst => autoBIGSst}/cli/__init__.py | 0 src/{automlst => autoBIGSst}/cli/info.py | 2 +- src/{automlst => autoBIGSst}/cli/meta.py | 0 src/{automlst => autoBIGSst}/cli/program.py | 14 +++++++------- src/{automlst => autoBIGSst}/cli/st.py | 6 +++--- 8 files changed, 25 insertions(+), 25 deletions(-) rename src/{automlst => autoBIGSst}/cli/__init__.py (100%) rename src/{automlst => autoBIGSst}/cli/info.py (95%) rename src/{automlst => autoBIGSst}/cli/meta.py (100%) rename src/{automlst => autoBIGSst}/cli/program.py (69%) rename src/{automlst => autoBIGSst}/cli/st.py (90%) diff --git a/README.md b/README.md index 678e358..9ba8e0b 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ -# autoMLST.CLI +# autoBIGSst.CLI A command-line interface based program that allows quickly batched requests for obtaining MLST profiles on multiple FASTA sequences and exporting it as a convenient CSV. -This program is simply a command-line interface for [autoMLST.Engine](https://pypi.org/project/automlst.engine). +This program is simply a command-line interface for [autoBIGSst.Engine](https://pypi.org/project/autoBIGSst.engine). ## Features -This CLI is capable of exactly what [autoMLST.Engine](https://pypi.org/project/automlst.engine) is capable of: +This CLI is capable of exactly what [autoBIGSst.Engine](https://pypi.org/project/autoBIGSst.engine) is capable of: - Import multiple FASTA files - Fetch the available BIGSdb databases that is currently live and available - Fetch the available BIGSdb database schemas for a given MLST database @@ -18,22 +18,22 @@ This CLI is capable of exactly what [autoMLST.Engine](https://pypi.org/project/a This CLI can be installed with `pip`. Please ensure [pip is installed](https://pip.pypa.io/en/stable/installation/). Then: -1. Run `pip install automlst-cli` to install the latest version of the CLI for autoMLST. +1. Run `pip install autoBIGSst-cli` to install the latest version of the CLI for autoBIGSst. -2. Once installation is complete, run `automlst --version` to test that the installation succeeded (and that you are running the appropriate version). +2. Once installation is complete, run `autoBIGSst --version` to test that the installation succeeded (and that you are running the appropriate version). -3. Run `automlst -h` to get information on how to get started. +3. Run `autoBIGSst -h` to get information on how to get started. ### Example Let's say you have a fasta called `seq.fasta` which contains several sequences. You know all sequences in `seq.fasta` are Bordetella pertussis sequences, and you know you have the sequences for the necessary targets of your schema in each of them. You want to retrieve MLST profiles for all of them. This can be done by: -1. Running `automlst info -l` to list all available `seqdef` databases and find the database associated with Bordetella (you should see one called `pubmlst_bordetella_seqdef`). +1. Running `autoBIGSst info -l` to list all available `seqdef` databases and find the database associated with Bordetella (you should see one called `pubmlst_bordetella_seqdef`). -2. Then, run `automlst info -lschema pubmlst_bordetella_seqdef` to get the available typing schemas and their associated IDs. In this example, let's assume we want a normal MLST scheme. In this case, we would pay attention to the number next to `MLST` (it should be `3`). +2. Then, run `autoBIGSst info -lschema pubmlst_bordetella_seqdef` to get the available typing schemas and their associated IDs. In this example, let's assume we want a normal MLST scheme. In this case, we would pay attention to the number next to `MLST` (it should be `3`). -3. Then, run `automlst st -h` and familiarize yourself with the parameters needed for sequence typing. +3. Then, run `autoBIGSst st -h` and familiarize yourself with the parameters needed for sequence typing. -4. Namely, you should find that you will need to run `automlst st seq.fasta pubmlst_bordetella_seqdef 3 output.csv`. You can optionally include multiple `FASTA` files, and/or `--exact` to only retrieve exact sequence types, and/or `--stop-on-fail` to stop typing if one of your sequences fail to retrieve any type. +4. Namely, you should find that you will need to run `autoBIGSst st seq.fasta pubmlst_bordetella_seqdef 3 output.csv`. You can optionally include multiple `FASTA` files, and/or `--exact` to only retrieve exact sequence types, and/or `--stop-on-fail` to stop typing if one of your sequences fail to retrieve any type. 5. Sit tight, and wait. The `output.csv` will contain your results once completed. \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index f180fd3..c82779c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,18 +3,18 @@ requires = ["setuptools>=64", "setuptools_scm>=8"] build-backend = "setuptools.build_meta" [project] -name = "automlst.cli" +name = "autoBIGSst.cli" dynamic = ["version"] readme = "README.md" dependencies = [ - "automlst-engine" + "autoBIGSst-engine" ] requires-python = ">=3.11" description = "A CLI tool to rapidly fetch fetch MLST profiles given sequences for various diseases." [project.scripts] -automlst = "automlst.cli.program:run" +autoBIGSst = "autoBIGSst.cli.program:run" [tool.setuptools_scm] diff --git a/requirements.txt b/requirements.txt index 9eb3cfa..75fe05e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,4 +4,4 @@ pytest-cov build twine setuptools_scm -automlst-engine \ No newline at end of file +autoBIGSst-engine diff --git a/src/automlst/cli/__init__.py b/src/autoBIGSst/cli/__init__.py similarity index 100% rename from src/automlst/cli/__init__.py rename to src/autoBIGSst/cli/__init__.py diff --git a/src/automlst/cli/info.py b/src/autoBIGSst/cli/info.py similarity index 95% rename from src/automlst/cli/info.py rename to src/autoBIGSst/cli/info.py index 5a28540..b6b8a95 100644 --- a/src/automlst/cli/info.py +++ b/src/autoBIGSst/cli/info.py @@ -1,6 +1,6 @@ from argparse import ArgumentParser, Namespace import asyncio -from automlst.engine.data.remote.databases.bigsdb import BIGSdbIndex +from autoBIGSst.engine.data.remote.databases.bigsdb import BIGSdbIndex def setup_parser(parser: ArgumentParser): parser.description = "Fetches the latest BIGSdb MLST database definitions." diff --git a/src/automlst/cli/meta.py b/src/autoBIGSst/cli/meta.py similarity index 100% rename from src/automlst/cli/meta.py rename to src/autoBIGSst/cli/meta.py diff --git a/src/automlst/cli/program.py b/src/autoBIGSst/cli/program.py similarity index 69% rename from src/automlst/cli/program.py rename to src/autoBIGSst/cli/program.py index 5e57dca..0b4da13 100644 --- a/src/automlst/cli/program.py +++ b/src/autoBIGSst/cli/program.py @@ -3,8 +3,8 @@ from importlib import metadata from os import path import os -from automlst.cli import info, st -from automlst.cli.meta import get_module_base_name +from autoBIGSst.cli import info, st +from autoBIGSst.cli.meta import get_module_base_name import importlib root_parser = argparse.ArgumentParser(epilog='Use "%(prog)s info -h" to learn how to get available MLST databases, and their available schemas.' @@ -20,17 +20,17 @@ root_parser.add_argument( action="store_true", default=False, required=False, - help="Displays the autoMLST.CLI version, and the autoMLST.Engine version." + help="Displays the autoBIGSst.CLI version, and the autoBIGSst.Engine version." ) def run(): args = root_parser.parse_args() if args.version: - print(f'autoMLST.CLI is running version { - metadata.version("automlst-cli")}.') - print(f'autoMLST.Engine is running version { - metadata.version("automlst-engine")}.') + print(f'autoBIGSst.CLI is running version { + metadata.version("autoBIGSst-cli")}.') + print(f'autoBIGSst.Engine is running version { + metadata.version("autoBIGSst-engine")}.') if hasattr(args, "run"): args.run(args) diff --git a/src/automlst/cli/st.py b/src/autoBIGSst/cli/st.py similarity index 90% rename from src/automlst/cli/st.py rename to src/autoBIGSst/cli/st.py index 867c9f9..700e81c 100644 --- a/src/automlst/cli/st.py +++ b/src/autoBIGSst/cli/st.py @@ -2,9 +2,9 @@ from argparse import ArgumentParser, Namespace import asyncio import datetime -from automlst.engine.data.local.csv import write_mlst_profiles_as_csv -from automlst.engine.data.local.fasta import read_multiple_fastas -from automlst.engine.data.remote.databases.bigsdb import BIGSdbIndex +from autoBIGSst.engine.data.local.csv import write_mlst_profiles_as_csv +from autoBIGSst.engine.data.local.fasta import read_multiple_fastas +from autoBIGSst.engine.data.remote.databases.bigsdb import BIGSdbIndex def setup_parser(parser: ArgumentParser):