Skip to content

Commit 95cad8d

Browse files
Mike LeeMike Lee
authored andcommitted
modularizing bit-dl-ncbi-assemblies
1 parent f69596d commit 95cad8d

File tree

6 files changed

+24
-12
lines changed

6 files changed

+24
-12
lines changed

bit/cli/dl_ncbi_assemblies.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def main():
1313

1414
parser = argparse.ArgumentParser(
1515
description=desc,
16-
epilog="Ex. usage: `bit-dl-ncbi-assemblies -w wanted-accessions.txt -f fasta -j 4`",
16+
epilog="Ex. usage: `bit-dl-ncbi-assemblies -w wanted-accessions.txt`",
1717
formatter_class=CustomRichHelpFormatter,
1818
add_help=False
1919
)
@@ -25,7 +25,7 @@ def main():
2525
"-w",
2626
"--wanted-accessions",
2727
metavar="<FILE>",
28-
help='Input file with wanted accessions',
28+
help='Input file with wanted accessions, one per line',
2929
required=True,
3030
)
3131

bit/scripts/bit-dl-ncbi-assemblies

Lines changed: 0 additions & 6 deletions
This file was deleted.

bit/tests/conftest.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,12 @@ def pytest_sessionstart(session):
6262
print(" ================================= Progress on modularizing scripts =================================")
6363
print(" ====================================================================================================\n")
6464

65-
print(f" Total script files: {len(script_files)}\n")
65+
print(f" Base script files remaining: {len(script_files)}\n")
6666
print(f" Total helper scripts: {len(helper_scripts)}")
6767
print(f" Total bash scripts: {len(bash_scripts)}")
6868
print(f" Total python scripts: {len(python_scripts)}")
6969
print(f" Python scripts modularized: {len(modularized)}")
7070
print(f" Python scripts not yet modularized: {len(not_modularized)}\n")
71-
print(f" Percent of python modularized: {round(len(modularized) / len(python_scripts) * 100, 2)}%\n")
7271

7372
if not_modularized:
7473
print(" Files not yet modularized:\n")

dev-setup.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ if [ "${CONDA_DEFAULT_ENV}" != "bit-dev" ]; then
88
exit 1
99
fi
1010

11-
pip install -e .
11+
rm -rf build/ bit.egg-info/
12+
13+
pip install --no-build-isolation -e .
1214

1315
BIN_DIR=$(dirname $(which python))
1416

pyproject.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,16 @@ include-package-data = true
2020
bit = ["tests/data/*", "smk/*.smk", "smk/envs/*"]
2121

2222
[project.scripts]
23+
## ncbi-related ##
24+
bit-dl-ncbi-assemblies = "bit.cli.dl_ncbi_assemblies:main"
2325
get-ncbi-assembly-tables = "bit.modules.ncbi.get_ncbi_assembly_tables:main"
2426
get-ncbi-tax-data = "bit.modules.ncbi.get_ncbi_tax_data:main"
27+
28+
29+
## gtdb-related ##
30+
31+
32+
## coverage / mapping ##
33+
34+
35+
## sequence utilities ##

setup.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
from setuptools import setup
22
import glob
33

4+
# scripts ported to pyproject.toml [project.scripts] entry points
5+
# exclude them from the glob so they don't conflict
6+
ported = {
7+
"bit/scripts/bit-dl-ncbi-assemblies",
8+
}
9+
410
setup(
5-
scripts=glob.glob("bit/scripts/*")
11+
scripts=[s for s in glob.glob("bit/scripts/*") if s not in ported]
612
)

0 commit comments

Comments
 (0)