File python-experimentator.spec of Package python-experimentator
#
# spec file for package python-experimentator
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without test
%define skip_python2 1
Name: python-experimentator
Version: 0.3.1
Release: 0
License: MIT
Summary: Experiment builder
Url: https://github.com/hsharrison/experimentator
Group: Development/Languages/Python
Source: https://files.pythonhosted.org/packages/source/e/experimentator/experimentator-%{version}.tar.gz
# PATCH-FIX-UPSTREAM support_networkX_2.patch -- Support networkX 2.0 -- https://github.com/hsharrison/experimentator/issues/24
Patch0: support_networkX_2.patch
BuildRequires: python-rpm-macros
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
%if %{with test}
BuildRequires: %{python_module docopt}
BuildRequires: %{python_module networkx}
BuildRequires: %{python_module numpy}
BuildRequires: %{python_module pandas}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module PyYAML}
BuildRequires: %{python_module schema}
%endif
Requires: python-docopt
Requires: python-networkx >= 2
Requires: python-numpy
Requires: python-pandas
Requires: python-PyYAML
Requires: python-schema
BuildArch: noarch
Requires(post): update-alternatives
Requires(postun): update-alternatives
%python_subpackages
%description
Do you write code to run experiments? If so, you've probably had the
experience of sitting down to code an experiment but getting
side-tracked by all the logistics: crossing your independent
variables to form conditions, repeating your conditions,
randomization, storing intermediate data, etc. It's frustrating to
put all that effort in before even getting to what's really unique
about your experiment. Worse, it encourages bad coding practices
like copy-pasting boilerplate from someone else's experiment code
without understanding it.
The purpose of experimentator is to handle all the boring logistics
of running experiments and allow you to get straight to what really
interests you, whatever that may be. This package was originally
intended for behavioral experiments in which human participants are
interacting with a graphical interface, but there is nothing
domain-specific about it--it should be useful for anyone running
experiments with a computer. You might say that experimentator*is a
library for 'repeatedly calling a function while systematically
varying its inputs and saving the data' (although that doesn't do it
full justice).
%prep
%setup -q -n experimentator-%{version}
%patch0 -p1
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%python_clone -a %{buildroot}%{_bindir}/exp
%if %{with test}
%check
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib}
py.test-%{$python_bin_suffix}
}
%endif
%post
%python_install_alternative exp
%postun
%python_uninstall_alternative exp
%files %{python_files}
%defattr(-,root,root,-)
%doc LICENSE.rst README.rst changes.rst
%python_alternative %{_bindir}/exp
%{python_sitelib}/*
%changelog