lol

python3Packages.lida: init at 0.0.14

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