diff --git a/README.md b/README.md index 56d231de1e2033a686b83eb1bcb0252695ab0b6c..b2d8dd6bd47499a3e40344e9ea71c1484556adf8 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,11 @@ app = qim3d.gui.iso3d.Interface() app.launch() ``` +GUIs can also be launched using the Qim3D CLI: +``` +$ qim3d gui --data-explorer +``` + # Contributing Contributions to `qim3d` are welcome! If you find a bug, have a feature request, or would like to contribute code, please open an issue or submit a pull request. diff --git a/qim3d/gui/data_explorer.py b/qim3d/gui/data_explorer.py index 1be62208c2d8007872ed2e1b961b3474da956020..522fb7075b7f60f65abca1ee0c9a5c7d0f108eb3 100644 --- a/qim3d/gui/data_explorer.py +++ b/qim3d/gui/data_explorer.py @@ -43,12 +43,12 @@ class Interface: # In case we have a directory if os.path.isdir(new_path): - return gr.update(root=new_path, label=new_path) + return gr.update(root_dir=new_path, label=new_path) elif os.path.isfile(new_path): parent_dir = os.path.dirname(new_path) file_name = str(os.path.basename(new_path)) - return gr.update(root=parent_dir, label=parent_dir, value=file_name) + return gr.update(root_dir=parent_dir, label=parent_dir, value=file_name) else: raise ValueError("Invalid path") @@ -102,7 +102,7 @@ class Interface: ) explorer = gr.FileExplorer( glob="{*/,}{*.*}", - root=os.getcwd(), + root_dir=os.getcwd(), label=os.getcwd(), render=True, file_count="single", diff --git a/requirements.txt b/requirements.txt index daffb1ca4dd6d51ca3b5f9c882e2790708e5b374..ddc88c9b7b8a4ea264cb476ce09b7bd3fa5f99c2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,18 +1,19 @@ -albumentations>=1.3.1 -gradio>=3.44.3 -h5py>=3.9.0 -localthickness>=0.1.2 -matplotlib>=3.7.1 -monai>=1.2.0 -numpy>=1.25.2 -outputformat>=0.1.3 -Pillow>=10.0.1 -plotly>=5.14.1 -scipy>=1.11.2 -seaborn>=0.12.2 -setuptools>=68.0.0 -tifffile>=2023.4.12 -torch>=2.0.1 -torchvision>=0.15.2 -torchinfo>=1.8.0 -tqdm>=4.65.0 +albumentations>=1.3.1, +gradio>=4.15.0, +h5py>=3.9.0, +localthickness>=0.1.2, +matplotlib>=3.8.0, +monai>=1.2.0, +numpy>=1.26.0, +outputformat>=0.1.3, +Pillow>=10.0.1, +plotly>=5.14.1, +scipy>=1.11.2, +seaborn>=0.12.2, +setuptools>=68.0.0, +tifffile>=2023.4.12, +torch>=2.0.1, +torchvision>=0.15.2, +torchinfo>=1.8.0, +tqdm>=4.65.0, +nibabel>=5.2.0 diff --git a/setup.py b/setup.py index df3991077413fb8a556c94379258dfd6a6d96fcb..7d02c2581bdcbd982dc1f0fdb4543f363b409c33 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ with open("README.md", "r", encoding="utf-8") as f: setup( name="qim3d", - version="0.2.0", + version="0.3.0", author="Felipe Delestro", author_email="fima@dtu.dk", description="QIM tools and user interfaces", @@ -26,7 +26,7 @@ setup( classifiers=[ "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", - "Development Status :: 2 - Pre-Alpha", + "Development Status :: 4 - Beta", "Intended Audience :: Education", "Intended Audience :: Science/Research", "Natural Language :: English", @@ -35,15 +35,15 @@ setup( "Topic :: Scientific/Engineering :: Visualization", "Topic :: Software Development :: User Interfaces", ], - python_requires=">=3.6", + python_requires=">=3.10", install_requires=[ "albumentations>=1.3.1", - "gradio>=3.44.3", + "gradio>=4.15.0", "h5py>=3.9.0", "localthickness>=0.1.2", - "matplotlib>=3.7.1", + "matplotlib>=3.8.0", "monai>=1.2.0", - "numpy>=1.25.2", + "numpy>=1.26.0", "outputformat>=0.1.3", "Pillow>=10.0.1", "plotly>=5.14.1", @@ -55,5 +55,6 @@ setup( "torchvision>=0.15.2", "torchinfo>=1.8.0", "tqdm>=4.65.0", + "nibabel>=5.2.0" ], )