Currently, the user has to pip install and then download the entry point scripts gui.py and cli.py (cloning not required, however).
In my opinion, downloading those scripts after pip installing already feels a little redundant.
I think the entire application should be accessible from within Python, though that's up to Prof. Styner. If users are familiar with bash and not Python, then the entry point scripts can still be provided.
Some examples:
GUI
>>> from NeuroRuler.GUI import gui
>>> gui()
>>> gui(theme="light", color="b55162") # Don't really need any keyword args, just modify gui_config.json
This would be done in a Python terminal.
CLI
from pathlib import Path
from NeuroRuler.CLI import cli
cli('image.nrrd', x=2, y=3, z=4) # Arguments currently not implemented in cli() function since it expects command-line arguments but this is trivially implementable using **kwargs
data_directory: Path = Path('data')
for path in data_directory.iterdir(): # Requires only a little knowledge of Python/pathlib but super easy to pick up
cli(path, raw=True, threshold_filter='otsu') # CLI currently doesn't output to an output directory. This is implemented for GUI only atm but would be easy to use that functionality in CLI also
This would likely be in a Python file (script).
Implementation
This would be trivial to implement. The GUI really doesn't need any keyword arguments or CLI args. The user can just modify gui_config.json. Nothing has to change here.
cli() would be changed slightly but not much. The cli.py script already accepts command-line arguments and handles them appropriately. One need only change the definition of cli() to cli(prog_path, **kwargs) and handle the variables in the same way.
Currently, the user has to
pip installand then download the entry point scripts gui.py and cli.py (cloning not required, however).In my opinion, downloading those scripts after pip installing already feels a little redundant.
I think the entire application should be accessible from within Python, though that's up to Prof. Styner. If users are familiar with bash and not Python, then the entry point scripts can still be provided.
Some examples:
GUI
This would be done in a Python terminal.
CLI
This would likely be in a Python file (script).
Implementation
This would be trivial to implement. The GUI really doesn't need any keyword arguments or CLI args. The user can just modify
gui_config.json. Nothing has to change here.cli()would be changed slightly but not much. Thecli.pyscript already accepts command-line arguments and handles them appropriately. One need only change the definition ofcli()tocli(prog_path, **kwargs)and handle the variables in the same way.