Unverified Commit d06cf4c5 authored by Martin Weinelt's avatar Martin Weinelt Committed by GitHub
Browse files

pretalx: add llm, openmetrics and zammad plugin (#419952)

parents 0acdb4e9 43cd1828
Loading
Loading
Loading
Loading
+50 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  setuptools,
  numpy,
  ollama,
  openai,
  python-redis-lock,
  umap-learn,
}:

buildPythonPackage rec {
  pname = "pretalx-llm";
  version = "0.5.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "why2025-datenzone";
    repo = "pretalx-llm";
    rev = "v${version}";
    hash = "sha256-Ga6Itvc+yL+p6K7w6WYTeNfxahaohDidDWnt0GtcWEM=";
  };

  build-system = [
    setuptools
  ];

  dependencies = [
    numpy
    ollama
    openai
    python-redis-lock
    umap-learn
  ];

  doCheck = false; # no tests

  pythonImportsCheck = [
    "pretalx_llm"
  ];

  meta = {
    description = "LLM support for Pretalx";
    homepage = "https://github.com/why2025-datenzone/pretalx-llm";
    changelog = "https://github.com/why2025-datenzone/pretalx-llm/blob/${src.rev}/CHANGELOG.md";
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [ hexa ];
  };
}
+40 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  setuptools,
  unstableGitUpdater,
}:

buildPythonPackage {
  pname = "pretalx-openmetrics";
  version = "unstable-2025-05-25";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "why2025-datenzone";
    repo = "pretalx-openmetrics";
    rev = "1121a5d430c403bc9aedb7ae8b1aa81219c8a58f";
    hash = "sha256-reQA61JFZsYWE/CAL28Oe60CmGANt0phXLzz9YGtDYQ=";
  };

  build-system = [
    setuptools
  ];

  doCheck = false; # no tests

  pythonImportsCheck = [
    "pretalx_openmetrics"
  ];

  # no tagged release yet
  passthru.updateScript = unstableGitUpdater { };

  meta = {
    description = "OpenMetrics instrumentation plugin";
    homepage = "https://github.com/why2025-datenzone/pretalx-openmetrics";
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [ hexa ];
  };
}
+41 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  setuptools,
  zammad-py,
}:

buildPythonPackage rec {
  pname = "pretalx-zammad";
  version = "2025.0.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "badbadc0ffee";
    repo = "pretalx-zammad";
    tag = "v${version}";
    hash = "sha256-YIKZO04vaKPGhUrTFiE4F+KjuBrYm0KsxUua5+Hm7gg=";
  };

  build-system = [
    setuptools
  ];

  dependencies = [
    zammad-py
  ];

  doCheck = false; # no tests

  pythonImportsCheck = [
    "pretalx_zammad"
  ];

  meta = {
    description = "Pretalx plugin for Zammad issue tracker";
    homepage = "https://github.com/badbadc0ffee/pretalx-zammad";
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [ hexa ];
  };
}
+53 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  poetry-core,
  requests,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "zammad-py";
  version = "3.2.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "joeirimpan";
    repo = "zammad_py";
    tag = "v${version}";
    hash = "sha256-gU5OA5m8X03GM7ImXZZVLkEyoAXRCoFskfop8oXJFH0=";
  };

  build-system = [
    poetry-core
  ];

  dependencies = [
    requests
  ];

  nativeCheckInputs = [
    pytestCheckHook
  ];

  disabledTests = [
    # requires a local zammad instance
    "test_users"
    "test_tickets"
    "test_groups"
    "test_pagination"
  ];

  pythonImportsCheck = [
    "zammad_py"
  ];

  meta = {
    changelog = "https://github.com/joeirimpan/zammad_py/blob/${src.tag}/HISTORY.rst";
    description = "Python API client for accessing zammad REST API";
    homepage = "https://github.com/joeirimpan/zammad_py";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ hexa ];
  };
}
+2 −0
Original line number Diff line number Diff line
@@ -19741,6 +19741,8 @@ self: super: with self; {
  zamg = callPackage ../development/python-modules/zamg { };
  zammad-py = callPackage ../development/python-modules/zammad-py { };
  zarr = callPackage ../development/python-modules/zarr { };
  zc-buildout = callPackage ../development/python-modules/zc-buildout { };