From 1d9b0a7e799458c56cdaea6f5e81fa39a86ce875 Mon Sep 17 00:00:00 2001 From: jolaem Date: Wed, 11 Jun 2025 15:42:58 +0100 Subject: [PATCH 1/5] Switch build to setuptools Build was previously using poetry which wasn't setting correct versions for packages when building with pypi, which caused the package to fall over when using cli. Setuptools has fixed the issue. --- pyproject.toml | 88 +++++++++++++++++++++++++++----------------------- 1 file changed, 48 insertions(+), 40 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index eabaa46..96c75db 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,49 +1,57 @@ -[tool.poetry] +[build-system] +requires = ["setuptools>=61.0", "wheel"] +build-backend = "setuptools.build_meta" + +[project] name = "empiarreader" -version = "0.0.11" +version = "0.0.12" description = "EMPIARReader provides utilities to lazily load data from EMPIAR into a machine-learning-friendly dataset format or to locally download the files." -authors = ["mooniean ", "ots22 "] readme = "README.md" +requires-python = ">=3.8" +authors = [ + { name = "mooniean", email = "bcostagomes@turing.ac.uk" }, + { name = "ots22", email = "ostrickson@turing.ac.uk" }, + { name = "jolaem", email = "jola.mirecka@stfc.ac.uk" }, + { name = "marjanfamili", email = "mfamili@turing.ac.uk"}, + { name = "crangelsmith", email = "crangelsmith@turing.ac.uk"} +] +dependencies = [ + "intake>=0.6.6", + "bs4>=0.0.1", + "matplotlib>=3.6.1", + "requests>=2.28.1", + "scikit-image>=0.19.3", + "xarray>=2022.9.0", + "mrcfile>=1.4.3", + "starfile>=0.4.11", + "intake-xarray>=0.6.1", + "aiohttp>=3.8.3", + "setuptools>=67.7.2", + "pre-commit>=3.3.3", + "numpy==1.23.3" +] + +[project.optional-dependencies] +doc = [ + "Sphinx>=5.0.0", + "pydata-sphinx-theme>=0.7" +] +dev = [ + "pytest>=6.2.5" +] + +[project.urls] +Homepage = "https://github.com/alan-turing-institute/empiarreader" +"Bug Tracker" = "https://github.com/alan-turing-institute/empiarreader/issues" -[tool.poetry.dependencies] -python = "^3.8" -intake = "^0.6.6" -bs4 = "^0.0.1" -matplotlib = "^3.6.1" -requests = "^2.28.1" -scikit-image = "^0.19.3" -xarray = "^2022.9.0" -mrcfile = "^1.4.3" -starfile = "^0.4.11" -intake-xarray = "^0.6.1" -aiohttp = "^3.8.3" -setuptools = "^67.7.2" -pre-commit = "^3.3.3" -numpy = "1.23.3" - -# Dependencies for 'extras' -Sphinx = { version = "^5.0.0", optional = true } -pydata-sphinx-theme = { version = "^0.7", optional = true } - -[tool.poetry.dev-dependencies] -pytest = "^6.2.5" +[project.scripts] +empiarreader = "empiarreader.cli:main" -[tool.poetry.extras] -doc = ["Sphinx", "pydata-sphinx-theme"] +[tool.setuptools.packages.find] +where = ["."] +include = ["empiarreader*"] -[build-system] -requires = ["poetry-core @ git+https://github.com/python-poetry/poetry-core.git@main"] -build-backend = "poetry.core.masonry.api" - -[tool.poetry.plugins."intake.drivers"] +[project.entry-points."intake.drivers"] mrc = "empiarreader:MrcSource" star = "empiarreader:StarSource" empiar = "empiarreader:EmpiarCatalog" - -[tool.poetry.scripts] -empiarreader = "empiarreader.cli:main" - -[tool.poetry.urls] -"Homepage" = "https://github.com/alan-turing-institute/empiarreader" -"Bug Tracker" = "https://github.com/alan-turing-institute/empiarreader/issues" - From 3745e79d27e5716910589afee927191877ae12ad Mon Sep 17 00:00:00 2001 From: jolaem Date: Wed, 11 Jun 2025 16:16:48 +0100 Subject: [PATCH 2/5] Accidentally added caked authors to this package. removed now. --- pyproject.toml | 3 --- 1 file changed, 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 96c75db..d2777c2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,9 +11,6 @@ requires-python = ">=3.8" authors = [ { name = "mooniean", email = "bcostagomes@turing.ac.uk" }, { name = "ots22", email = "ostrickson@turing.ac.uk" }, - { name = "jolaem", email = "jola.mirecka@stfc.ac.uk" }, - { name = "marjanfamili", email = "mfamili@turing.ac.uk"}, - { name = "crangelsmith", email = "crangelsmith@turing.ac.uk"} ] dependencies = [ "intake>=0.6.6", From 10c6e455d03824ebc019840b968112d48711d85e Mon Sep 17 00:00:00 2001 From: jolaem Date: Wed, 11 Jun 2025 16:26:04 +0100 Subject: [PATCH 3/5] Update package structure --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d2777c2..dac2985 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,7 +45,7 @@ Homepage = "https://github.com/alan-turing-institute/empiarreader" empiarreader = "empiarreader.cli:main" [tool.setuptools.packages.find] -where = ["."] +where = ["src"] include = ["empiarreader*"] [project.entry-points."intake.drivers"] From b373d43a863c44a50e68d106f107153abe2bbcec Mon Sep 17 00:00:00 2001 From: jolaem Date: Wed, 11 Jun 2025 16:27:34 +0100 Subject: [PATCH 4/5] Update homepage and bugs URLs to ccp-em github --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index dac2985..20b425c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,8 +38,8 @@ dev = [ ] [project.urls] -Homepage = "https://github.com/alan-turing-institute/empiarreader" -"Bug Tracker" = "https://github.com/alan-turing-institute/empiarreader/issues" +Homepage = "https://github.com/ccpem/empiarreader" +"Bug Tracker" = "https://github.com/ccpem/empiarreader" [project.scripts] empiarreader = "empiarreader.cli:main" From 9d33298c38704027e9945f998c6479f288e5fa9e Mon Sep 17 00:00:00 2001 From: jolaem Date: Fri, 13 Jun 2025 16:08:30 +0100 Subject: [PATCH 5/5] Add jinja to pyproject --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 20b425c..1682cea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,7 +25,8 @@ dependencies = [ "aiohttp>=3.8.3", "setuptools>=67.7.2", "pre-commit>=3.3.3", - "numpy==1.23.3" + "numpy==1.23.3", + "jinja2==3.1.0" ] [project.optional-dependencies]