Skip to content

Commit 94a68a5

Browse files
committed
add uv & new methods
1 parent 4d89973 commit 94a68a5

3 files changed

Lines changed: 45 additions & 7 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,3 +140,4 @@ cython_debug/
140140

141141
# Other
142142
uml
143+
uv.lock

hyperleda/client.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,3 +101,34 @@ def add_data(self, table_id: int, data: pandas.DataFrame) -> None:
101101
"/api/v1/admin/table/data",
102102
dataclasses.asdict(model.AddDataRequestSchema(table_id, data.to_dict("records"))),
103103
)
104+
105+
def start_processing(self, table_id: int) -> None:
106+
"""
107+
Start processing the table data. Processing includes cross-identification of objects.
108+
"""
109+
_ = self._request(
110+
"POST",
111+
"/api/v1/admin/table/process",
112+
dataclasses.asdict(model.TableProcessRequestSchema(table_id)),
113+
)
114+
115+
def get_table_status_stats(self, table_id: int) -> model.TableStatusStatsResponseSchema:
116+
"""
117+
Get statistics of cross identification of the table. Shows the total number of objects
118+
in each status.
119+
"""
120+
data = self._request(
121+
"GET",
122+
"/api/v1/table/status/stats",
123+
)
124+
return model.TableStatusStatsResponseSchema(**data["data"])
125+
126+
def set_table_status(self, table_id: int, overrides: list[model.Overrides] | None = None) -> None:
127+
"""
128+
Set status of the table.
129+
"""
130+
_ = self._request(
131+
"POST",
132+
"/api/v1/admin/table/status",
133+
dataclasses.asdict(model.SetTableStatusRequestSchema(table_id, overrides)),
134+
)

pyproject.toml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
1-
[build-system]
2-
requires = ["setuptools>=61.0"]
3-
build-backend = "setuptools.build_meta"
4-
51
[project]
62
name = "hyperleda"
73
description = "Hyperleda web-service client"
84
readme = "README.md"
95
license = { file = "LICENSE" }
106
version = "0.1.0"
11-
requires-python = ">=3.10"
7+
requires-python = ">=3.13"
128
authors = [{ name = "HyperLeda Team" }]
139
keywords = ["hyperleda", "astronomy", "extragalactic"]
1410
classifiers = [
@@ -20,12 +16,22 @@ classifiers = [
2016
"Topic :: Scientific/Engineering :: Astronomy",
2117
"Topic :: Scientific/Engineering :: Physics",
2218
]
23-
dependencies = ["pandas", "requests"]
24-
19+
dependencies = [
20+
"build>=1.2.2.post1",
21+
"datamodel-code-generator>=0.26.5",
22+
"pandas>=2.2.3",
23+
"requests>=2.32.3",
24+
"ruff>=0.9.4",
25+
"setuptools>=75.8.0",
26+
]
2527

2628
[project.urls]
2729
"Homepage" = "https://github.com/HyperLEDA/client"
2830

31+
[build-system]
32+
requires = ["setuptools>=61.0"]
33+
build-backend = "setuptools.build_meta"
34+
2935
[tool.ruff]
3036
line-length = 120
3137

0 commit comments

Comments
 (0)