Merge pull request #280718 from fabaff/dvc-fix

python311Packages.dvc: add gto
This commit is contained in:
Fabian Affolter 2024-01-13 21:30:29 +01:00 committed by GitHub
commit 1b98e6b7e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 118 additions and 7 deletions

View File

@ -23,6 +23,7 @@
, flufl_lock
, funcy
, grandalf
, gto
, hydra-core
, importlib-metadata
, importlib-resources
@ -56,11 +57,11 @@
buildPythonPackage rec {
pname = "dvc";
version = "3.38.1";
format = "pyproject";
pyproject = true;
src = fetchFromGitHub {
owner = "iterative";
repo = pname;
repo = "dvc";
rev = "refs/tags/${version}";
hash = "sha256-P3N9wCmua0kS9vli+QUjJPZSeQXO9t8m1Ei+CeN2tEU=";
};
@ -96,6 +97,7 @@ buildPythonPackage rec {
flufl_lock
funcy
grandalf
gto
hydra-core
iterative-telemetry
networkx
@ -130,16 +132,27 @@ buildPythonPackage rec {
];
passthru.optional-dependencies = {
azure = [ dvc-azure ];
gs = [ dvc-gs ];
s3 = [ dvc-s3 ];
ssh = [ dvc-ssh ];
azure = [
dvc-azure
];
gs = [
dvc-gs
];
s3 = [
dvc-s3
];
ssh = [
dvc-ssh
];
};
# Tests require access to real cloud services
doCheck = false;
pythonImportsCheck = [ "dvc" "dvc.api" ];
pythonImportsCheck = [
"dvc"
"dvc.api"
];
meta = with lib; {
description = "Version Control System for Machine Learning Projects";

View File

@ -0,0 +1,96 @@
{ lib
, buildPythonPackage
, entrypoints
, fastentrypoints
, fetchFromGitHub
, freezegun
, funcy
, git
, pydantic
, pytest-mock
, pytest-test-utils
, pytestCheckHook
, pythonOlder
, rich
, ruamel-yaml
, scmrepo
, semver
, setuptools
, setuptools-scm
, tabulate
, typer
}:
buildPythonPackage rec {
pname = "gto";
version = "1.6.2";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "iterative";
repo = "gto";
rev = "refs/tags/${version}";
hash = "sha256-1+Owhp2otGC/FIdsSz+4vn0sZR696+zOMGNDvjM6KH8=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace ', "setuptools_scm_git_archive==1.4.1"' ""
substituteInPlace setup.cfg \
--replace " --cov=gto --cov-report=term-missing --cov-report=xml" ""
'';
nativeBuildInputs = [
fastentrypoints
setuptools
setuptools-scm
];
propagatedBuildInputs = [
entrypoints
funcy
pydantic
rich
ruamel-yaml
scmrepo
semver
tabulate
typer
];
nativeCheckInputs = [
freezegun
git
pytest-mock
pytest-test-utils
pytestCheckHook
];
preCheck = ''
export HOME=$(mktemp -d)
git config --global user.email "nobody@example.com"
git config --global user.name "Nobody"
'';
disabledTests = [
# Tests want to with a remote repo
"remote_repo"
"remote_git_repo"
"test_action_doesnt_push_even_if_repo_has_remotes_set"
];
pythonImportsCheck = [
"gto"
];
meta = with lib; {
description = "Module for Git Tag Operations";
homepage = "https://github.com/iterative/gto";
changelog = "https://github.com/iterative/gto/releases/tag/${version}";
license = licenses.asl20;
maintainers = with maintainers; [ fab ];
};
}

View File

@ -4974,6 +4974,8 @@ self: super: with self; {
gtimelog = callPackage ../development/python-modules/gtimelog { };
gto = callPackage ../development/python-modules/gto { };
gtts = callPackage ../development/python-modules/gtts { };
gtts-token = callPackage ../development/python-modules/gtts-token { };