Skip to content

Commit 788839a

Browse files
authored
Merge pull request #1067 from mdekstrand/tweak/data-modules
Data cleanup: private submodules, rename AttributeSet -> EntityAttribute, type cleanup
2 parents b148ed0 + 6c3ec66 commit 788839a

80 files changed

Lines changed: 372 additions & 349 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/check-sources.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
- name: 🕶️ Install uv
5858
uses: astral-sh/setup-uv@v7
5959
with:
60-
python-version: "3.12"
60+
python-version: "3.14"
6161
activate-environment: true
6262

6363
- name: Install packages

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- name: 🕶️ Install uv
3232
uses: astral-sh/setup-uv@v7
3333
with:
34-
python-version: "3.12"
34+
python-version: "3.14"
3535
activate-environment: true
3636

3737
- name: 📦 Set up Python dependencies

.github/workflows/package.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- name: 🕶️ Install uv
3232
uses: astral-sh/setup-uv@v7
3333
with:
34-
python-version: "3.12"
34+
python-version: "3.12.5"
3535
activate-environment: true
3636

3737
- name: Install dependencies
@@ -100,7 +100,7 @@ jobs:
100100
101101
- uses: actions/setup-python@v5
102102
with:
103-
python-version: "3.12"
103+
python-version: "3.12.5"
104104
architecture: ${{matrix.plat.pyarch}}
105105

106106
- name: Build wheels
@@ -145,7 +145,7 @@ jobs:
145145
- name: 🕶️ Install uv
146146
uses: astral-sh/setup-uv@v7
147147
with:
148-
python-version: "3.12"
148+
python-version: "3.12.5"
149149
activate-environment: true
150150

151151
- name: Set up Rclone configuration

.github/workflows/test.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
fail-fast: false
2222
matrix:
2323
python:
24-
- "3.12"
24+
- "3.12.5"
2525
- "3.13"
2626
- "3.14"
2727
- "3.14t"
@@ -118,7 +118,7 @@ jobs:
118118

119119
- name: 📦 Set up Python dependencies
120120
run: |
121-
uv sync -p 3.12
121+
uv sync -p 3.12.5
122122
123123
- name: 🏃🏻‍➡️ Test LKPY
124124
run: |
@@ -157,7 +157,7 @@ jobs:
157157
- name: 🕶️ Install uv
158158
uses: astral-sh/setup-uv@v7
159159
with:
160-
python-version: "3.12"
160+
python-version: "3.12.5"
161161
activate-environment: true
162162

163163
- name: 📦 Set up Python dependencies
@@ -209,7 +209,7 @@ jobs:
209209
- name: 🕶️ Install uv
210210
uses: astral-sh/setup-uv@v7
211211
with:
212-
python-version: "3.12"
212+
python-version: "3.12.5"
213213
activate-environment: true
214214

215215
- name: 📦 Set up Python dependencies
@@ -263,7 +263,7 @@ jobs:
263263
- name: 🕶️ Install uv
264264
uses: astral-sh/setup-uv@v7
265265
with:
266-
python-version: "3.12"
266+
python-version: "3.12.5"
267267
activate-environment: true
268268

269269
- name: 📦 Set up Python dependencies (Unix)
@@ -326,7 +326,7 @@ jobs:
326326
- name: 🕶️ Install uv
327327
uses: astral-sh/setup-uv@v7
328328
with:
329-
python-version: "3.12"
329+
python-version: "3.12.5"
330330
activate-environment: true
331331

332332
- name: 📦 Set up Python dependencies (Unix)
@@ -399,7 +399,7 @@ jobs:
399399
- name: 🕶️ Install uv
400400
uses: astral-sh/setup-uv@v7
401401
with:
402-
python-version: "3.12"
402+
python-version: "3.12.5"
403403
activate-environment: true
404404

405405
- name: 📦 Set up Python dependencies

docs/releases/2026.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,13 @@ Breaking Changes
3535
- Many submodules (such as most modules under :mod:`lenskit.pipeline`) have been
3636
renamed to be private modules. Code importing from their original locations
3737
will need to be updated to import from the higher-level module (:issue:`947`).
38-
- LensKit now requires Python 3.12 or newer, along with NumPy 2.x, Pandas 2.3 or
39-
newer, and SciPy 1.13 or newer (see :ref:`dep-policy`, :pr:`954`).
38+
- The ``AttributeSet`` class has been renamed to
39+
:class:`~lenskit.data.EntityAttribute` (:issue:`946`), to better clarify its
40+
design and role.
41+
- LensKit now requires Python 3.12.5 or newer, along with NumPy 2.x, Pandas 2.3
42+
or newer, and SciPy 1.13 or newer (see :ref:`dep-policy`, :pr:`954`). Earlier
43+
versions of Python 3.12 have a bug in the standard library that affects
44+
LensKit.
4045
- We no longer publish 32-bit binary wheels.
4146
- Removed ``DecomposedMetric``, as the :class:`~lenskit.metrics.Metric` interface
4247
is now decomposed. All metrics based on listwise measurements or intermediate

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ classifiers = [
1414
"Operating System :: OS Independent",
1515
"Intended Audience :: Science/Research",
1616
]
17-
requires-python = ">= 3.12"
17+
requires-python = ">= 3.12.5"
1818
readme = "README.md"
1919
license = "MIT"
2020
license-files = ["LICENSE.md"]

src/lenskit/basic/composite.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
import numpy as np
1212

13-
from lenskit.data.items import ItemList
13+
from lenskit.data import ItemList
1414
from lenskit.pipeline import Component, Lazy
1515

1616
_logger = logging.getLogger(__name__)

src/lenskit/basic/history.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
import pandas as pd
1818
from typing_extensions import override
1919

20-
from lenskit.data import Dataset, ItemList, QueryInput, RecQuery
21-
from lenskit.data.dataset import MatrixRelationshipSet
20+
from lenskit.data import Dataset, ItemList, MatrixRelationshipSet, QueryInput, RecQuery
2221
from lenskit.diagnostics import DataError
2322
from lenskit.logging import get_logger, trace
2423
from lenskit.pipeline import Component

src/lenskit/basic/random.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
import numpy as np
88
from pydantic import BaseModel
99

10-
from lenskit.data import ItemList
11-
from lenskit.data.query import QueryInput, RecQuery
10+
from lenskit.data import ItemList, QueryInput, RecQuery
1211
from lenskit.pipeline import Component
1312
from lenskit.random import DerivableSeed, RNGFactory, derivable_rng
1413

src/lenskit/cli/data/describe.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
from rich.console import Console
1313
from rich.markdown import Markdown
1414

15+
from lenskit.data import Dataset
16+
from lenskit.data._summary import save_stats
1517
from lenskit.data.amazon import load_amazon_ratings
16-
from lenskit.data.dataset import Dataset
1718
from lenskit.data.movielens import load_movielens
18-
from lenskit.data.summary import save_stats
1919
from lenskit.logging import get_logger
2020

2121
_log = get_logger(__name__)

0 commit comments

Comments
 (0)