Skip to content

Commit cdc09de

Browse files
authored
Merge pull request #28 from AdaptiveMotorControlLab/cy/interface-overhaul
Interface overhaul, v0.0.2rc1
2 parents 30c3e4d + 6e10946 commit cdc09de

File tree

83 files changed

+5240
-3721
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+5240
-3721
lines changed

.github/workflows/preview_metadata.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name: napari hub Preview Page # we use this name to find your preview page artif
44
on:
55
pull_request:
66
branches:
7-
- '**'
7+
- 'test' # '**' for all
88

99
jobs:
1010
preview-page:
@@ -16,6 +16,6 @@ jobs:
1616
uses: actions/checkout@v2
1717

1818
- name: napari hub Preview Page Builder
19-
uses: chanzuckerberg/[email protected].5
19+
uses: chanzuckerberg/[email protected].6
2020
with:
2121
hub-ref: main

.github/workflows/test_and_deploy.yml

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,40 +22,41 @@ jobs:
2222
runs-on: ${{ matrix.platform }}
2323
strategy:
2424
matrix:
25-
platform: [ubuntu-latest, windows-latest, macos-latest]
26-
python-version: [3.8, 3.9, "3.10"]
25+
# platform: [ubuntu-latest, windows-latest, macos-latest]
26+
platform: [windows-latest]
27+
python-version: [3.8, 3.9] # 3.10
2728

2829
steps:
29-
- uses: actions/checkout@v2
30+
- uses: actions/checkout@v3
3031

3132
- name: Set up Python ${{ matrix.python-version }}
32-
uses: actions/setup-python@v2
33+
uses: actions/setup-python@v4
3334
with:
3435
python-version: ${{ matrix.python-version }}
3536

36-
# these libraries enable testing on Qt on linux
37+
# these libraries enable testing on Qt on linux
3738
- uses: tlambert03/setup-qt-libs@v1
3839

39-
# strategy borrowed from vispy for installing opengl libs on windows
40+
# strategy borrowed from vispy for installing opengl libs on windows
4041
- name: Install Windows OpenGL
4142
if: runner.os == 'Windows'
4243
run: |
4344
git clone --depth 1 https://github.com/pyvista/gl-ci-helpers.git
4445
powershell gl-ci-helpers/appveyor/install_opengl.ps1
4546
if (Test-Path -Path "C:\Windows\system32\opengl32.dll" -PathType Leaf) {Exit 0} else {Exit 1}
4647
47-
# note: if you need dependencies from conda, considering using
48-
# setup-miniconda: https://github.com/conda-incubator/setup-miniconda
49-
# and
50-
# tox-conda: https://github.com/tox-dev/tox-conda
48+
# note: if you need dependencies from conda, considering using
49+
# setup-miniconda: https://github.com/conda-incubator/setup-miniconda
50+
# and
51+
# tox-conda: https://github.com/tox-dev/tox-conda
5152
- name: Install dependencies
5253
run: |
5354
python -m pip install --upgrade pip
5455
python -m pip install setuptools tox tox-gh-actions
5556
56-
# this runs the platform-specific tests declared in tox.ini
57+
# this runs the platform-specific tests declared in tox.ini
5758
- name: Test with tox
58-
uses: GabrielBB/xvfb-action@v1
59+
uses: GabrielBB/xvfb-action@v1 # aganders3/headless-gui@v1
5960
with:
6061
run: python -m tox
6162
env:
@@ -65,9 +66,9 @@ jobs:
6566
uses: codecov/codecov-action@v2
6667

6768
deploy:
68-
# this will run when you have tagged a commit, starting with "v*"
69-
# and requires that you have put your twine API key in your
70-
# github secrets (see readme for details)
69+
# this will run when you have tagged a commit, starting with "v*"
70+
# and requires that you have put your twine API key in your
71+
# github secrets (see readme for details)
7172
needs: [test]
7273
runs-on: ubuntu-latest
7374
if: contains(github.ref, 'tags')

.gitignore

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,12 @@ venv/
9595
########
9696
#project specific
9797
#dataset, weights, old logos, requirements
98-
/napari_cellseg3d/models/dataset/
99-
/napari_cellseg3d/models/saved_weights/
98+
/napari_cellseg3d/code_models/models/dataset/
99+
/napari_cellseg3d/code_models/models/saved_weights/
100100
/docs/res/logo/old_logo/
101101
/reqs/
102+
/Loss_plots/
103+
notebooks/csv_cell_plot.html
104+
notebooks/full_plot.html
105+
*.csv
106+
*.png

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252

5353
# General information about the project.
5454
project = "napari-cellseg3d"
55-
copyright = "2022, Cyril Achard, Maxime Vidal"
55+
copyright = "2022-2023, Cyril Achard, Maxime Vidal"
5656
author = "Cyril Achard, Maxime Vidal"
5757

5858
# The version info for the project you're documenting, acts as replacement for

docs/index.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Welcome to napari-cellseg3d's documentation!
1616
:caption: Utilities :
1717

1818
res/guides/metrics_module_guide
19-
res/guides/convert_module_guide
19+
res/guides/utils_module_guide
2020
res/guides/cropping_module_guide
2121

2222

@@ -34,8 +34,7 @@ Welcome to napari-cellseg3d's documentation!
3434
res/code/interface
3535
res/code/plugin_base
3636
res/code/plugin_review
37-
res/code/launch_review
38-
res/code/plugin_dock
37+
res/code/plugin_review_dock
3938
res/code/plugin_crop
4039
res/code/plugin_convert
4140
res/code/plugin_metrics

docs/res/code/interface.rst

Lines changed: 36 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,27 @@ interface.py
44
Classes
55
-------------
66

7+
QWidgetSingleton
8+
**************************************
9+
.. autoclass:: napari_cellseg3d.interface::QWidgetSingleton
10+
:members: __call__
11+
12+
UtilsDropdown
13+
**************************************
14+
.. autoclass:: napari_cellseg3d.interface::UtilsDropdown
15+
:members: __init__, dropdown_menu_call, show_utils_menu
16+
17+
Log
18+
**************************************
19+
.. autoclass:: napari_cellseg3d.interface::Log
20+
:members: __init__, write, replace_last_line, print_and_log, warn
21+
22+
23+
ContainerWidget
24+
**************************************
25+
.. autoclass:: napari_cellseg3d.interface::ContainerWidget
26+
:members: __init__
27+
728
Button
829
**************************************
930
.. autoclass:: napari_cellseg3d.interface::Button
@@ -22,13 +43,13 @@ CheckBox
2243
AnisotropyWidgets
2344
**************************************
2445
.. autoclass:: napari_cellseg3d.interface::AnisotropyWidgets
25-
:members: __init__, build, get_anisotropy_resolution_xyz, get_anisotropy_resolution_zyx, anisotropy_zoom_factor,is_enabled,toggle_permanent_visibility
46+
:members: __init__, build, scaling_zyx, resolution_zyx, scaling_xyz, resolution_xyz,enabled
2647

2748

2849
FilePathWidget
2950
**************************************
3051
.. autoclass:: napari_cellseg3d.interface::FilePathWidget
31-
:members: __init__, build, get_text_field, get_button, check_ready, set_required, update_field_color, set_description
52+
:members: __init__, build, text_field, button, check_ready, required, update_field_color, tooltips
3253

3354
ScrollArea
3455
**************************************
@@ -38,7 +59,7 @@ ScrollArea
3859
DoubleIncrementCounter
3960
**************************************
4061
.. autoclass:: napari_cellseg3d.interface::DoubleIncrementCounter
41-
:members: __init__, set_precision, make_n
62+
:members: __init__, precision, make_n
4263

4364
IntIncrementCounter
4465
**************************************
@@ -49,22 +70,21 @@ IntIncrementCounter
4970
Functions
5071
-------------
5172

52-
open_url
73+
handle_adjust_errors
5374
**************************************
54-
.. autofunction:: napari_cellseg3d.interface::open_url
55-
75+
.. autofunction:: napari_cellseg3d.interface::handle_adjust_errors
5676

57-
make_group
77+
handle_adjust_errors_wrapper
5878
**************************************
59-
.. autofunction:: napari_cellseg3d.interface::make_group
79+
.. autofunction:: napari_cellseg3d.interface::handle_adjust_errors_wrapper
6080

61-
add_to_group
81+
open_url
6282
**************************************
63-
.. autofunction:: napari_cellseg3d.interface::add_to_group
83+
.. autofunction:: napari_cellseg3d.interface::open_url
6484

65-
make_container
85+
make_group
6686
**************************************
67-
.. autofunction:: napari_cellseg3d.interface::make_container
87+
.. autofunction:: napari_cellseg3d.interface::make_group
6888

6989
combine_blocks
7090
**************************************
@@ -74,6 +94,10 @@ add_blank
7494
**************************************
7595
.. autofunction:: napari_cellseg3d.interface::add_blank
7696

97+
add_label
98+
**************************************
99+
.. autofunction:: napari_cellseg3d.interface::add_label
100+
77101
toggle_visibility
78102
**************************************
79103
.. autofunction:: napari_cellseg3d.interface::toggle_visibility

docs/res/code/launch_review.rst

Lines changed: 0 additions & 10 deletions
This file was deleted.

docs/res/code/model_framework.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ Class : ModelFramework
1111

1212
Methods
1313
**********************
14-
.. autoclass:: napari_cellseg3d.model_framework::ModelFramework
15-
:members: __init__, load_dataset_paths,save_log, save_log_to_path,get_model, get_loss,display_status_report,load_dataset_paths,create_train_dataset_dict, load_image_dataset, load_label_dataset,load_results_path,load_model_path,get_device, update_default, remove_from_viewer
14+
.. autoclass:: napari_cellseg3d.code_models.model_framework::ModelFramework
15+
:members: __init__, send_log, save_log, save_log_to_path, display_status_report, create_train_dataset_dict, get_model, get_available_models, get_device, empty_cuda_cache
1616
:noindex:
1717

1818

1919
Attributes
2020
*********************
2121

22-
.. autoclass:: napari_cellseg3d.model_framework::ModelFramework
23-
:members: _viewer, worker, docked_widgets, images_filepaths, labels_filepaths, results_path, model_path
22+
.. autoclass:: napari_cellseg3d.code_models.model_framework::ModelFramework
23+
:members: _viewer, worker, docked_widgets, images_filepaths, labels_filepaths, results_path

docs/res/code/model_instance_seg.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,24 @@ Functions
77

88
binary_connected
99
**************************************
10-
.. autofunction:: napari_cellseg3d.model_instance_seg::binary_connected
10+
.. autofunction:: napari_cellseg3d.code_models.model_instance_seg::binary_connected
1111

1212
binary_watershed
1313
**************************************
14-
.. autofunction:: napari_cellseg3d.model_instance_seg::binary_watershed
14+
.. autofunction:: napari_cellseg3d.code_models.model_instance_seg::binary_watershed
1515

1616
volume_stats
1717
**************************************
18-
.. autofunction:: napari_cellseg3d.model_instance_seg::volume_stats
18+
.. autofunction:: napari_cellseg3d.code_models.model_instance_seg::volume_stats
1919

2020
clear_small_objects
2121
**************************************
22-
.. autofunction:: napari_cellseg3d.model_instance_seg::clear_small_objects
22+
.. autofunction:: napari_cellseg3d.code_models.model_instance_seg::clear_small_objects
2323

2424
to_instance
2525
**************************************
26-
.. autofunction:: napari_cellseg3d.model_instance_seg::to_instance
26+
.. autofunction:: napari_cellseg3d.code_models.model_instance_seg::to_instance
2727

2828
to_semantic
2929
**************************************
30-
.. autofunction:: napari_cellseg3d.model_instance_seg::to_semantic
30+
.. autofunction:: napari_cellseg3d.code_models.model_instance_seg::to_semantic

docs/res/code/model_workers.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Class : LogSignal
1010

1111
Attributes
1212
************************
13-
.. autoclass:: napari_cellseg3d.model_workers::LogSignal
13+
.. autoclass:: napari_cellseg3d.code_models.model_workers::LogSignal
1414
:members: log_signal
1515
:noindex:
1616

@@ -24,7 +24,7 @@ Class : InferenceWorker
2424

2525
Methods
2626
************************
27-
.. autoclass:: napari_cellseg3d.model_workers::InferenceWorker
27+
.. autoclass:: napari_cellseg3d.code_models.model_workers::InferenceWorker
2828
:members: __init__, log, create_inference_dict, inference
2929
:noindex:
3030

@@ -39,7 +39,7 @@ Class : TrainingWorker
3939

4040
Methods
4141
************************
42-
.. autoclass:: napari_cellseg3d.model_workers::TrainingWorker
42+
.. autoclass:: napari_cellseg3d.code_models.model_workers::TrainingWorker
4343
:members: __init__, log, train
4444
:noindex:
4545

0 commit comments

Comments
 (0)