From 783435421ca9f62c4da18f082f793002bf66358a Mon Sep 17 00:00:00 2001 From: tomsail Date: Fri, 1 Mar 2024 12:45:48 +0100 Subject: [PATCH] [pipy] refactor into xarray-selafin --- poetry.lock | 2 +- pyproject.toml | 10 +++++----- setup.cfg | 10 +++++----- setup.py | 16 +++++++++------- .../Serafin.py | 0 .../__init__.py | 0 .../data/Serafin_var2D.csv | 0 .../data/Serafin_var3D.csv | 0 .../variable/__init__.py | 0 .../variable/variables_2d.py | 0 .../variable/variables_3d.py | 0 .../variable/variables_utils.py | 0 .../xarray_backend.py | 2 +- 13 files changed, 21 insertions(+), 19 deletions(-) rename {xarray_selafin_backend => xarray_selafin}/Serafin.py (100%) rename {xarray_selafin_backend => xarray_selafin}/__init__.py (100%) rename {xarray_selafin_backend => xarray_selafin}/data/Serafin_var2D.csv (100%) rename {xarray_selafin_backend => xarray_selafin}/data/Serafin_var3D.csv (100%) rename {xarray_selafin_backend => xarray_selafin}/variable/__init__.py (100%) rename {xarray_selafin_backend => xarray_selafin}/variable/variables_2d.py (100%) rename {xarray_selafin_backend => xarray_selafin}/variable/variables_3d.py (100%) rename {xarray_selafin_backend => xarray_selafin}/variable/variables_utils.py (100%) rename {xarray_selafin_backend => xarray_selafin}/xarray_backend.py (99%) diff --git a/poetry.lock b/poetry.lock index 84fd906..5e6be85 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1121,4 +1121,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = ">=3.9" -content-hash = "970f9196f91856d7fbd951a6db6275e6f7bccb157e60a462df67346849759107" +content-hash = "41acc43ee1c719f038459b4949fd9517fd1d9640ca84c0ab8b2fb3abe504b83a" diff --git a/pyproject.toml b/pyproject.toml index 9a80c47..fa2d914 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,13 +1,13 @@ [tool.poetry] -name = "xarray-selafin-backend" -version = "0.1.3-beta1" +name = "xarray-selafin" +version = "0.1.1" description = "" authors = ["tomsail ", "lucduron "] readme = "README.md" repository = "https://github.com/seareport/xarray-selafin/" include = [ - "xarray_selafin_backend/data/*", - "xarray_selafin_backend/variable/*" + "xarray_selafin/data/*", + "xarray_selafin/variable/*" ] [tool.poetry.dependencies] @@ -23,7 +23,7 @@ netcdf4 = "*" dask = "*" [tool.poetry.plugins."xarray.backends"] -selafin = "xarray_selafin_backend.xarray_backend:SelafinBackendEntrypoint" +selafin = "xarray_selafin.xarray_backend:SelafinBackendEntrypoint" [tool.poetry.group.dev.dependencies] matplotlib = "*" diff --git a/setup.cfg b/setup.cfg index 27d4964..75a3274 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] -name = xarray-selafin-backend -version = 0.1.3-beta1 +name = xarray-selafin +version = 0.1.1 author = tomsail, lucduron author_email = saillour.thomas@gmail.com, l.duron@cnr.tm.fr description = https://github.com/seareport/xarray-selafin @@ -21,14 +21,14 @@ include_package_data = True packages = find: [options.package_data] -xarray_selafin_backend = data/*, variable/* +xarray_selafin = data/*, variable/* [options.extras_require] -dask = +dask = dask dev = matplotlib [options.entry_points] xarray.backends = - selafin = xarray_selafin_backend.xarray_backend:SelafinBackendEntrypoint + selafin = xarray_selafin.xarray_backend:SelafinBackendEntrypoint diff --git a/setup.py b/setup.py index 87bf445..4e85bc1 100644 --- a/setup.py +++ b/setup.py @@ -1,15 +1,15 @@ -from setuptools import setup, find_packages +from setuptools import find_packages +from setuptools import setup setup( - name="xarray-selafin-backend", - version="0.1.3-beta1", + name="xarray-selafin", + version="0.1.1", author=["tomsail", "lucduron"], author_email="l.duron@cnr.tm.fr", description="https://github.com/seareport/xarray-selafin", packages=find_packages(), package_data={ - # If your data files are in a package called 'xarray_selafin_backend' under 'data' - "xarray_selafin_backend": ["data/*", "variable/*"], + "xarray_selafin": ["data/*", "variable/*"], }, install_requires=[ "numpy", @@ -21,11 +21,13 @@ ], extras_require={ "dask": ["dask"], - "dev": ["matplotlib"], # Assuming netcdf4 is listed intentionally in both main and dev dependencies + "dev": [ + "matplotlib" + ], # Assuming netcdf4 is listed intentionally in both main and dev dependencies }, entry_points={ "xarray.backends": [ - "selafin = xarray_selafin_backend.xarray_backend:SelafinBackendEntrypoint", + "selafin = xarray_selafin.xarray_backend:SelafinBackendEntrypoint", ], }, python_requires=">=3.9", diff --git a/xarray_selafin_backend/Serafin.py b/xarray_selafin/Serafin.py similarity index 100% rename from xarray_selafin_backend/Serafin.py rename to xarray_selafin/Serafin.py diff --git a/xarray_selafin_backend/__init__.py b/xarray_selafin/__init__.py similarity index 100% rename from xarray_selafin_backend/__init__.py rename to xarray_selafin/__init__.py diff --git a/xarray_selafin_backend/data/Serafin_var2D.csv b/xarray_selafin/data/Serafin_var2D.csv similarity index 100% rename from xarray_selafin_backend/data/Serafin_var2D.csv rename to xarray_selafin/data/Serafin_var2D.csv diff --git a/xarray_selafin_backend/data/Serafin_var3D.csv b/xarray_selafin/data/Serafin_var3D.csv similarity index 100% rename from xarray_selafin_backend/data/Serafin_var3D.csv rename to xarray_selafin/data/Serafin_var3D.csv diff --git a/xarray_selafin_backend/variable/__init__.py b/xarray_selafin/variable/__init__.py similarity index 100% rename from xarray_selafin_backend/variable/__init__.py rename to xarray_selafin/variable/__init__.py diff --git a/xarray_selafin_backend/variable/variables_2d.py b/xarray_selafin/variable/variables_2d.py similarity index 100% rename from xarray_selafin_backend/variable/variables_2d.py rename to xarray_selafin/variable/variables_2d.py diff --git a/xarray_selafin_backend/variable/variables_3d.py b/xarray_selafin/variable/variables_3d.py similarity index 100% rename from xarray_selafin_backend/variable/variables_3d.py rename to xarray_selafin/variable/variables_3d.py diff --git a/xarray_selafin_backend/variable/variables_utils.py b/xarray_selafin/variable/variables_utils.py similarity index 100% rename from xarray_selafin_backend/variable/variables_utils.py rename to xarray_selafin/variable/variables_utils.py diff --git a/xarray_selafin_backend/xarray_backend.py b/xarray_selafin/xarray_backend.py similarity index 99% rename from xarray_selafin_backend/xarray_backend.py rename to xarray_selafin/xarray_backend.py index b6cd7a1..3ce651c 100644 --- a/xarray_selafin_backend/xarray_backend.py +++ b/xarray_selafin/xarray_backend.py @@ -8,7 +8,7 @@ from xarray.backends import BackendEntrypoint from xarray.core import indexing -from xarray_selafin_backend import Serafin +from . import Serafin def compute_duration_between_datetime(t0, time_serie):