NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.67k stars 13.81k forks source link

Package request: python3.lida #289898

Open hakan-demirli opened 7 months ago

hakan-demirli commented 7 months ago

Project description Automatic Generation of Visualizations and Infographics using Large Language Models

LIDA is a library for generating data visualizations and data-faithful infographics. LIDA is grammar agnostic (will work with any programming language and visualization libraries e.g. matplotlib, seaborn, altair, d3 etc) and works with multiple large language model providers (OpenAI, Azure OpenAI, PaLM, Cohere, Huggingface).

Metadata


Add a :+1: reaction to issues you find important.

Moraxyc commented 4 months ago

One of the dependencies of lida called Kaleido is hard to package. I tried to write a derivation of lida as follows.

matplotlib-venn https://github.com/NixOS/nixpkgs/pull/312947 llmx https://github.com/NixOS/nixpkgs/pull/312953

{
  lib,
  buildPythonPackage,
  fetchPypi,
  python3,
}:

buildPythonPackage rec {
  pname = "lida";
  version = "0.0.14";
  pyproject = true;

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-/az6hS8rNPxb8cDiz9SOyUBi/X48r9prJNFUnx1wPHM=";
  };

  build-system = [ 
    python3.pkgs.setuptools-scm 
    python3.pkgs.setuptools
  ];

  dependencies = with python3.pkgs; [
    pydantic
    uvicorn
    typer
    fastapi
    python-multipart
    scipy
    numpy
    pandas
    matplotlib
    altair
    seaborn
    plotly
    plotnine
    statsmodels
    networkx
    geopandas
    matplotlib-venn
    wordcloud
    llmx
    kaleido
  ];

  meta = with lib; {
    description = "LIDA: Automatic Generation of Visualizations from Data";
    homepage = "https://github.com/microsoft/lida";
    mainProgram = "lida";
    license = licenses.mit;
    maintainers = with maintainers; [  ];
  };
}
Sigmanificient commented 2 months ago

@Moraxyc I have a working derivation for kaleido