Skip to content

Commit cad404d

Browse files
committed
Merge branch 'develop' of C:/Dev/Projets/DataLab into develop
2 parents 8967521 + f5939b6 commit cad404d

13 files changed

Lines changed: 55 additions & 110 deletions

File tree

.github/workflows/test_pyqt5.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,21 @@ jobs:
3636
python -m pip install --upgrade pip
3737
python -m pip install ruff pytest
3838
pip install PyQt5
39-
pip install .
4039
if [ "${{ github.ref_name }}" = "develop" ]; then
41-
pip uninstall -y guidata
40+
# Install development versions of key dependencies first
4241
pip install git+https://github.com/PlotPyStack/guidata.git@develop
43-
pip uninstall -y plotpy
4442
pip install git+https://github.com/PlotPyStack/plotpy.git@develop
45-
pip uninstall -y sigima
4643
pip install git+https://github.com/DataLab-Platform/Sigima.git@develop
44+
# Install tomli for TOML parsing (safe if already present)
45+
pip install tomli
46+
# Extract dependencies and save to file, then install
47+
python -c "import tomli; f=open('pyproject.toml','rb'); data=tomli.load(f); deps=[d for d in data['project']['dependencies'] if not any(p in d for p in ['guidata','PlotPy','Sigima'])]; open('deps.txt','w').write('\n'.join(deps))"
48+
pip install -r deps.txt
49+
# Install DataLab without dependencies
50+
pip install --no-deps .
51+
else
52+
# Install from PyPI normally for main branch
53+
pip install .
4754
fi
4855
- name: Lint with Ruff
4956
run: ruff check --output-format=github datalab

.vscode/tasks.json

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -476,17 +476,19 @@
476476
{
477477
"label": "🧹 Clean Up",
478478
"type": "shell",
479-
"command": "cmd",
479+
"command": "${command:python.interpreterPath}",
480480
"args": [
481-
"/c",
482-
"clean_up.bat",
481+
"scripts/run_with_env.py",
482+
"${command:python.interpreterPath}",
483+
"-m",
484+
"guidata.utils.cleanup",
483485
],
484486
"options": {
485-
"cwd": "scripts",
487+
"cwd": "${workspaceFolder}"
486488
},
487489
"group": {
488490
"kind": "build",
489-
"isDefault": true,
491+
"isDefault": true
490492
},
491493
"presentation": {
492494
"echo": true,
@@ -505,7 +507,7 @@
505507
"cwd": "scripts",
506508
"env": {
507509
"PYTHON": "${command:python.interpreterPath}",
508-
"RELEASE": "1",
510+
// "RELEASE": "1",
509511
"UNATTENDED": "1",
510512
},
511513
"statusbar": {
@@ -571,7 +573,7 @@
571573
"env": {
572574
"PYTHON": "${command:python.interpreterPath}",
573575
"QT_COLOR_MODE": "light",
574-
"RELEASE": "1",
576+
// "RELEASE": "1",
575577
"UNATTENDED": "1",
576578
},
577579
"statusbar": {
@@ -778,7 +780,7 @@
778780
"cwd": "scripts",
779781
"env": {
780782
"PYTHON": "${command:python.interpreterPath}",
781-
"RELEASE": "1",
783+
// "RELEASE": "1",
782784
"UNATTENDED": "1",
783785
},
784786
"statusbar": {
@@ -820,7 +822,7 @@
820822
"cwd": "scripts",
821823
"env": {
822824
"PYTHON": "${command:python.interpreterPath}",
823-
"RELEASE": "1",
825+
// "RELEASE": "1",
824826
"UNATTENDED": "1",
825827
},
826828
},

datalab/gui/processor/image.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
from sigima.objects import (
2222
ImageObj,
2323
ImageROI,
24-
NormalDistributionParam,
24+
NormalDistribution2DParam,
2525
PoissonDistribution2DParam,
2626
ROI2DParam,
27-
UniformDistributionParam,
27+
UniformDistribution2DParam,
2828
)
2929
from sigima.objects.scalar import GeometryResult
3030
from sigima.proc.decorator import ComputationMetadata
@@ -416,7 +416,7 @@ def register_computations(self) -> None:
416416
self.register_1_to_1(
417417
sigima_image.add_gaussian_noise,
418418
_("Add Gaussian noise"),
419-
NormalDistributionParam,
419+
NormalDistribution2DParam,
420420
)
421421
self.register_1_to_1(
422422
sigima_image.add_poisson_noise,
@@ -426,7 +426,7 @@ def register_computations(self) -> None:
426426
self.register_1_to_1(
427427
sigima_image.add_uniform_noise,
428428
_("Add uniform noise"),
429-
UniformDistributionParam,
429+
UniformDistribution2DParam,
430430
)
431431
# Noise reduction
432432
self.register_1_to_1(

datalab/gui/processor/signal.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717
import sigima.proc.signal as sigima_signal
1818
from guidata.qthelpers import exec_dialog
1919
from sigima.objects import (
20-
NormalDistributionParam,
20+
NormalDistribution1DParam,
2121
PoissonDistribution1DParam,
2222
ROI1DParam,
2323
SignalObj,
2424
SignalROI,
25-
UniformDistributionParam,
25+
UniformDistribution1DParam,
2626
create_signal,
2727
)
2828
from sigima.objects.scalar import GeometryResult, TableResult
@@ -213,7 +213,7 @@ def register_computations(self) -> None:
213213
self.register_1_to_1(
214214
sigima_signal.add_gaussian_noise,
215215
_("Add Gaussian noise"),
216-
NormalDistributionParam,
216+
NormalDistribution1DParam,
217217
)
218218
self.register_1_to_1(
219219
sigima_signal.add_poisson_noise,
@@ -223,7 +223,7 @@ def register_computations(self) -> None:
223223
self.register_1_to_1(
224224
sigima_signal.add_uniform_noise,
225225
_("Add uniform noise"),
226-
UniformDistributionParam,
226+
UniformDistribution1DParam,
227227
)
228228
# Noise reduction
229229
self.register_1_to_1(

datalab/tests/features/common/table_results_app_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from __future__ import annotations
1010

1111
import numpy as np
12-
from sigima.objects import NormalDistributionParam
12+
from sigima.objects import NormalDistribution1DParam
1313
from sigima.tests import data as test_data
1414

1515
from datalab.adapters_metadata.table_adapter import TableAdapter
@@ -30,7 +30,7 @@ def test_table_results():
3030
obj2 = create_image_with_table_results()
3131
with datalab_test_app_context() as win:
3232
panel = win.signalpanel
33-
noiseparam = NormalDistributionParam()
33+
noiseparam = NormalDistribution1DParam()
3434
for sigma in np.linspace(0.0, 0.5, 11):
3535
noiseparam.sigma = sigma
3636
sig = test_data.create_noisy_signal(noiseparam=noiseparam)

datalab/tests/features/signal/fitdialog_unit_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# guitest: show
1010

1111
from guidata.qthelpers import qt_app_context
12-
from sigima.objects import NormalDistributionParam
12+
from sigima.objects import NormalDistribution1DParam
1313
from sigima.tests.data import create_noisy_signal, get_test_signal
1414
from sigima.tests.helpers import get_default_test_name
1515
from sigima.tools.signal.peakdetection import peak_indices
@@ -29,7 +29,7 @@ def test_fit_dialog():
2929
)
3030

3131
# Gaussian curve fitting test
32-
noiseparam = NormalDistributionParam.create(sigma=5.0)
32+
noiseparam = NormalDistribution1DParam.create(sigma=5.0)
3333
sig = create_noisy_signal(noiseparam)
3434
x, y = sig.x, sig.y
3535
execenv.print(fdlg.gaussianfit(x, y))

datalab/tests/scenarios/common.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,9 @@ def run_signal_computations(
198198
roi = sigima.objects.create_signal_roi([i1, i2], indices=True)
199199
panel.processor.compute_roi_extraction(roi)
200200

201-
sig = create_noisy_signal(sigima.objects.NormalDistributionParam.create(sigma=5.0))
201+
sig = create_noisy_signal(
202+
sigima.objects.NormalDistribution1DParam.create(sigma=5.0)
203+
)
202204
panel.add_object(sig)
203205
param = sigima.params.PolynomialFitParam()
204206
panel.processor.compute_polyfit(param)

doc/images/shots/i_help.png

575 Bytes
Loading

doc/images/shots/s_help.png

575 Bytes
Loading

doc/requirements.rst

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The `datalab-platform` package requires the following Python modules:
1717
- >= 2.7.4
1818
- Curve and image plotting tools for Python/Qt applications
1919
* - Sigima
20-
- >= 0.1.0
20+
- >= 1.0.0a0
2121
- Scientific computing engine for 1D signals and 2D images, part of the DataLab open-source platform.
2222
* - NumPy
2323
- >= 1.22
@@ -64,25 +64,25 @@ Optional modules for development:
6464
- Version
6565
- Summary
6666
* - build
67-
-
67+
-
6868
- A simple, correct Python build frontend
6969
* - babel
70-
-
70+
-
7171
- Internationalization utilities
7272
* - Coverage
73-
-
73+
-
7474
- Code coverage measurement for Python
7575
* - pyinstaller
7676
- >= 6.0
7777
- PyInstaller bundles a Python application and all its dependencies into a single package.
7878
* - pylint
79-
-
79+
-
8080
- python code static checker
8181
* - ruff
82-
-
82+
-
8383
- An extremely fast Python linter and code formatter, written in Rust.
8484
* - pre-commit
85-
-
85+
-
8686
- A framework for managing and maintaining multi-language pre-commit hooks.
8787

8888
Optional modules for building the documentation:
@@ -95,25 +95,25 @@ Optional modules for building the documentation:
9595
- Version
9696
- Summary
9797
* - sphinx
98-
-
98+
-
9999
- Python documentation generator
100100
* - sphinx_intl
101-
-
101+
-
102102
- Sphinx utility that make it easy to translate and to apply translation.
103103
* - sphinx-sitemap
104-
-
104+
-
105105
- Sitemap generator for Sphinx
106106
* - myst_parser
107-
-
107+
-
108108
- An extended [CommonMark](https://spec.commonmark.org/) compliant parser,
109109
* - sphinx_design
110-
-
110+
-
111111
- A sphinx extension for designing beautiful, view size responsive web components.
112112
* - sphinx-copybutton
113-
-
113+
-
114114
- Add a copy button to each of your code cells.
115115
* - pydata-sphinx-theme
116-
-
116+
-
117117
- Bootstrap-based Sphinx theme from the PyData community
118118

119119
Optional modules for running test suite:
@@ -126,8 +126,8 @@ Optional modules for running test suite:
126126
- Version
127127
- Summary
128128
* - pytest
129-
-
129+
-
130130
- pytest: simple powerful testing with Python
131131
* - pytest-xvfb
132-
-
132+
-
133133
- A pytest plugin to run Xvfb (or Xephyr/Xvnc) for tests.

0 commit comments

Comments
 (0)