Skip to content

Commit

Permalink
Add a console entry point. (#1102)
Browse files Browse the repository at this point in the history
Closes #940.
  • Loading branch information
manthey authored Feb 21, 2024
1 parent def6616 commit e26235a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
9 changes: 9 additions & 0 deletions histomicstk/cli/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import os

from slicer_cli_web import ctk_cli_adjustment # noqa
import slicer_cli_web.cli_list_entrypoint # noqa I001


def main():
slicer_cli_web.cli_list_entrypoint.CLIListEntrypoint(
cwd=os.path.dirname(os.path.realpath(__file__)))
4 changes: 4 additions & 0 deletions histomicstk/cli/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,10 @@ def create_dask_client(args):
empty string to start one locally
"""
# Dask is noisy. Stop that
import os
os.environ.setdefault('DASK_DISTRIBUTED__LOGGING__DISTRIBUTED', 'warning')

import dask
import psutil

Expand Down
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,8 @@
'Topic :: Software Development :: Libraries :: Python Modules',
],
zip_safe=False,
entry_points={
'console_scripts': ['histomicstk = histomicstk.cli.__main__:main'],
},
python_requires='>=3.8',
)

0 comments on commit e26235a

Please sign in to comment.