Skip to content

Commit

Permalink
python312Packages.groq: init at 0.11.0
Browse files Browse the repository at this point in the history
  • Loading branch information
GiulioCocconi committed Sep 16, 2024
1 parent cc70fa3 commit 388445c
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 0 deletions.
71 changes: 71 additions & 0 deletions pkgs/development/python-modules/groq/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
lib,
buildPythonPackage,
pytestCheckHook,
pytest-asyncio,
dirty-equals,
fetchPypi,
hatch-fancy-pypi-readme,
hatchling,
cached-property,
distro,
httpx,
pydantic,
sniffio,
anyio,
typing-extensions,
}:

buildPythonPackage rec {
pname = "groq";
version = "0.11.0";
pyproject = true;

src = fetchPypi {
inherit pname version;
hash = "sha256-27mu/t84jd1IAex78+un9e22eUj+wM0oKdlyRAWfQqc=";
};

patches = [ ./ignore-warnings-pytest.patch ];

build-system = [
hatch-fancy-pypi-readme
hatchling
];

nativeCheckInputs = [
pytestCheckHook
pytest-asyncio
dirty-equals
];

pytestFlagsArray = [
"--ignore=tests/api_resources"
"--ignore=tests/test_client.py"
];

disabledTests = [
"test_response"
];

dependencies = [
anyio
distro
httpx
pydantic
sniffio
typing-extensions
];

pythonImportsCheck = [
"groq"
];

meta = {
description = "Official Python library for the groq API";
homepage = "https://github.com/groq/groq-python/";
changelog = "https://github.com/groq/groq-python/blob/v${version}/CHANGELOG.md";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ giuliococconi ];
};
}
13 changes: 13 additions & 0 deletions pkgs/development/python-modules/groq/ignore-warnings-pytest.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff a/pyproject.toml b/pyproject.toml
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -138,9 +138,6 @@ testpaths = ["tests"]
addopts = "--tb=short"
xfail_strict = true
asyncio_mode = "auto"
-filterwarnings = [
- "error"
-]

[tool.pyright]
# this enables practically every flag given by pyright.
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5375,6 +5375,8 @@ self: super: with self; {

greynoise = callPackage ../development/python-modules/greynoise { };

groq = callPackage ../development/python-modules/groq { };

growattserver = callPackage ../development/python-modules/growattserver { };

gridnet = callPackage ../development/python-modules/gridnet { };
Expand Down

0 comments on commit 388445c

Please sign in to comment.