Skip to content
Snippets Groups Projects
Commit 05a66ce2 authored by payno's avatar payno
Browse files

Merge branch 'handle_pkg_resource_deprecation' into 'main'

pkg_resources: handle 'pkg_resources' deprecation

See merge request workflow/ewoksapps/est!136
parents 3aeb4e79 17488b82
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,15 @@ include:
- project: workflow/ewoksadmin/ewoksci
file: .gitlab-ci-template.yml
variables:
WARNING1: "ignore::DeprecationWarning:silx.resources" # Fix in https://github.com/silx-kit/silx/pull/4078
WARNING2: "ignore::DeprecationWarning:pkg_resources" # Distribution.activate
WARNING3: "ignore::DeprecationWarning:Orange.util" # Fix in https://github.com/biolab/orange3/commit/671f184be00169e0a5196e9871ee0156dd35c19f
WARNING4: "ignore::DeprecationWarning:orangewidget.gui" # Fix in https://github.com/biolab/orange-widget-base/commit/2c6b4cfbba035f7f89bb886a02d8330f2710ce7d
WARNING5: "ignore::DeprecationWarning:jupyter_client.session"
WARNING6: "ignore::DeprecationWarning:silx.gui.widgets.ElidedLabel"
IGNORE_WARNINGS: "-W ${WARNING1} -W ${WARNING2} -W ${WARNING3} -W ${WARNING4} -W ${WARNING5} -W ${WARNING6}"
flake8_nb:
extends: .flake8_nb
......@@ -11,29 +20,31 @@ test-3.8:
- python -m pip install --pre .[test,full]
- python -m pytest --cov=./ -v .
timeout: 20m
variables:
PYTEST_OPTIONS: "--import-mode=importlib --cov=./src -v"
PYTEST_WARNINGS: "-W error ${IGNORE_WARNINGS}"
test-3.8-minimal:
extends: .test-3.8_glx
script:
- python -m pip install --pre .[test]
- python -m pytest -v .
- python -m pytest --import-mode=importlib -v -W error ${IGNORE_WARNINGS} .
timeout: 20m
test-3.8-pymca:
extends: .test-3.8_glx
script:
- python -m pip install --pre .[test,pymca]
- python -m pytest -v .
- python -m pytest --import-mode=importlib -v -W error ${IGNORE_WARNINGS} .
timeout: 20m
test-3.8-larch:
extends: .test-3.8_glx
script:
- python -m pip install --pre .[test,larch]
- python -m pytest -v .
- python -m pytest --import-mode=importlib -v -W error ${IGNORE_WARNINGS} .
timeout: 20m
test-3.8-larch-example:
extends: .test-3.8_glx
script:
......@@ -45,6 +56,9 @@ build_sdist:
test_sdist-3.9:
extends: .test_sdist-3.9_glx
variables:
PYTEST_OPTIONS: "--import-mode=importlib -v"
PYTEST_WARNINGS: "-W error ${IGNORE_WARNINGS}"
build_doc:
extends: .build_doc
......
......@@ -22,7 +22,7 @@ keywords =
[options]
package_dir=
=src
packages=find:
packages=find_namespace:
python_requires = >=3.6
install_requires =
numpy
......@@ -31,8 +31,7 @@ install_requires =
silx >=0.15
Pint
ewoks[orange] >=0.1
namespace_packages =
orangecontrib
ewoksorange >= 0.7.0rc0
[options.packages.find]
where=src
......@@ -65,6 +64,7 @@ full =
%(larch)s
%(orange)s
test =
%(full)s
pytest >=7
testbook
ipykernel
......
__import__("pkg_resources").declare_namespace(__name__)
# orangecontrib is a namespace modules shared by multiple Orange add-on so it
# needs to declare namespace.
......@@ -28,9 +28,9 @@ WIDGET_HELP_PATH = (
# Entry point for main Orange categories/widgets discovery
def widget_discovery(discovery):
import pkg_resources
from ewoksorange.pkgmeta import get_distribution
dist = pkg_resources.get_distribution("est")
dist = get_distribution("est")
pkgs = [
"orangecontrib.est.widgets.pymca",
"orangecontrib.est.widgets.larch",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment