From 69d98e77e1e1db8d97040649f9f146a8ced90ce0f466d0bdccbd3580093eeed0 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Thu, 29 Feb 2024 09:03:48 +0000 Subject: [PATCH] Accepting request 1152520 from home:bnavigator:branches:devel:languages:python:numeric required by quimb update OBS-URL: https://build.opensuse.org/request/show/1152520 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-cotengra?expand=0&rev=1 --- .gitattributes | 23 +++++++++++ .gitignore | 1 + cotengra-0.5.6.tar.gz | 3 ++ python-cotengra.changes | 4 ++ python-cotengra.spec | 91 +++++++++++++++++++++++++++++++++++++++++ 5 files changed, 122 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 cotengra-0.5.6.tar.gz create mode 100644 python-cotengra.changes create mode 100644 python-cotengra.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/cotengra-0.5.6.tar.gz b/cotengra-0.5.6.tar.gz new file mode 100644 index 0000000..24c12fe --- /dev/null +++ b/cotengra-0.5.6.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4e8ab61ea569eced25b602ca72aae0854f8825da76190664fe9c1414a55499cb +size 3234463 diff --git a/python-cotengra.changes b/python-cotengra.changes new file mode 100644 index 0000000..910e357 --- /dev/null +++ b/python-cotengra.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Tue Feb 27 20:19:35 UTC 2024 - Ben Greiner + +- Initial specfile for v0.5.6 required by quimb diff --git a/python-cotengra.spec b/python-cotengra.spec new file mode 100644 index 0000000..373f00c --- /dev/null +++ b/python-cotengra.spec @@ -0,0 +1,91 @@ +# +# spec file for package python-cotengra +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: python-cotengra +Version: 0.5.6 +Release: 0 +Summary: Hyper optimized contraction trees for large tensor networks and einsums +License: Apache-2.0 +URL: https://github.com/jcmgray/cotengra +Source: https://files.pythonhosted.org/packages/source/c/cotengra/cotengra-%{version}.tar.gz +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools >= 45} +BuildRequires: %{python_module setuptools_scm >= 6.2} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-autoray +Recommends: python-cotengrust +Recommends: python-cytoolz +Recommends: python-kahypar +Recommends: python-networkx +Recommends: python-numpy +Recommends: python-opt-einsum +Recommends: python-optuna +Recommends: python-ray +# SECTION test requirements +BuildRequires: %{python_module altair} +BuildRequires: %{python_module autoray} +BuildRequires: %{python_module dask} +BuildRequires: %{python_module matplotlib} +BuildRequires: %{python_module networkx} +BuildRequires: %{python_module numpy} +BuildRequires: %{python_module opt-einsum} +BuildRequires: %{python_module pytest-xdist} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module seaborn} +BuildRequires: %{python_module tqdm} +# /SECTION +BuildArch: noarch +%python_subpackages + +%description +A python library for contracting tensor networks or einsum expressions involving large numbers of tensors. +Some of the key feautures of cotengra include: + * drop-in einsum replacement + * an explicit contraction tree object that can be flexibly built, modified and visualized + * a 'hyper optimizer' that samples trees while tuning the generating meta-paremeters + * dynamic slicing for massive memory savings and parallelism + * support for hyper edge tensor networks and thus arbitrary einsum equations + * paths that can be supplied to numpy.einsum, opt_einsum, quimb among others + * performing contractions with tensors from many libraries via cotengra, even if they don't provide einsum + or tensordot but do have (batch) matrix multiplication + +%prep +%autosetup -p1 -n cotengra-%{version} +sed -i '/addopts/d' pyproject.toml +rm cotengra/.gitattributes +# Note: ignore the rust files for now gh#jcmgray/cotengra#30 + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +%pytest -n auto + +%files %{python_files} +%doc README.md +%license LICENSE.md +%{python_sitelib}/cotengra +%{python_sitelib}/cotengra-%{version}.dist-info + +%changelog