From b87205fa46288db5b8afc13edb24389680c3d8b2 Mon Sep 17 00:00:00 2001 From: woutdenolf <woutdenolf@users.sf.net> Date: Thu, 16 Jan 2025 09:48:37 +0100 Subject: [PATCH 1/4] pyproject.toml and python >=3.8 --- .flake8 | 4 ++ .gitignore | 1 + doc/conf.py | 6 ++- pyproject.toml | 61 ++++++++++++++++++++- setup.cfg | 68 ------------------------ setup.py | 4 -- src/ewoksdata/__init__.py | 1 - src/ewoksdata/data/blissdata/__init__.py | 7 +-- 8 files changed, 70 insertions(+), 82 deletions(-) create mode 100644 .flake8 delete mode 100644 setup.cfg delete mode 100644 setup.py diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..7e1499d --- /dev/null +++ b/.flake8 @@ -0,0 +1,4 @@ +[flake8] +extend-ignore = E203,E501,E701 +max-line-length = 88 +exclude = [".eggs"] diff --git a/.gitignore b/.gitignore index ba0b1b9..d961b96 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ !.gitignore !.gitlab-ci.yml !.readthedocs.yaml +!.flake8 # Byte / compiled / optimized *.py[cod] diff --git a/doc/conf.py b/doc/conf.py index ae0f854..04e64af 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -4,11 +4,13 @@ # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information -from ewoksdata import __version__ as release +import importlib.metadata + +release = importlib.metadata.version("ewoksdata") project = "ewoksdata" version = ".".join(release.split(".")[:2]) -copyright = "2021-2024, ESRF" +copyright = "2021-2025, ESRF" author = "ESRF" docstitle = f"{project} {version}" diff --git a/pyproject.toml b/pyproject.toml index 14ad32c..0941606 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,4 +2,63 @@ requires = [ "setuptools>=46.4" ] -build-backend = "setuptools.build_meta" \ No newline at end of file +build-backend = "setuptools.build_meta" + +[project] +name = "ewoksdata" +version = "0.6.0" +authors = [{name = "ESRF", email = "dau-pydev@esrf.fr"}] +description = "Ewoks tasks for data access" +readme = {file = "README.md", content-type = "text/markdown"} +license = {file = "LICENSE.md"} +classifiers = [ + "Intended Audience :: Science/Research", + "License :: OSI Approved :: MIT License", + "Programming Language :: Python :: 3", +] +requires-python = ">=3.8" +dependencies = [ + "h5py >=2.8", + "silx >=1.1.0", + "hdf5plugin", + "blissdata >=0.3.4", + "redis", # blissdata<1 + "redis !=5.3.0b1,!=5.3.0b3", + "packaging", +] + +[project.urls] +Homepage = "https://gitlab.esrf.fr/workflow/ewoksapps/ewoksdata/" +Documentation = "https://ewoksdata.readthedocs.io" +Repository = "https://gitlab.esrf.fr/workflow/ewoksapps/ewoksdata/" +Issues = "https://gitlab.esrf.fr/workflow/ewoksapps/ewoksdata/issues" +Changelog = "https://gitlab.esrf.fr/workflow/ewoksapps/ewoksdata/-/blob/main/CHANGELOG.md" + +[project.optional-dependencies] +online = [ + "blissdata[tango]", +] +test = [ + "ewoksdata[online]", + "pytest >=7", +] +dev = [ + "ewoksdata[test]", + "black >=22", + "flake8 >=4", +] +doc = [ + "ewoksdata[test]", + "sphinx >=4.5", + "sphinx-autodoc-typehints >=1.16", + "pydata-sphinx-theme < 0.15", +] + +[tool.setuptools] +package-dir = { "" = "src" } + +[tool.setuptools.packages.find] +where = ["src"] + +[tool.coverage.run] +omit = ['*/tests/*'] diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index c3584ce..0000000 --- a/setup.cfg +++ /dev/null @@ -1,68 +0,0 @@ -[metadata] -name = ewoksdata -version = attr: ewoksdata.__version__ -author = ESRF -author_email = wout.de_nolf@esrf.fr -description = Ewoks tasks for data access -long_description = file: README.md -long_description_content_type = text/markdown -license = MIT -url = https://gitlab.esrf.fr/workflow/ewoksapps/ewoksdata/ -project_urls = - Source = https://gitlab.esrf.fr/workflow/ewoksapps/ewoksdata/ - Documentation = https://ewoksdata.readthedocs.io - Tracker = https://gitlab.esrf.fr/workflow/ewoksapps/ewoksdata/issues/ -classifiers = - Intended Audience :: Science/Research - License :: OSI Approved :: MIT License - Programming Language :: Python :: 3 - -[options] -package_dir= - =src -packages=find: -python_requires = >=3.7 -install_requires = - h5py >=2.8 - silx >=1.1.0 - hdf5plugin - blissdata >=0.3.4 - blissdata <1.0.1; python_version < "3.8" - blissdata; python_version >= "3.8" - redis # blissdata<1 - redis !=5.3.0b1,!=5.3.0b3 - packaging - importlib_metadata; python_version < "3.8" - cryptography<44; python_version < "3.8" - -[options.packages.find] -where=src - -[options.extras_require] -online = - blissdata[tango] -test = - %(online)s - pytest >=7 -dev = - %(test)s - black >=22 - flake8 >=4 -doc = - %(test)s - sphinx >=4.5 - sphinx-autodoc-typehints >=1.16 - pydata-sphinx-theme < 0.15 - -# E501 (line too long) ignored for now -# E203 and W503 incompatible with black formatting (https://black.readthedocs.io/en/stable/compatible_configs.html#flake8) -[flake8] -ignore = E501, E203, W503 -max-line-length = 88 -exclude = - .eggs - -[coverage:run] -omit = - setup.py - */tests/* diff --git a/setup.py b/setup.py deleted file mode 100644 index 1abbd06..0000000 --- a/setup.py +++ /dev/null @@ -1,4 +0,0 @@ -import setuptools - -if __name__ == "__main__": - setuptools.setup() diff --git a/src/ewoksdata/__init__.py b/src/ewoksdata/__init__.py index 906d362..e69de29 100644 --- a/src/ewoksdata/__init__.py +++ b/src/ewoksdata/__init__.py @@ -1 +0,0 @@ -__version__ = "0.6.0" diff --git a/src/ewoksdata/data/blissdata/__init__.py b/src/ewoksdata/data/blissdata/__init__.py index 3951214..06875f4 100644 --- a/src/ewoksdata/data/blissdata/__init__.py +++ b/src/ewoksdata/data/blissdata/__init__.py @@ -1,9 +1,4 @@ -import sys - -if sys.version_info >= (3, 8): - from importlib.metadata import version -else: - from importlib_metadata import version +from importlib.metadata import version from packaging.specifiers import SpecifierSet -- GitLab From 0fb99b9569a3e011fc1b68989d8209650e73affa Mon Sep 17 00:00:00 2001 From: woutdenolf <woutdenolf@users.sf.net> Date: Thu, 16 Jan 2025 09:48:49 +0100 Subject: [PATCH 2/4] add deploy jobs --- .gitlab-ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d4b9d42..ad0e126 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -163,3 +163,9 @@ pages: assets: extends: .assets + +pypi: + extends: .pypi + +testpypi: + extends: .testpypi -- GitLab From 349bedd1cc6ac626dff73c1c6e3e74810b4c5e91 Mon Sep 17 00:00:00 2001 From: woutdenolf <woutdenolf@users.sf.net> Date: Thu, 16 Jan 2025 09:53:40 +0100 Subject: [PATCH 3/4] fix blissdata issue --- CHANGELOG.md | 10 +++++++++- pyproject.toml | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 54c1bb4..e4a8932 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,14 @@ # CHANGELOG.md -## (unreleased) +## Unreleased + +Changes: + +- Drop Python 3.6 and 3.7 + +Dependency fixes: + +- `blissdata` uses a private method from `silx` which is removed since `2.2`. ## 0.6.0 diff --git a/pyproject.toml b/pyproject.toml index 0941606..26e6b5f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,7 +19,7 @@ classifiers = [ requires-python = ">=3.8" dependencies = [ "h5py >=2.8", - "silx >=1.1.0", + "silx >=1.1.0,<2.2", # blissdata MR43 "hdf5plugin", "blissdata >=0.3.4", "redis", # blissdata<1 -- GitLab From 827720ab17c53381706f3301d2d46a413a73560d Mon Sep 17 00:00:00 2001 From: woutdenolf <woutdenolf@users.sf.net> Date: Thu, 16 Jan 2025 10:51:13 +0100 Subject: [PATCH 4/4] python 3.7 no longer supported --- .gitlab-ci.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ad0e126..5d52e5a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -24,11 +24,6 @@ variables: pip install --pre blissdata fi -test-3.7: - extends: .test-3.7 - variables: - PYTEST_WARNINGS: '-W error ${IGNORE_WARNINGS}' - test-3.8: extends: .test-3.8 variables: -- GitLab