Skip to content

Commit

Permalink
Renamed package to cdl (available in PyPI)
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreRaybaut committed Nov 15, 2023
1 parent 06f287e commit e9c5870
Show file tree
Hide file tree
Showing 313 changed files with 2,581 additions and 2,598 deletions.
4 changes: 2 additions & 2 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ parallel = True
concurrency = multiprocessing,thread

omit =
*/cdlapp/utils/tests.py
*/cdlapp/tests/*
*/cdl/utils/tests.py
*/cdl/tests/*
*/guidata/*
*/plotpy/*

Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ coverage.xml

# Sphinx documentation
docs/_build/
cdlapp/data/doc/
cdl/data/doc/

# PyBuilder
target/
Expand Down
2 changes: 1 addition & 1 deletion .isort.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[settings]
known_first_party=cdlapp
known_first_party=cdl
8 changes: 4 additions & 4 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"name": "Run DataLab",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/cdlapp/app.py",
"program": "${workspaceFolder}/cdl/app.py",
"console": "integratedTerminal",
"envFile": "${workspaceFolder}/.env",
"python": "${config:python.defaultInterpreterPath}",
Expand All @@ -23,7 +23,7 @@
"name": "Run Test Launcher",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/cdlapp/tests/__init__.py",
"program": "${workspaceFolder}/cdl/tests/__init__.py",
"console": "integratedTerminal",
"envFile": "${workspaceFolder}/.env",
"python": "${config:python.defaultInterpreterPath}",
Expand All @@ -44,9 +44,9 @@
"justMyCode": false,
"args": [
// "--h5browser",
// "${workspaceFolder}/cdlapp/data/tests/format_v1.7.h5",
// "${workspaceFolder}/cdl/data/tests/format_v1.7.h5",
// "C:/Dev/Projets/DataLab_Test_CEA/cdl_test_cea/data/lmj_cbfx.h5,/A/valeur"
// "${workspaceFolder}/cdlapp/data/tests/format_v1.7.h5,/DataLab_Ima/i002: i002+i004",
// "${workspaceFolder}/cdl/data/tests/format_v1.7.h5,/DataLab_Ima/i002: i002+i004",
"--unattended",
// "--screenshot",
// "--verbose",
Expand Down
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ Changes:
* When multiple images are selected, the first image LUT range is applied to all
* "View in a new window": now opens non-modal dialogs, thus allowing to visualize
multiple signals or images in separate windows
* Added demo mode (from command line, simply run: cdlapp-demo)
* Added demo mode (from command line, simply run: cdl-demo)
* Command line option --h5 is now a positionnal argument (h5)
* Added command line option -b (or --h5browser) to browse a HDF5 file at startup
* Added command line option --version to show DataLab version
Expand Down Expand Up @@ -327,7 +327,7 @@ Other changes (on existing features):
* Peak detection: added minimal distance parameter
* Fit dialog / plot: do auto scale at startup
* Peak detection dialog: preselect horizontal cursor at startup
* `cdlapp.core.gui` code refactoring: added subpackage `core.gui.processor`
* `cdl.core.gui` code refactoring: added subpackage `core.gui.processor`
* Added "Browse HDF5" action to main window ("Open HDF5" now imports all data)

Bug fixes:
Expand Down
6 changes: 3 additions & 3 deletions DataLab.desktop
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[Desktop Entry]
Version=1.0
Type=Application
Name=cdlapp
Name=cdl
GenericName=DataLab
Comment=Run DataLab, the Python Signal and image processing software
TryExec=cdlapp
Exec=cdlapp
TryExec=cdl
Exec=cdl
Icon=DataLab.svg
Categories=Education;Science;Physics;
12 changes: 6 additions & 6 deletions DataLab.spec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- mode: python ; coding: utf-8 -*-

# Initial command:
# pyinstaller -y --clean -n DataLab -i resources\DataLab.ico cdlapp\start.pyw
# pyinstaller -y --clean -n DataLab -i resources\DataLab.ico cdl\start.pyw

import os.path as osp
import guidata
Expand All @@ -14,20 +14,20 @@ plotpy_images = osp.join(plotpy_path, 'images')
plotpy_locale = osp.join(plotpy_path, 'locale', 'fr', 'LC_MESSAGES')

from PyInstaller.utils.hooks import collect_submodules
all_hidden_imports = collect_submodules('cdlapp')
all_hidden_imports = collect_submodules('cdl')

a = Analysis(
['cdlapp\\start.pyw'],
['cdl\\start.pyw'],
pathex=[],
binaries=[],
datas=[
(guidata_images, 'guidata\\images'),
(guidata_locale, 'guidata\\locale\\fr\\LC_MESSAGES'),
(plotpy_images, 'plotpy\\images'),
(plotpy_locale, 'plotpy\\locale\\fr\\LC_MESSAGES'),
('cdlapp\\plugins', 'cdlapp\\plugins'),
('cdlapp\\data', 'cdlapp\\data'),
('cdlapp\\locale\\fr\\LC_MESSAGES\\cdlapp.mo', 'cdlapp\\locale\\fr\\LC_MESSAGES'),
('cdl\\plugins', 'cdl\\plugins'),
('cdl\\data', 'cdl\\data'),
('cdl\\locale\\fr\\LC_MESSAGES\\cdl.mo', 'cdl\\locale\\fr\\LC_MESSAGES'),
],
hiddenimports=all_hidden_imports,
hookspath=[],
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
![DataLab](https://raw.githubusercontent.com/Codra-Ingenierie-Informatique/DataLab/main/doc/images/DataLab-banner.png)

[![license](https://img.shields.io/pypi/l/cdlapp.svg)](./LICENSE)
[![pypi version](https://img.shields.io/pypi/v/cdlapp.svg)](https://pypi.org/project/CDL/)
[![PyPI status](https://img.shields.io/pypi/status/cdlapp.svg)](https://github.com/Codra-Ingenierie-Informatique/DataLab)
[![PyPI pyversions](https://img.shields.io/pypi/pyversions/cdlapp.svg)](https://pypi.python.org/pypi/CDL/)
[![license](https://img.shields.io/pypi/l/cdl.svg)](./LICENSE)
[![pypi version](https://img.shields.io/pypi/v/cdl.svg)](https://pypi.org/project/CDL/)
[![PyPI status](https://img.shields.io/pypi/status/cdl.svg)](https://github.com/Codra-Ingenierie-Informatique/DataLab)
[![PyPI pyversions](https://img.shields.io/pypi/pyversions/cdl.svg)](https://pypi.python.org/pypi/CDL/)

ℹ️ Created by [Codra](https://codra.net/)/[Pierre Raybaut](https://github.com/PierreRaybaut) in 2023, developed and maintained by DataLab open-source project team.

Expand Down
6 changes: 3 additions & 3 deletions cdlapp/__init__.py → cdl/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
#
# Licensed under the terms of the BSD 3-Clause
# (see cdlapp/LICENSE for details)
# (see cdl/LICENSE for details)

"""
DataLab
Expand All @@ -26,8 +26,8 @@
os.environ["CDL_VERSION"] = __version__

try:
import cdlapp.core.io # analysis:ignore
import cdlapp.patch # analysis:ignore
import cdl.core.io # analysis:ignore
import cdl.patch # analysis:ignore
except ImportError:
if not os.environ.get("CDL_DOC"):
raise
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion cdlapp/algorithms/fit.py → cdl/algorithms/fit.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
#
# Licensed under the terms of the BSD 3-Clause
# (see cdlapp/LICENSE for details)
# (see cdl/LICENSE for details)

"""
DataLab Computation / Curve fitting module
Expand Down
2 changes: 1 addition & 1 deletion cdlapp/algorithms/image.py → cdl/algorithms/image.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
#
# Licensed under the terms of the BSD 3-Clause
# (see cdlapp/LICENSE for details)
# (see cdl/LICENSE for details)

"""
DataLab Computation / Image module
Expand Down
2 changes: 1 addition & 1 deletion cdlapp/algorithms/signal.py → cdl/algorithms/signal.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
#
# Licensed under the terms of the BSD 3-Clause
# (see cdlapp/LICENSE for details)
# (see cdl/LICENSE for details)

"""
DataLab Computation / Signal module
Expand Down
10 changes: 5 additions & 5 deletions cdlapp/app.py → cdl/app.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
#
# Licensed under the terms of the BSD 3-Clause
# (see cdlapp/LICENSE for details)
# (see cdl/LICENSE for details)

"""
DataLab launcher module
Expand All @@ -14,10 +14,10 @@
from qtpy import QtGui as QG
from qtpy import QtWidgets as QW

from cdlapp.config import Conf
from cdlapp.core.gui.main import CDLMainWindow
from cdlapp.env import execenv
from cdlapp.utils.qthelpers import cdl_app_context
from cdl.config import Conf
from cdl.core.gui.main import CDLMainWindow
from cdl.env import execenv
from cdl.utils.qthelpers import cdl_app_context


def create(
Expand Down
10 changes: 5 additions & 5 deletions cdlapp/config.py → cdl/config.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
#
# Licensed under the terms of the BSD 3-Clause
# (see cdlapp/LICENSE for details)
# (see cdl/LICENSE for details)

"""
DataLab configuration module
Expand All @@ -20,12 +20,12 @@
from plotpy.config import CONF as PLOTPY_CONF
from plotpy.config import MAIN_BG_COLOR, MAIN_FG_COLOR

from cdlapp.utils import conf, tests
from cdl.utils import conf, tests

CONF_VERSION = "1.0.0"

APP_NAME = "DataLab"
MOD_NAME = "cdlapp"
MOD_NAME = "cdl"
_ = configtools.get_translation(MOD_NAME)

APP_DESC = _("""DataLab is a generic signal and image processing platform""")
Expand Down Expand Up @@ -185,11 +185,11 @@ class ViewSection(conf.Section, metaclass=conf.SectionMeta):
ima_ref_lut_range = conf.Option()

# Default visualization settings at item creation
# (e.g. see `ImageObj.make_item` in cdlapp/core/model/image.py)
# (e.g. see `ImageObj.make_item` in cdl/core/model/image.py)
ima_eliminate_outliers = conf.Option()

# Default visualization settings, persisted in object metadata
# (e.g. see `create_image` in cdlapp/core/model/image.py)
# (e.g. see `create_image` in cdl/core/model/image.py)
ima_def_colormap = conf.Option()
ima_def_interpolation = conf.Option()
ima_def_alpha = conf.Option()
Expand Down
File renamed without changes.
14 changes: 7 additions & 7 deletions cdlapp/core/baseproxy.py → cdl/core/baseproxy.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
#
# Licensed under the terms of the BSD 3-Clause
# (see cdlapp/LICENSE for details)
# (see cdl/LICENSE for details)

"""
DataLab base proxy module
Expand Down Expand Up @@ -34,11 +34,11 @@
import guidata.dataset as gds
import numpy as np

from cdlapp.obj import ImageObj, SignalObj
from cdl.obj import ImageObj, SignalObj

if TYPE_CHECKING: # pragma: no cover
from cdlapp.core.gui.main import CDLMainWindow
from cdlapp.core.remote import ServerProxy
from cdl.core.gui.main import CDLMainWindow
from cdl.core.remote import ServerProxy


class AbstractCDLControl(abc.ABC):
Expand Down Expand Up @@ -395,13 +395,13 @@ class BaseProxy(AbstractCDLControl, metaclass=abc.ABCMeta):
"""Common base class for DataLab proxies
Args:
cdlapp (CDLMainWindow | ServerProxy | None): CDLMainWindow instance or
cdl (CDLMainWindow | ServerProxy | None): CDLMainWindow instance or
ServerProxy instance. If None, then the proxy implementation will
have to set it later (e.g. see RemoteClient).
"""

def __init__(self, cdlapp: CDLMainWindow | ServerProxy | None = None) -> None:
self._cdl = cdlapp
def __init__(self, cdl: CDLMainWindow | ServerProxy | None = None) -> None:
self._cdl = cdl

def get_version(self) -> str:
"""Return DataLab version.
Expand Down
File renamed without changes.
12 changes: 6 additions & 6 deletions cdlapp/core/computation/base.py → cdl/core/computation/base.py
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
# -*- coding: utf-8 -*-
#
# Licensed under the terms of the BSD 3-Clause
# (see cdlapp/LICENSE for details)
# (see cdl/LICENSE for details)

"""
DataLab Base Computation module
-------------------------------
This module defines the base parameters and functions used by the
:mod:`cdlapp.core.gui.processor` module.
:mod:`cdl.core.gui.processor` module.
It is based on the :mod:`cdlapp.algorithms` module, which defines the algorithms
that are applied to the data, and on the :mod:`cdlapp.core.model` module, which
It is based on the :mod:`cdl.algorithms` module, which defines the algorithms
that are applied to the data, and on the :mod:`cdl.core.model` module, which
defines the data model.
"""

# pylint: disable=invalid-name # Allows short reference names like x, y, ...

# Note:
# ----
# All dataset classes must also be imported in the cdlapp.core.computation.param module.
# All dataset classes must also be imported in the cdl.core.computation.param module.

from __future__ import annotations

import guidata.dataset as gds
import numpy as np

from cdlapp.config import _
from cdl.config import _


class GaussianParam(gds.DataSet):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# -*- coding: utf-8 -*-
#
# Licensed under the terms of the BSD 3-Clause
# (see cdlapp/LICENSE for details)
# (see cdl/LICENSE for details)

"""
DataLab Image Computation module
--------------------------------
This module defines the image parameters and functions used by the
:mod:`cdlapp.core.gui.processor` module.
:mod:`cdl.core.gui.processor` module.
It is based on the :mod:`cdlapp.algorithms` module, which defines the algorithms
that are applied to the data, and on the :mod:`cdlapp.core.model` module, which
It is based on the :mod:`cdl.algorithms` module, which defines the algorithms
that are applied to the data, and on the :mod:`cdl.core.model` module, which
defines the data model.
"""

Expand All @@ -30,7 +30,7 @@
from skimage import filters
from skimage.util.dtype import dtype_range

from cdlapp.algorithms.image import (
from cdl.algorithms.image import (
BINNING_OPERATIONS,
binning,
flatfield,
Expand All @@ -40,17 +40,17 @@
z_fft,
z_ifft,
)
from cdlapp.config import _
from cdlapp.core.computation.base import (
from cdl.config import _
from cdl.core.computation.base import (
ClipParam,
FFTParam,
GaussianParam,
MovingAverageParam,
MovingMedianParam,
ThresholdParam,
)
from cdlapp.core.model.base import BaseProcParam
from cdlapp.core.model.image import ImageObj, RoiDataGeometries, RoiDataItem
from cdl.core.model.base import BaseProcParam
from cdl.core.model.image import ImageObj, RoiDataGeometries, RoiDataItem

VALID_DTYPES_STRLIST = [
dtype.__name__ for dtype in dtype_range if dtype in ImageObj.VALID_DTYPES
Expand Down
Loading

0 comments on commit e9c5870

Please sign in to comment.