Skip to content

Commit e26235a

Browse files
authored
Add a console entry point. (#1102)
Closes #940.
1 parent def6616 commit e26235a

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

histomicstk/cli/__main__.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import os
2+
3+
from slicer_cli_web import ctk_cli_adjustment # noqa
4+
import slicer_cli_web.cli_list_entrypoint # noqa I001
5+
6+
7+
def main():
8+
slicer_cli_web.cli_list_entrypoint.CLIListEntrypoint(
9+
cwd=os.path.dirname(os.path.realpath(__file__)))

histomicstk/cli/utils.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,10 @@ def create_dask_client(args):
211211
empty string to start one locally
212212
213213
"""
214+
# Dask is noisy. Stop that
215+
import os
216+
os.environ.setdefault('DASK_DISTRIBUTED__LOGGING__DISTRIBUTED', 'warning')
217+
214218
import dask
215219
import psutil
216220

setup.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,5 +84,8 @@
8484
'Topic :: Software Development :: Libraries :: Python Modules',
8585
],
8686
zip_safe=False,
87+
entry_points={
88+
'console_scripts': ['histomicstk = histomicstk.cli.__main__:main'],
89+
},
8790
python_requires='>=3.8',
8891
)

0 commit comments

Comments
 (0)