xarray-ms 0.5.5__tar.gz → 0.5.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/.github/workflows/ci.yml +2 -2
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/.github/workflows/pre-commit.yml +1 -1
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/PKG-INFO +1 -1
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/doc/source/changelog.rst +5 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/doc/source/conf.py +1 -1
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/pyproject.toml +3 -3
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/tests/test_github.py +17 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/xarray_ms/backend/msv2/entrypoint.py +26 -5
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/.github/ISSUE_TEMPLATE.md +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/.github/dependabot.yml +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/.github/workflows/readthedocs.yml +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/.gitignore +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/.pre-commit-config.yaml +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/.readthedocs.yaml +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/LICENSE +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/README.rst +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/doc/Makefile +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/doc/make.bat +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/doc/source/api.rst +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/doc/source/index.rst +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/doc/source/install.rst +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/doc/source/introduction.rst +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/doc/source/links.rst +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/doc/source/partitioning.rst +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/doc/source/roadmap.rst +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/doc/source/tutorial.rst +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/hello.txt +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/tests/__init__.py +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/tests/conftest.py +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/tests/msv4_test_corpus/__init__.py +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/tests/msv4_test_corpus/conftest.py +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/tests/msv4_test_corpus/test_msv_corpus.py +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/tests/test_accessors.py +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/tests/test_antenna.py +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/tests/test_backend.py +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/tests/test_basic.py +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/tests/test_field_and_source.py +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/tests/test_imputation.py +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/tests/test_measures.py +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/tests/test_read.py +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/tests/test_structure.py +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/tests/test_table_utils.py +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/tests/test_utils.py +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/tests/test_zarr_roundtrip.py +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/xarray_ms/__init__.py +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/xarray_ms/backend/msv2/array.py +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/xarray_ms/backend/msv2/entrypoint_utils.py +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/xarray_ms/backend/msv2/factories/__init__.py +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/xarray_ms/backend/msv2/factories/antenna.py +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/xarray_ms/backend/msv2/factories/core.py +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/xarray_ms/backend/msv2/factories/correlated.py +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/xarray_ms/backend/msv2/factories/field_and_source.py +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/xarray_ms/backend/msv2/imputation.py +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/xarray_ms/backend/msv2/measures_adapters.py +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/xarray_ms/backend/msv2/measures_encoders.py +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/xarray_ms/backend/msv2/partition.py +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/xarray_ms/backend/msv2/structure.py +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/xarray_ms/backend/msv2/table_utils.py +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/xarray_ms/casa_types.py +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/xarray_ms/errors.py +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/xarray_ms/msv4_types.py +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/xarray_ms/query.py +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/xarray_ms/testing/__init__.py +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/xarray_ms/testing/simulator.py +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/xarray_ms/testing/utils.py +0 -0
- {xarray_ms-0.5.5 → xarray_ms-0.5.6}/xarray_ms/utils.py +0 -0
|
@@ -39,7 +39,7 @@ jobs:
|
|
|
39
39
|
python-version: ${{ matrix.python-version }}
|
|
40
40
|
|
|
41
41
|
- name: Checkout source
|
|
42
|
-
uses: actions/checkout@
|
|
42
|
+
uses: actions/checkout@v7
|
|
43
43
|
with:
|
|
44
44
|
fetch-depth: 1
|
|
45
45
|
|
|
@@ -88,7 +88,7 @@ jobs:
|
|
|
88
88
|
python-version: 3.11
|
|
89
89
|
|
|
90
90
|
- name: Checkout source
|
|
91
|
-
uses: actions/checkout@
|
|
91
|
+
uses: actions/checkout@v7
|
|
92
92
|
with:
|
|
93
93
|
fetch-depth: 1
|
|
94
94
|
|
|
@@ -3,6 +3,11 @@
|
|
|
3
3
|
Changelog
|
|
4
4
|
=========
|
|
5
5
|
|
|
6
|
+
0.5.6 (26-06-2026)
|
|
7
|
+
------------------
|
|
8
|
+
* Resolve ``file://`` URIs to local filesystem paths (:pr:`164`)
|
|
9
|
+
* Introduce ``pytest != 9.1.0`` version restriction (:pr:`162`)
|
|
10
|
+
|
|
6
11
|
0.5.5 (12-06-2026)
|
|
7
12
|
------------------
|
|
8
13
|
* Upgrade to arcae 0.5.2 (:pr:`161`)
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
project = "xarray-ms"
|
|
12
12
|
copyright = "2024 - 2025 NRF (SARAO) and Rhodes University (RATT) Centre"
|
|
13
13
|
author = "Simon Perkins"
|
|
14
|
-
release = "0.5.
|
|
14
|
+
release = "0.5.6"
|
|
15
15
|
|
|
16
16
|
# -- General configuration ---------------------------------------------------
|
|
17
17
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "xarray-ms"
|
|
3
|
-
version = "0.5.
|
|
3
|
+
version = "0.5.6"
|
|
4
4
|
description = "xarray MSv4 views over MSv2 Measurement Sets"
|
|
5
5
|
authors = [{name = "Simon Perkins", email = "simon.perkins@gmail.com"}]
|
|
6
6
|
readme = "README.rst"
|
|
@@ -14,7 +14,7 @@ dependencies = [
|
|
|
14
14
|
|
|
15
15
|
[dependency-groups]
|
|
16
16
|
test = [
|
|
17
|
-
"pytest>=8.0.0",
|
|
17
|
+
"pytest>=8.0.0,!=9.1.0",
|
|
18
18
|
"dask>=2024.5.0",
|
|
19
19
|
"distributed>=2024.5.0",
|
|
20
20
|
"zarr>=2.18.3, <3.0.0",
|
|
@@ -55,7 +55,7 @@ extend-select = ["I"]
|
|
|
55
55
|
# github_url = "https://github.com/<user or organization>/<project>/"
|
|
56
56
|
|
|
57
57
|
[tool.tbump.version]
|
|
58
|
-
current = "0.5.
|
|
58
|
+
current = "0.5.6"
|
|
59
59
|
|
|
60
60
|
# Example of a semver regexp.
|
|
61
61
|
# Make sure this matches current_version before
|
|
@@ -1,6 +1,23 @@
|
|
|
1
1
|
import xarray
|
|
2
2
|
|
|
3
3
|
|
|
4
|
+
def test_gh157(simmed_ms):
|
|
5
|
+
"""Tests that #157 is fixed
|
|
6
|
+
|
|
7
|
+
``file://`` URIs are resolved to local filesystem paths.
|
|
8
|
+
|
|
9
|
+
https://github.com/ratt-ru/xarray-ms/issues/157
|
|
10
|
+
"""
|
|
11
|
+
reference = xarray.open_datatree(simmed_ms)
|
|
12
|
+
|
|
13
|
+
for uri in (f"file://{simmed_ms}", f"file://localhost{simmed_ms}"):
|
|
14
|
+
dt = xarray.open_datatree(uri)
|
|
15
|
+
assert dt.children.keys() == reference.children.keys()
|
|
16
|
+
|
|
17
|
+
ds = xarray.open_dataset(uri)
|
|
18
|
+
assert ds.sizes == reference[next(iter(reference.children))].ds.sizes
|
|
19
|
+
|
|
20
|
+
|
|
4
21
|
def test_gh116(simmed_ms):
|
|
5
22
|
"""Tests that #116 is fixed
|
|
6
23
|
|
|
@@ -5,10 +5,13 @@ import warnings
|
|
|
5
5
|
from datetime import datetime, timezone
|
|
6
6
|
from importlib.metadata import version as importlib_version
|
|
7
7
|
from typing import TYPE_CHECKING, Any, Dict, Iterable, List, Mapping
|
|
8
|
+
from urllib.parse import urlparse
|
|
9
|
+
from urllib.request import url2pathname
|
|
8
10
|
|
|
9
11
|
import xarray
|
|
10
12
|
from xarray.backends import BackendEntrypoint
|
|
11
|
-
from xarray.backends.common import AbstractWritableDataStore
|
|
13
|
+
from xarray.backends.common import AbstractWritableDataStore
|
|
14
|
+
from xarray.backends.common import _normalize_path as _xr_normalize_path
|
|
12
15
|
from xarray.backends.store import StoreBackendEntrypoint
|
|
13
16
|
from xarray.core.dataset import Dataset
|
|
14
17
|
from xarray.core.datatree import DataTree
|
|
@@ -75,6 +78,26 @@ def promote_chunks(
|
|
|
75
78
|
return return_chunks
|
|
76
79
|
|
|
77
80
|
|
|
81
|
+
def _normalize_path(
|
|
82
|
+
filename_or_obj: str | os.PathLike[Any] | BufferedIOBase | AbstractDataStore,
|
|
83
|
+
):
|
|
84
|
+
"""Normalize the input path, additionally converting ``file://`` URIs
|
|
85
|
+
into local filesystem paths.
|
|
86
|
+
|
|
87
|
+
CASA Measurement Sets are local directories, so a ``file://`` URI
|
|
88
|
+
is resolved to the path it refers to before being handed to the backend.
|
|
89
|
+
"""
|
|
90
|
+
if isinstance(filename_or_obj, str):
|
|
91
|
+
parsed = urlparse(filename_or_obj)
|
|
92
|
+
if parsed.scheme == "file":
|
|
93
|
+
# An empty or "localhost" netloc refers to the local machine.
|
|
94
|
+
# A non-empty netloc denotes a host (e.g. a Windows UNC path).
|
|
95
|
+
netloc = "" if parsed.netloc == "localhost" else parsed.netloc
|
|
96
|
+
filename_or_obj = url2pathname(netloc + parsed.path)
|
|
97
|
+
|
|
98
|
+
return _xr_normalize_path(filename_or_obj)
|
|
99
|
+
|
|
100
|
+
|
|
78
101
|
class MSv2Store(AbstractWritableDataStore):
|
|
79
102
|
"""Store for reading and writing MSv2 data"""
|
|
80
103
|
|
|
@@ -453,10 +476,8 @@ class MSv2EntryPoint(BackendEntrypoint):
|
|
|
453
476
|
"""Create a dictionary of :class:`~xarray.Dataset` presenting an MSv4 view
|
|
454
477
|
over a partition of a MSv2 CASA Measurement Set"""
|
|
455
478
|
|
|
456
|
-
if isinstance(filename_or_obj, os.PathLike):
|
|
457
|
-
ms =
|
|
458
|
-
elif isinstance(filename_or_obj, str):
|
|
459
|
-
ms = filename_or_obj
|
|
479
|
+
if isinstance(filename_or_obj, (str, os.PathLike)):
|
|
480
|
+
ms = _normalize_path(filename_or_obj)
|
|
460
481
|
else:
|
|
461
482
|
raise ValueError("Measurement Set paths must be strings")
|
|
462
483
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|