Skip to content

Commit f11aeb0

Browse files
committed
Improve cli performance
1 parent 5399c33 commit f11aeb0

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

perke/cli/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import typer
22
from typer.main import get_command
33

4-
app = typer.Typer(name='perke')
4+
app = typer.Typer(name='perke', help='Perke\'s Command-line Interface')
55

66

77
def setup_cli() -> None:
88
"""
9-
Setup command-line interface for perke.
9+
Setups command-line interface for perke.
1010
"""
1111
# Ensure that the help messages always display the correct prompt
1212
command = get_command(app)

perke/cli/clear.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
@app.command('clear')
1010
def clear_command() -> None:
1111
"""
12-
Clears the resources directory.
12+
Clears the resources directory from downloaded files.
1313
"""
1414
clear()
1515

perke/cli/download.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def download_and_extract_asset(asset: GitReleaseAsset,
6363
"""
6464
chunk_size = 1024*1024
6565
with typer.progressbar(length=asset.size,
66-
label='Downloading resources ...') as progress:
66+
label=f'Downloading {asset.name} ...') as progress:
6767
with requests.get(url=asset.browser_download_url,
6868
stream=True) as r:
6969
with BytesIO() as io_file:

setup.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@
2929
author='Alireza Hosseini',
3030
author_email='alirezah320@yahoo.com',
3131
packages=packages,
32-
entry_points={
33-
'console_scripts': ['perke = perke.cli:setup_cli']
34-
},
32+
entry_points={'console_scripts': ['perke = perke.cli:setup_cli']},
3533
keywords=[
3634
'nlp',
3735
'natural language processing',

0 commit comments

Comments
 (0)