Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-agate-stats for openSUSE:Factory checked in at 2021-05-21 21:50:20 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-agate-stats (Old) and /work/SRC/openSUSE:Factory/.python-agate-stats.new.2988 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-agate-stats" Fri May 21 21:50:20 2021 rev:2 rq:894794 version:0.4.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-agate-stats/python-agate-stats.changes 2018-05-29 16:48:02.949147876 +0200 +++ /work/SRC/openSUSE:Factory/.python-agate-stats.new.2988/python-agate-stats.changes 2021-05-21 21:50:34.674093843 +0200 @@ -1,0 +2,10 @@ +Fri May 21 08:05:59 UTC 2021 - [email protected] + +- use github release which contains tests, run them via %pytest macro +- deleted sources + - COPYING (not needed) +- added patches + fix https://github.com/wireservice/agate-stats/compare/0.4.0...master.diff + + python-agate-stats-remove-mysterious-line.patch + +------------------------------------------------------------------- Old: ---- COPYING New: ---- python-agate-stats-remove-mysterious-line.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-agate-stats.spec ++++++ --- /var/tmp/diff_new_pack.mY8fIa/_old 2021-05-21 21:50:35.134091937 +0200 +++ /var/tmp/diff_new_pack.mY8fIa/_new 2021-05-21 21:50:35.138091921 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-agate-stats # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,28 +12,30 @@ # 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/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# %{?!python_module:%define python_module() python-%{**} python3-%{**}} -%bcond_with test Name: python-agate-stats Version: 0.4.0 Release: 0 License: MIT Summary: Additional statistical methods for agate -Url: http://agate-stats.readthedocs.org/ +URL: http://agate-stats.readthedocs.org/ Group: Development/Languages/Python -Source: https://files.pythonhosted.org/packages/source/a/agate-stats/agate-stats-%{version}.tar.gz -Source10: https://raw.githubusercontent.com/wireservice/agate-stats/%{version}/COPYING +Source: https://github.com/wireservice/agate-stats/archive/refs/tags/%{version}.tar.gz#/agate-stats-%{version}.tar.gz +# https://github.com/wireservice/agate-stats/compare/0.4.0...master.diff +Patch0: python-agate-stats-remove-mysterious-line.patch BuildRequires: %{python_module devel} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros -%if %{with test} +# SECTION test requirements BuildRequires: %{python_module agate >= 1.5.0} +BuildRequires: %{python_module pytest} BuildRequires: %{python_module six >= 1.6.1} -%endif +# /SECTION Requires: python-agate >= 1.5.0 Requires: python-six >= 1.6.1 BuildArch: noarch @@ -45,7 +47,7 @@ %prep %setup -q -n agate-stats-%{version} -cp %{SOURCE10} . +%patch0 -p1 sed -i -e '/^#!\//, 1d' agatestats/*.py %build @@ -55,10 +57,8 @@ %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} -%if %{with test} %check -%python_exec setup.py test -%endif +%pytest %files %{python_files} %defattr(-,root,root,-) ++++++ agate-stats-0.4.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/agate-stats-0.4.0/.coveragerc new/agate-stats-0.4.0/.coveragerc --- old/agate-stats-0.4.0/.coveragerc 1970-01-01 01:00:00.000000000 +0100 +++ new/agate-stats-0.4.0/.coveragerc 2016-12-19 21:23:33.000000000 +0100 @@ -0,0 +1,3 @@ +[run] +include = + agatestats/* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/agate-stats-0.4.0/.gitignore new/agate-stats-0.4.0/.gitignore --- old/agate-stats-0.4.0/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ new/agate-stats-0.4.0/.gitignore 2016-12-19 21:23:33.000000000 +0100 @@ -0,0 +1,12 @@ +.DS_Store +*.pyc +*.swp +*.swo +.tox +*.egg-info +docs/_build +dist +.coverage +build +.proof +.test.png diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/agate-stats-0.4.0/.travis.yml new/agate-stats-0.4.0/.travis.yml --- old/agate-stats-0.4.0/.travis.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/agate-stats-0.4.0/.travis.yml 2016-12-19 21:23:33.000000000 +0100 @@ -0,0 +1,12 @@ +language: python +python: + - "2.7" + - "3.3" + - "3.4" + - "3.5" +# command to install dependencies +install: + - if [[ $TRAVIS_PYTHON_VERSION == 3* ]]; then pip install -r requirements-py3.txt; else pip install -r requirements-py2.txt; fi +# command to run tests +script: nosetests tests +sudo: false diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/agate-stats-0.4.0/AUTHORS.rst new/agate-stats-0.4.0/AUTHORS.rst --- old/agate-stats-0.4.0/AUTHORS.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/agate-stats-0.4.0/AUTHORS.rst 2016-12-19 21:23:33.000000000 +0100 @@ -0,0 +1,3 @@ +The following individuals have contributed code to agate-stats: + +* `Christopher Groskopf <https://github.com/onyxfish/>`_ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/agate-stats-0.4.0/CHANGELOG.rst new/agate-stats-0.4.0/CHANGELOG.rst --- old/agate-stats-0.4.0/CHANGELOG.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/agate-stats-0.4.0/CHANGELOG.rst 2016-12-19 21:23:33.000000000 +0100 @@ -0,0 +1,29 @@ +0.4.0 +----- + +* Update :class:`.ZScores` to use new :class:`.Computation` interface. +* Remove monkey patching. +* Upgrade agate dependency to ``1.5.0``. + +0.3.1 - November 5, 2015 +------------------------ + +* Fix packaging issue. + +0.3.0 - November 5, 2015 +------------------------ + +* Added usage documentation. +* Convert :class:`.PearsonCorrelation` to an aggregation. +* Update required version of agate to 1.1.0. +* Removed Python 2.6 support. + +0.2.0 - October 22, 2015 +------------------------ + +* Update to support agate 1.0.0. + +0.1.0 - October 6, 2015 +----------------------- + +* Initial version. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/agate-stats-0.4.0/COPYING new/agate-stats-0.4.0/COPYING --- old/agate-stats-0.4.0/COPYING 1970-01-01 01:00:00.000000000 +0100 +++ new/agate-stats-0.4.0/COPYING 2016-12-19 21:23:33.000000000 +0100 @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2015 Christopher Groskopf and contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/agate-stats-0.4.0/PKG-INFO new/agate-stats-0.4.0/PKG-INFO --- old/agate-stats-0.4.0/PKG-INFO 2016-12-19 21:24:49.000000000 +0100 +++ new/agate-stats-0.4.0/PKG-INFO 1970-01-01 01:00:00.000000000 +0100 @@ -1,54 +0,0 @@ -Metadata-Version: 1.1 -Name: agate-stats -Version: 0.4.0 -Summary: agate-stats adds additional statistical methods to agate. -Home-page: http://agate-stats.readthedocs.org/ -Author: Christopher Groskopf -Author-email: [email protected] -License: MIT -Description: .. image:: https://travis-ci.org/wireservice/agate-stats.png - :target: https://travis-ci.org/wireservice/agate-stats - :alt: Build status - - .. image:: https://img.shields.io/pypi/dw/agate-stats.svg - :target: https://pypi.python.org/pypi/agate-stats - :alt: PyPI downloads - - .. image:: https://img.shields.io/pypi/v/agate-stats.svg - :target: https://pypi.python.org/pypi/agate-stats - :alt: Version - - .. image:: https://img.shields.io/pypi/l/agate-stats.svg - :target: https://pypi.python.org/pypi/agate-stats - :alt: License - - .. image:: https://img.shields.io/pypi/pyversions/agate-stats.svg - :target: https://pypi.python.org/pypi/agate-stats - :alt: Support Python versions - - agate-stats adds statistical methods to `agate <https://github.com/wireservice/agate>`_. - - Important links: - - * agate http://agate.rtfd.org - * Documentation: http://agate-stats.rtfd.org - * Repository: https://github.com/wireservice/agate-stats - * Issues: https://github.com/wireservice/agate-stats/issues - -Platform: UNKNOWN -Classifier: Development Status :: 3 - Alpha -Classifier: Intended Audience :: Developers -Classifier: Intended Audience :: Science/Research -Classifier: License :: OSI Approved :: MIT License -Classifier: Natural Language :: English -Classifier: Operating System :: OS Independent -Classifier: Programming Language :: Python -Classifier: Programming Language :: Python :: 2.7 -Classifier: Programming Language :: Python :: 3.3 -Classifier: Programming Language :: Python :: 3.4 -Classifier: Programming Language :: Python :: 3.5 -Classifier: Programming Language :: Python :: Implementation :: CPython -Classifier: Programming Language :: Python :: Implementation :: PyPy -Classifier: Topic :: Multimedia :: Graphics -Classifier: Topic :: Scientific/Engineering :: Information Analysis -Classifier: Topic :: Software Development :: Libraries :: Python Modules diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/agate-stats-0.4.0/agate_stats.egg-info/PKG-INFO new/agate-stats-0.4.0/agate_stats.egg-info/PKG-INFO --- old/agate-stats-0.4.0/agate_stats.egg-info/PKG-INFO 2016-12-19 21:24:49.000000000 +0100 +++ new/agate-stats-0.4.0/agate_stats.egg-info/PKG-INFO 1970-01-01 01:00:00.000000000 +0100 @@ -1,54 +0,0 @@ -Metadata-Version: 1.1 -Name: agate-stats -Version: 0.4.0 -Summary: agate-stats adds additional statistical methods to agate. -Home-page: http://agate-stats.readthedocs.org/ -Author: Christopher Groskopf -Author-email: [email protected] -License: MIT -Description: .. image:: https://travis-ci.org/wireservice/agate-stats.png - :target: https://travis-ci.org/wireservice/agate-stats - :alt: Build status - - .. image:: https://img.shields.io/pypi/dw/agate-stats.svg - :target: https://pypi.python.org/pypi/agate-stats - :alt: PyPI downloads - - .. image:: https://img.shields.io/pypi/v/agate-stats.svg - :target: https://pypi.python.org/pypi/agate-stats - :alt: Version - - .. image:: https://img.shields.io/pypi/l/agate-stats.svg - :target: https://pypi.python.org/pypi/agate-stats - :alt: License - - .. image:: https://img.shields.io/pypi/pyversions/agate-stats.svg - :target: https://pypi.python.org/pypi/agate-stats - :alt: Support Python versions - - agate-stats adds statistical methods to `agate <https://github.com/wireservice/agate>`_. - - Important links: - - * agate http://agate.rtfd.org - * Documentation: http://agate-stats.rtfd.org - * Repository: https://github.com/wireservice/agate-stats - * Issues: https://github.com/wireservice/agate-stats/issues - -Platform: UNKNOWN -Classifier: Development Status :: 3 - Alpha -Classifier: Intended Audience :: Developers -Classifier: Intended Audience :: Science/Research -Classifier: License :: OSI Approved :: MIT License -Classifier: Natural Language :: English -Classifier: Operating System :: OS Independent -Classifier: Programming Language :: Python -Classifier: Programming Language :: Python :: 2.7 -Classifier: Programming Language :: Python :: 3.3 -Classifier: Programming Language :: Python :: 3.4 -Classifier: Programming Language :: Python :: 3.5 -Classifier: Programming Language :: Python :: Implementation :: CPython -Classifier: Programming Language :: Python :: Implementation :: PyPy -Classifier: Topic :: Multimedia :: Graphics -Classifier: Topic :: Scientific/Engineering :: Information Analysis -Classifier: Topic :: Software Development :: Libraries :: Python Modules diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/agate-stats-0.4.0/agate_stats.egg-info/SOURCES.txt new/agate-stats-0.4.0/agate_stats.egg-info/SOURCES.txt --- old/agate-stats-0.4.0/agate_stats.egg-info/SOURCES.txt 2016-12-19 21:24:49.000000000 +0100 +++ new/agate-stats-0.4.0/agate_stats.egg-info/SOURCES.txt 1970-01-01 01:00:00.000000000 +0100 @@ -1,13 +0,0 @@ -README.rst -setup.cfg -setup.py -agate_stats.egg-info/PKG-INFO -agate_stats.egg-info/SOURCES.txt -agate_stats.egg-info/dependency_links.txt -agate_stats.egg-info/requires.txt -agate_stats.egg-info/top_level.txt -agatestats/__init__.py -agatestats/aggregations.py -agatestats/computations.py -agatestats/table.py -agatestats/tableset.py \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/agate-stats-0.4.0/agate_stats.egg-info/dependency_links.txt new/agate-stats-0.4.0/agate_stats.egg-info/dependency_links.txt --- old/agate-stats-0.4.0/agate_stats.egg-info/dependency_links.txt 2016-12-19 21:24:49.000000000 +0100 +++ new/agate-stats-0.4.0/agate_stats.egg-info/dependency_links.txt 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/agate-stats-0.4.0/agate_stats.egg-info/requires.txt new/agate-stats-0.4.0/agate_stats.egg-info/requires.txt --- old/agate-stats-0.4.0/agate_stats.egg-info/requires.txt 2016-12-19 21:24:49.000000000 +0100 +++ new/agate-stats-0.4.0/agate_stats.egg-info/requires.txt 1970-01-01 01:00:00.000000000 +0100 @@ -1,2 +0,0 @@ -six>=1.6.1 -agate>=1.5.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/agate-stats-0.4.0/agate_stats.egg-info/top_level.txt new/agate-stats-0.4.0/agate_stats.egg-info/top_level.txt --- old/agate-stats-0.4.0/agate_stats.egg-info/top_level.txt 2016-12-19 21:24:49.000000000 +0100 +++ new/agate-stats-0.4.0/agate_stats.egg-info/top_level.txt 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -agatestats diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/agate-stats-0.4.0/docs/Makefile new/agate-stats-0.4.0/docs/Makefile --- old/agate-stats-0.4.0/docs/Makefile 1970-01-01 01:00:00.000000000 +0100 +++ new/agate-stats-0.4.0/docs/Makefile 2016-12-19 21:23:33.000000000 +0100 @@ -0,0 +1,130 @@ +# Makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +PAPER = +BUILDDIR = _build + +# Internal variables. +PAPEROPT_a4 = -D latex_paper_size=a4 +PAPEROPT_letter = -D latex_paper_size=letter +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . + +.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest + +help: + @echo "Please use \`make <target>' where <target> is one of" + @echo " html to make standalone HTML files" + @echo " dirhtml to make HTML files named index.html in directories" + @echo " singlehtml to make a single large HTML file" + @echo " pickle to make pickle files" + @echo " json to make JSON files" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " qthelp to make HTML files and a qthelp project" + @echo " devhelp to make HTML files and a Devhelp project" + @echo " epub to make an epub" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " latexpdf to make LaTeX files and run them through pdflatex" + @echo " text to make text files" + @echo " man to make manual pages" + @echo " changes to make an overview of all changed/added/deprecated items" + @echo " linkcheck to check all external links for integrity" + @echo " doctest to run all doctests embedded in the documentation (if enabled)" + +clean: + -rm -rf $(BUILDDIR)/* + +html: + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." + +dirhtml: + $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." + +singlehtml: + $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml + @echo + @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." + +pickle: + $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle + @echo + @echo "Build finished; now you can process the pickle files." + +json: + $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json + @echo + @echo "Build finished; now you can process the JSON files." + +htmlhelp: + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp + @echo + @echo "Build finished; now you can run HTML Help Workshop with the" \ + ".hhp project file in $(BUILDDIR)/htmlhelp." + +qthelp: + $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp + @echo + @echo "Build finished; now you can run "qcollectiongenerator" with the" \ + ".qhcp project file in $(BUILDDIR)/qthelp, like this:" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/agatestats.qhcp" + @echo "To view the help file:" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/agatestats.qhc" + +devhelp: + $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp + @echo + @echo "Build finished." + @echo "To view the help file:" + @echo "# mkdir -p $$HOME/.local/share/devhelp/agatestats" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/agatestats" + @echo "# devhelp" + +epub: + $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub + @echo + @echo "Build finished. The epub file is in $(BUILDDIR)/epub." + +latex: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo + @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." + @echo "Run \`make' in that directory to run these through (pdf)latex" \ + "(use \`make latexpdf' here to do that automatically)." + +latexpdf: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through pdflatex..." + make -C $(BUILDDIR)/latex all-pdf + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +text: + $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text + @echo + @echo "Build finished. The text files are in $(BUILDDIR)/text." + +man: + $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man + @echo + @echo "Build finished. The manual pages are in $(BUILDDIR)/man." + +changes: + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes + @echo + @echo "The overview file is in $(BUILDDIR)/changes." + +linkcheck: + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck + @echo + @echo "Link check complete; look for any errors in the above output " \ + "or in $(BUILDDIR)/linkcheck/output.txt." + +doctest: + $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest + @echo "Testing of doctests in the sources finished, look at the " \ + "results in $(BUILDDIR)/doctest/output.txt." diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/agate-stats-0.4.0/docs/conf.py new/agate-stats-0.4.0/docs/conf.py --- old/agate-stats-0.4.0/docs/conf.py 1970-01-01 01:00:00.000000000 +0100 +++ new/agate-stats-0.4.0/docs/conf.py 2016-12-19 21:23:33.000000000 +0100 @@ -0,0 +1,225 @@ +# -*- coding: utf-8 -*- +# +# This file is execfile()d with the current directory set to its containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +import os +import sys + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +sys.path.insert(0, os.path.abspath('..')) + +# -- General configuration ----------------------------------------------------- + +# If your documentation needs a minimal Sphinx version, state it here. +#needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be extensions +# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. +extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx'] +autodoc_member_order = 'bysource' + +intersphinx_mapping = { + 'python': ('http://docs.python.org/3.5/', None), + 'agate': ('http://agate.readthedocs.org/en/latest/', None) +} + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix of source filenames. +source_suffix = '.rst' + +# The encoding of source files. +#source_encoding = 'utf-8-sig' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = u'agate-stats' +copyright = u'2015, Christopher Groskopf' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. +version = '0.4.0' +# The full version, including alpha/beta/rc tags. +release = '0.4.0 (alpha)' + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +#language = None + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +#today = '' +# Else, today_fmt is used as the format for a strftime call. +#today_fmt = '%B %d, %Y' + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +exclude_patterns = ['_build'] + +# The reST default role (used for this markup: `text`) to use for all documents. +#default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +#add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +#add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +#show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# A list of ignored prefixes for module index sorting. +#modindex_common_prefix = [] + + +# -- Options for HTML output --------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +html_theme = 'default' + +on_rtd = os.environ.get('READTHEDOCS', None) == 'True' + +if not on_rtd: # only import and set the theme if we're building docs locally + import sphinx_rtd_theme + html_theme = 'sphinx_rtd_theme' + html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +#html_theme_options = {} + +# Add any paths that contain custom themes here, relative to this directory. +#html_theme_path = [] + +# The name for this set of Sphinx documents. If None, it defaults to +# "<project> v<release> documentation". +#html_title = None + +# A shorter title for the navigation bar. Default is the same as html_title. +#html_short_title = None + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +#html_logo = None + +# The name of an image file (within the static path) to use as favicon of the +# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +#html_favicon = None + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +#html_last_updated_fmt = '%b %d, %Y' + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +#html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +#html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +#html_additional_pages = {} + +# If false, no module index is generated. +#html_domain_indices = True + +# If false, no index is generated. +#html_use_index = True + +# If true, the index is split into individual pages for each letter. +#html_split_index = False + +# If true, links to the reST sources are added to the pages. +#html_show_sourcelink = True + +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. +#html_show_sphinx = True + +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. +#html_show_copyright = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a <link> tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +#html_use_opensearch = '' + +# This is the file name suffix for HTML files (e.g. ".xhtml"). +#html_file_suffix = None + +# Output file base name for HTML help builder. +htmlhelp_basename = 'agatestatsdoc' + + +# -- Options for LaTeX output -------------------------------------------------- + +# The paper size ('letter' or 'a4'). +#latex_paper_size = 'letter' + +# The font size ('10pt', '11pt' or '12pt'). +#latex_font_size = '10pt' + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, author, documentclass [howto/manual]). +latex_documents = [ + ('index', 'agate-stats.tex', u'agate-stats Documentation', + u'Christopher Groskopf', 'manual'), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +#latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +#latex_use_parts = False + +# If true, show page references after internal links. +#latex_show_pagerefs = False + +# If true, show URL addresses after external links. +#latex_show_urls = False + +# Additional stuff for the LaTeX preamble. +#latex_preamble = '' + +# Documents to append as an appendix to all manuals. +#latex_appendices = [] + +# If false, no module index is generated. +#latex_domain_indices = True + + +# -- Options for manual page output -------------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ +] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/agate-stats-0.4.0/docs/index.rst new/agate-stats-0.4.0/docs/index.rst --- old/agate-stats-0.4.0/docs/index.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/agate-stats-0.4.0/docs/index.rst 2016-12-19 21:23:33.000000000 +0100 @@ -0,0 +1,74 @@ +===================== +agate-stats |release| +===================== + +.. include:: ../README.rst + +Install +======= + +To install: + +.. code-block:: bash + + pip install agate-stats + +For details on development or supported platforms see the `agate documentation <http://agate.readthedocs.org>`_. + +Usage +===== + +agate-stats uses a monkey patching pattern to add additional statistical methods to all :class:`agate.Table <agate.table.Table>` instances. + +.. code-block:: python + + import agate + import agatestats + +Importing agate-stats adds methods to :class:`agate.Table <agate.table.Table>`. For example, to filter a table to only those rows whose ``cost`` value is an outliers by more than 3 standard deviations you would use :meth:`.TableStats.stdev_outliers`: + +.. code-block:: python + + outliers = table.stdev_outliers('price') + +In addition to Table methods agatestats also includes a variety of additional aggregations and computations. See the API section of the docs for a complete list of all the added features. + +=== +API +=== + +.. autofunction:: agatestats.table.stdev_outliers + +.. autofunction:: agatestats.table.mad_outliers + +.. autofunction:: agatestats.tableset.stdev_outliers + +.. autofunction:: agatestats.tableset.mad_outliers + +.. autoclass:: agatestats.aggregations.PearsonCorrelation + :members: + +.. autoclass:: agatestats.computations.ZScores + :members: + +Authors +======= + +.. include:: ../AUTHORS.rst + +Changelog +========= + +.. include:: ../CHANGELOG.rst + +License +======= + +.. include:: ../COPYING + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/agate-stats-0.4.0/requirements-py2.txt new/agate-stats-0.4.0/requirements-py2.txt --- old/agate-stats-0.4.0/requirements-py2.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/agate-stats-0.4.0/requirements-py2.txt 2016-12-19 21:23:33.000000000 +0100 @@ -0,0 +1,12 @@ +unittest2==0.5.1 +nose>=1.1.2 +tox>=1.3 +Sphinx>=1.2.2 +sphinx_rtd_theme>=0.1.6 +wheel>=0.24.0 +agate>=1.5.0 +ipython>=4.0.0 +notebook>=4.0.4 +pylint>=1.4.4 +six>=1.6.1 +coverage>=3.7.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/agate-stats-0.4.0/requirements-py3.txt new/agate-stats-0.4.0/requirements-py3.txt --- old/agate-stats-0.4.0/requirements-py3.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/agate-stats-0.4.0/requirements-py3.txt 2016-12-19 21:23:33.000000000 +0100 @@ -0,0 +1,11 @@ +nose>=1.1.2 +tox>=1.3 +Sphinx>=1.2.2 +sphinx_rtd_theme>=0.1.6 +wheel>=0.24.0 +agate>=1.5.0 +ipython>=4.0.0 +notebook>=4.0.4 +pylint>=1.4.4 +six>=1.6.1 +coverage>=3.7.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/agate-stats-0.4.0/setup.cfg new/agate-stats-0.4.0/setup.cfg --- old/agate-stats-0.4.0/setup.cfg 2016-12-19 21:24:49.000000000 +0100 +++ new/agate-stats-0.4.0/setup.cfg 2016-12-19 21:23:33.000000000 +0100 @@ -1,8 +1,2 @@ [bdist_wheel] universal = 1 - -[egg_info] -tag_build = -tag_date = 0 -tag_svn_revision = 0 - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/agate-stats-0.4.0/tests/test_aggregations.py new/agate-stats-0.4.0/tests/test_aggregations.py --- old/agate-stats-0.4.0/tests/test_aggregations.py 1970-01-01 01:00:00.000000000 +0100 +++ new/agate-stats-0.4.0/tests/test_aggregations.py 2016-12-19 21:23:33.000000000 +0100 @@ -0,0 +1,69 @@ +#!/usr/bin/env python +# -*- coding: utf8 -*- + +from decimal import Decimal +import warnings + +try: + import unittest2 as unittest +except ImportError: + import unittest + +import agate + +from agatestats.aggregations import PearsonCorrelation + +class TestTable(unittest.TestCase): + def setUp(self): + self.rows = ( + (1, 4, 'a'), + (2, 3, 'b'), + (None, 2, u'????') + ) + + self.column_names = ['one', 'two', 'three'] + self.column_types = [agate.Number(), agate.Number(), agate.Text()] + + def test_pearson_correlation(self): + rows = ( + (-1, 0, 'a'), + (0, 0, 'b'), + (1, 3, 'c') + ) + + table = agate.Table(rows, self.column_names, self.column_types) + + self.assertEqual(table.aggregate(PearsonCorrelation('one', 'one')), Decimal('1')) + self.assertAlmostEqual(table.aggregate(PearsonCorrelation('one', 'two')), Decimal('3').sqrt() * Decimal('0.5')) + + def test_pearson_correlation_nulls(self): + rows = ( + (-1, 0, 'a'), + (0, 0, 'b'), + (1, None, 'c') + ) + + table = agate.Table(rows, self.column_names, self.column_types) + + warnings.simplefilter('error') + + with self.assertRaises(agate.NullCalculationWarning): + table.aggregate(PearsonCorrelation('one', 'two')) + + with self.assertRaises(agate.NullCalculationWarning): + table.aggregate(PearsonCorrelation('two', 'one')) + + warnings.simplefilter('ignore') + + self.assertEqual(table.aggregate(PearsonCorrelation('one', 'two')), 0) + + def test_pearson_correlation_zero(self): + rows = ( + (-1, 3, 'a'), + (0, 3, 'b'), + (1, 3, 'c') + ) + + table = agate.Table(rows, self.column_names, self.column_types) + + self.assertEqual(table.aggregate(PearsonCorrelation('one', 'two')), Decimal('0')) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/agate-stats-0.4.0/tests/test_computations.py new/agate-stats-0.4.0/tests/test_computations.py --- old/agate-stats-0.4.0/tests/test_computations.py 1970-01-01 01:00:00.000000000 +0100 +++ new/agate-stats-0.4.0/tests/test_computations.py 2016-12-19 21:23:33.000000000 +0100 @@ -0,0 +1,48 @@ +#!/usr/bin/env Python + +from decimal import Decimal + +try: + import unittest2 as unittest +except ImportError: + import unittest + +import agate + +from agatestats.computations import ZScores + +class TestTableComputation(unittest.TestCase): + def setUp(self): + self.rows = ( + ('a', 2, 3, 4), + (None, 3, 5, None), + ('a', 2, 4, None), + ('b', 3, 4, None) + ) + + self.number_type = agate.Number() + self.text_type = agate.Text() + + self.column_names = ['one', 'two', 'three', 'four'] + self.column_types = [agate.Text(), agate.Number(), agate.Number(), agate.Number()] + + self.table = agate.Table(self.rows, self.column_names, self.column_types) + + def test_z_scores(self): + new_table = self.table.compute([ + ('z-scores', ZScores('two')) + ]) + + self.assertEqual(len(new_table.rows), 4) + self.assertEqual(len(new_table.columns), 5) + + self.assertEqual(new_table.columns['z-scores'][0].quantize(Decimal('0.01')), Decimal('-0.87')) + self.assertEqual(new_table.columns['z-scores'][1].quantize(Decimal('0.01')), Decimal('0.87')) + self.assertEqual(new_table.columns['z-scores'][2].quantize(Decimal('0.01')), Decimal('-0.87')) + self.assertEqual(new_table.columns['z-scores'][3].quantize(Decimal('0.01')), Decimal('0.87')) + + def test_zscores_invalid_column(self): + with self.assertRaises(agate.DataTypeError): + new_table = self.table.compute([ + ('test', ZScores('one')) + ]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/agate-stats-0.4.0/tests/test_table.py new/agate-stats-0.4.0/tests/test_table.py --- old/agate-stats-0.4.0/tests/test_table.py 1970-01-01 01:00:00.000000000 +0100 +++ new/agate-stats-0.4.0/tests/test_table.py 2016-12-19 21:23:33.000000000 +0100 @@ -0,0 +1,77 @@ +#!/usr/bin/env python +# -*- coding: utf8 -*- + +try: + import unittest2 as unittest +except ImportError: + import unittest + +import agate +import agatestats + +class TestTable(unittest.TestCase): + def setUp(self): + self.rows = ( + (1, 4, 'a'), + (2, 3, 'b'), + (None, 2, u'????') + ) + + self.column_names = ['one', 'two', 'three'] + self.column_types = [agate.Number(), agate.Number(), agate.Text()] + + def test_stdev_outliers(self): + rows = [ + (50, 4, 'a'), + ] * 10 + + rows.append((200, 1, 'b')) + + table = agate.Table(rows, self.column_names, self.column_types) + + new_table = table.stdev_outliers('one') + + self.assertEqual(len(new_table.rows), 10) + self.assertNotIn(200, new_table.columns['one']) + + def test_stdev_outliers_reject(self): + rows = [ + (50, 4, 'a'), + ] * 10 + + rows.append((200, 1, 'b')) + + table = agate.Table(rows, self.column_names, self.column_types) + + new_table = table.stdev_outliers('one', reject=True) + + self.assertEqual(len(new_table.rows), 1) + self.assertSequenceEqual(new_table.columns['one'], (200,)) + + def test_mad_outliers(self): + rows = [ + (50, 4, 'a'), + ] * 10 + + rows.append((200, 1, 'b')) + + table = agate.Table(rows, self.column_names, self.column_types) + + new_table = table.mad_outliers('one') + + self.assertEqual(len(new_table.rows), 10) + self.assertNotIn(200, new_table.columns['one']) + + def test_mad_outliers_reject(self): + rows = [ + (50, 4, 'a'), + ] * 10 + + rows.append((200, 1, 'b')) + + table = agate.Table(rows, self.column_names, self.column_types) + + new_table = table.mad_outliers('one', reject=True) + + self.assertEqual(len(new_table.rows), 1) + self.assertSequenceEqual(new_table.columns['one'], (200,)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/agate-stats-0.4.0/tests/test_tableset.py new/agate-stats-0.4.0/tests/test_tableset.py --- old/agate-stats-0.4.0/tests/test_tableset.py 1970-01-01 01:00:00.000000000 +0100 +++ new/agate-stats-0.4.0/tests/test_tableset.py 2016-12-19 21:23:33.000000000 +0100 @@ -0,0 +1,69 @@ +#!/usr/bin/env python +# -*- coding: utf8 -*- + +try: + import unittest2 as unittest +except ImportError: + import unittest + +import agate +import agatestats + +class TestTableSet(unittest.TestCase): + def setUp(self): + self.column_names = ['one', 'two', 'three'] + self.column_types = [agate.Number(), agate.Number(), agate.Text()] + + def test_stdev_outliers(self): + rows = [ + (50, 4, 'a'), + ] * 10 + + rows.append((200, 1, 'b')) + + table1 = agate.Table(rows, self.column_names, self.column_types) + + rows = [ + (50, 4, 'a'), + ] * 10 + + rows.append((400, 1, 'b')) + + table2 = agate.Table(rows, self.column_names, self.column_types) + + tableset = agate.TableSet([table1, table2], keys=['one', 'two']) + + new_tableset = tableset.stdev_outliers('one') + + self.assertEqual(len(new_tableset['one'].rows), 10) + self.assertNotIn(200, new_tableset['one'].columns['one']) + + self.assertEqual(len(new_tableset['two'].rows), 10) + self.assertNotIn(400, new_tableset['two'].columns['one']) + + def test_mad_outliers(self): + rows = [ + (50, 4, 'a'), + ] * 10 + + rows.append((200, 1, 'b')) + + table1 = agate.Table(rows, self.column_names, self.column_types) + + rows = [ + (50, 4, 'a'), + ] * 10 + + rows.append((400, 1, 'b')) + + table2 = agate.Table(rows, self.column_names, self.column_types) + + tableset = agate.TableSet([table1, table2], keys=['one', 'two']) + + new_tableset = tableset.mad_outliers('one') + + self.assertEqual(len(new_tableset['one'].rows), 10) + self.assertNotIn(200, new_tableset['one'].columns['one']) + + self.assertEqual(len(new_tableset['two'].rows), 10) + self.assertNotIn(400, new_tableset['two'].columns['one']) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/agate-stats-0.4.0/tox.ini new/agate-stats-0.4.0/tox.ini --- old/agate-stats-0.4.0/tox.ini 1970-01-01 01:00:00.000000000 +0100 +++ new/agate-stats-0.4.0/tox.ini 2016-12-19 21:23:33.000000000 +0100 @@ -0,0 +1,28 @@ +[tox] +envlist = py27,py33,py34,py35,pypy + +[testenv] +deps= + nose>=1.1.2 + six>=1.6.1 +commands=nosetests + +[testenv:py27] +deps= + {[testenv]deps} + +[testenv:py33] +deps= + {[testenv]deps} + +[testenv:py34] +deps= + {[testenv:py33]deps} + +[testenv:py35] +deps= + {[testenv:py33]deps} + +[testenv:pypy] +deps= + {[testenv:py33]deps} ++++++ python-agate-stats-remove-mysterious-line.patch ++++++ --- a/agatestats/computations.py +++ b/agatestats/computations.py @@ -21,7 +21,6 @@ def validate(self, table): if not isinstance(column.data_type, agate.Number): raise agate.DataTypeError('ZScores column must contain Number data.') - def run(self, table): self._mean = table.aggregate(agate.Mean(self._column_name)) self._sd = table.aggregate(agate.StDev(self._column_name))
