-
Notifications
You must be signed in to change notification settings - Fork 145
Expand file tree
/
Copy pathgenerate_missing_polars_objects_inv.py
More file actions
61 lines (55 loc) · 1.29 KB
/
generate_missing_polars_objects_inv.py
File metadata and controls
61 lines (55 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.12"
# dependencies = [
# "sphobjinv",
# ]
# ///
#
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright the Vortex contributors
#
# https://github.com/pola-rs/polars/issues/7027#issuecomment-2661198001
import sphobjinv as soi
inv = soi.Inventory()
inv.project = "Polars"
inv.version = ""
data_obj_strs = [
soi.DataObjStr(
name="polars.DataFrame",
domain="py",
role="class",
priority="1",
uri="reference/dataframe/index.html",
dispname="DataFrame",
),
soi.DataObjStr(
name="polars.LazyFrame",
domain="py",
role="class",
priority="1",
uri="reference/lazyframe/index.html",
dispname="LazyFrame",
),
soi.DataObjStr(
name="Expr",
domain="py",
role="class",
priority="1",
uri="expressions/index.html",
dispname="Expr",
),
soi.DataObjStr(
name="Series",
domain="py",
role="class",
priority="1",
uri="series/index.html",
dispname="Series",
),
]
for data_obj_str in data_obj_strs:
inv.objects.append(data_obj_str)
text = inv.data_file()
ztext = soi.compress(text)
soi.writebytes("polars.objects.inv", ztext)