tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
python3Packages.lida: init at 0.0.14
Moraxyc
1 year ago
c2bcbbd4
4ebae9c9
+126
3 changed files
expand all
collapse all
unified
split
pkgs
development
python-modules
lida
default.nix
rw_data.patch
top-level
python-packages.nix
+108
pkgs/development/python-modules/lida/default.nix
reviewed
···
1
1
+
{
2
2
+
lib,
3
3
+
buildPythonPackage,
4
4
+
fetchPypi,
5
5
+
setuptools,
6
6
+
setuptools-scm,
7
7
+
altair,
8
8
+
fastapi,
9
9
+
geopandas,
10
10
+
kaleido,
11
11
+
llmx,
12
12
+
matplotlib,
13
13
+
matplotlib-venn,
14
14
+
networkx,
15
15
+
numpy,
16
16
+
pandas,
17
17
+
plotly,
18
18
+
plotnine,
19
19
+
pydantic,
20
20
+
python-multipart,
21
21
+
scipy,
22
22
+
seaborn,
23
23
+
statsmodels,
24
24
+
typer,
25
25
+
uvicorn,
26
26
+
wordcloud,
27
27
+
peacasso,
28
28
+
basemap,
29
29
+
basemap-data-hires,
30
30
+
geopy,
31
31
+
}:
32
32
+
33
33
+
buildPythonPackage rec {
34
34
+
pname = "lida";
35
35
+
version = "0.0.14";
36
36
+
pyproject = true;
37
37
+
38
38
+
# No releases or tags are available in https://github.com/microsoft/lida
39
39
+
src = fetchPypi {
40
40
+
inherit pname version;
41
41
+
hash = "sha256-/az6hS8rNPxb8cDiz9SOyUBi/X48r9prJNFUnx1wPHM=";
42
42
+
};
43
43
+
44
44
+
patches = [
45
45
+
# The upstream places the data path under the py file's own directory.
46
46
+
# However, since `/nix/store` is read-only, we patch it to the user's home directory.
47
47
+
./rw_data.patch
48
48
+
];
49
49
+
50
50
+
build-system = [
51
51
+
setuptools
52
52
+
setuptools-scm
53
53
+
];
54
54
+
55
55
+
dependencies = [
56
56
+
altair
57
57
+
fastapi
58
58
+
geopandas
59
59
+
kaleido
60
60
+
llmx
61
61
+
matplotlib
62
62
+
matplotlib-venn
63
63
+
networkx
64
64
+
numpy
65
65
+
pandas
66
66
+
plotly
67
67
+
plotnine
68
68
+
pydantic
69
69
+
python-multipart
70
70
+
scipy
71
71
+
seaborn
72
72
+
statsmodels
73
73
+
typer
74
74
+
uvicorn
75
75
+
wordcloud
76
76
+
];
77
77
+
78
78
+
optional-dependencies = {
79
79
+
infographics = [
80
80
+
peacasso
81
81
+
];
82
82
+
tools = [
83
83
+
basemap
84
84
+
basemap-data-hires
85
85
+
geopy
86
86
+
];
87
87
+
transformers = [
88
88
+
llmx
89
89
+
];
90
90
+
web = [
91
91
+
fastapi
92
92
+
uvicorn
93
93
+
];
94
94
+
};
95
95
+
96
96
+
# require network
97
97
+
doCheck = false;
98
98
+
99
99
+
pythonImportsCheck = [ "lida" ];
100
100
+
101
101
+
meta = {
102
102
+
description = "Automatic Generation of Visualizations and Infographics using Large Language Models";
103
103
+
homepage = "https://github.com/microsoft/lida";
104
104
+
license = lib.licenses.mit;
105
105
+
maintainers = with lib.maintainers; [ moraxyc ];
106
106
+
mainProgram = "lida";
107
107
+
};
108
108
+
}
+16
pkgs/development/python-modules/lida/rw_data.patch
reviewed
···
1
1
+
diff --git a/lida/web/app.py b/lida/web/app.py
2
2
+
index 32046a3..599ae07 100644
3
3
+
--- a/lida/web/app.py
4
4
+
+++ b/lida/web/app.py
5
5
+
@@ -34,8 +34,9 @@ app.mount("/api", api)
6
6
+
7
7
+
root_file_path = os.path.dirname(os.path.abspath(__file__))
8
8
+
static_folder_root = os.path.join(root_file_path, "ui")
9
9
+
-files_static_root = os.path.join(root_file_path, "files/")
10
10
+
-data_folder = os.path.join(root_file_path, "files/data")
11
11
+
+home_dir = os.path.expanduser("~")
12
12
+
+files_static_root = os.path.join(home_dir, ".lida/files")
13
13
+
+data_folder = os.path.join(files_static_root, "data")
14
14
+
os.makedirs(data_folder, exist_ok=True)
15
15
+
os.makedirs(files_static_root, exist_ok=True)
16
16
+
os.makedirs(static_folder_root, exist_ok=True)
+2
pkgs/top-level/python-packages.nix
reviewed
···
7615
7615
7616
7616
license-expression = callPackage ../development/python-modules/license-expression { };
7617
7617
7618
7618
+
lida = callPackage ../development/python-modules/lida { };
7619
7619
+
7618
7620
lief = (toPythonModule (pkgs.lief.override {
7619
7621
inherit python;
7620
7622
})).py;