Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/python-publish-wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-testing-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]

steps:

Expand Down
32 changes: 0 additions & 32 deletions _updateversion.py

This file was deleted.

6 changes: 5 additions & 1 deletion datastock/_class1.py
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,7 @@ def get_ref_vector(
quant=None,
name=None,
units=None,
dref_vector_name=None,
# exclude from search
key_exclude=None,
ref_exclude=None,
Expand Down Expand Up @@ -670,6 +671,7 @@ def get_ref_vector(
quant=quant,
name=name,
units=units,
dref_vector_name=dref_vector_name,
# exclude from search
key_exclude=key_exclude,
ref_exclude=ref_exclude,
Expand All @@ -690,6 +692,7 @@ def get_ref_vector_common(
quant=None,
name=None,
units=None,
dref_vector_name=None,
# strategy for choosing common ref vector
strategy=None,
strategy_bounds=None,
Expand Down Expand Up @@ -726,6 +729,7 @@ def get_ref_vector_common(
quant=quant,
name=name,
units=units,
dref_vector_name=dref_vector_name,
# strategy for choosing common ref vector
strategy=strategy,
strategy_bounds=strategy_bounds,
Expand Down Expand Up @@ -1079,4 +1083,4 @@ def show_links(self):

__all__ = [
sorted([k0 for k0 in locals() if k0.startswith('DataStock')])[-1]
]
]
1 change: 0 additions & 1 deletion datastock/_class1_interpolate.py
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,6 @@ def _x01_grid(
ix1=None,
):


# ------------
# trivial case

Expand Down
28 changes: 25 additions & 3 deletions datastock/_class1_uniformize.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def get_ref_vector(
quant=None,
name=None,
units=None,
dref_vector_name=None,
# exclude from search
key_exclude=None,
ref_exclude=None,
Expand Down Expand Up @@ -141,8 +142,13 @@ def get_ref_vector(

if hasref is not False:

lp = [
('dim', dim),
('quant', quant),
('name', name),
('units', units),
]

lp = [('dim', dim), ('quant', quant), ('name', name), ('units', units)]
lk_vect = [
k0 for k0, v0 in ddata.items()
if v0['monot'] == (True,)
Expand Down Expand Up @@ -181,13 +187,18 @@ def get_ref_vector(
hasref = True

else:
lstr = [f"\t- {p0} = {p1}" for (p0, p1) in lp]
msg = (
f"Multiple possible vectors found:\n{lk_vect}\n"
f"\t- key0: {key0}\n"
f"\t- key: {key}\n"
f"\t- ref: {ref}\n"
f"\t- hasref: {hasref}\n"
f"\t- refok: {refok}\n"
+ "Provided:\n" + "\n".join(lstr) + "\n"
)
if dref_vector_name is not None:
msg += f"From '{dref_vector_name}'\n"
warnings.warn(msg)
hasvect = False
else:
Expand Down Expand Up @@ -440,6 +451,7 @@ def _get_ref_vector_find_identical(
quant=None,
name=None,
units=None,
dref_vector_name=None,
# for comparison
val=None
):
Expand All @@ -456,6 +468,7 @@ def _get_ref_vector_find_identical(
quant=quant,
name=name,
units=units,
dref_vector_name=dref_vector_name,
values=None,
indices=None,
)[:4]
Expand Down Expand Up @@ -496,6 +509,7 @@ def get_ref_vector_common(
quant=None,
name=None,
units=None,
dref_vector_name=None,
# exclude from search
key_exclude=None,
ref_exclude=None,
Expand Down Expand Up @@ -564,6 +578,7 @@ def get_ref_vector_common(
quant=quant,
name=name,
units=units,
dref_vector_name=dref_vector_name,
# exclude from search
key_exclude=key_exclude,
ref_exclude=ref_exclude,
Expand Down Expand Up @@ -741,6 +756,7 @@ def get_ref_vector_common(
quant=quant,
name=name,
units=units,
dref_vector_name=dref_vector_name,
#
dkeys=dkeys,
key_vector=key_vector,
Expand Down Expand Up @@ -772,6 +788,7 @@ def _get_ref_vector_common_values(
quant=None,
name=None,
units=None,
dref_vector_name=None,
#
dkeys=None,
key_vector=None,
Expand Down Expand Up @@ -807,6 +824,7 @@ def _get_ref_vector_common_values(
quant=quant,
name=name,
units=units,
dref_vector_name=dref_vector_name,
# exclude from search
key_exclude=key_exclude,
ref_exclude=ref_exclude,
Expand Down Expand Up @@ -972,7 +990,11 @@ def _uniformize_check(
for k0, v0 in dparam.items():
lout = [
k1 for k1 in v0['keys']
if coll.get_ref_vector(key0=k1, **{param: k0})[3] is None
if coll.get_ref_vector(
key0=k1,
dref_vector_name=f"param '{k0}'",
**{param: k0},
)[3] is None
]
if len(lout) > 0:
dfails[k0] = lout
Expand Down Expand Up @@ -1121,4 +1143,4 @@ def uniformize(
if returnas == 'dataframe':
pass

return stu
return stu
2 changes: 0 additions & 2 deletions datastock/version.py

This file was deleted.

9 changes: 6 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,16 @@ maintainers = [
keywords = [
"data", "analysis", "interactive", "heterogeneous arrays", "numpy", "Collection",
]
requires-python = ">=3.8"
# due to astropy >= 6.1 and to end-of-life of 3.9
# see https://devguide.python.org/versions/
requires-python = ">=3.10"
dependencies = [
"numpy<1.25", # for astropy compatibility vs deprecated np.product
"numpy", # for astropy compatibility vs deprecated np.product
"scipy",
"matplotlib",
# "PySide2 ; platform_system != 'Windows'",
"astropy",
# see https://github.com/ToFuProject/datastock/pull/243
"astropy>=6.1",
]


Expand Down
Loading