BSD Ports

devel/py-pytest-arraydiff 0.7.0 FreeBSD

Pytest plugin to help with comparing array output from tests

System
FreeBSD
Repository
FreeBSD ports
Maintainer
[email protected]
Last update
Commit
696938a2d4
License
BSD3CLAUSE
Categories
devel, python
Package size
16.8 KiB, 61.0 KiB installed

Description

pytest-arraydiff is a py.test plugin to facilitate the generation and comparison of data arrays produced during tests, in particular in cases where the arrays are too large to conveniently hard-code them in the tests (e.g. np.testing.assert_allclose(x, [1, 2, 3])).

The basic idea is that you can write a test that generates a Numpy array (or other related objects depending on the format, e.g. pandas DataFrame). You can then either run the tests in a mode to generate reference files from the arrays, or you can run the tests in comparison mode, which will compare the results of the tests to the reference ones within some tolerance.

At the moment, the supported file formats for the reference files are: * A plain text-based format (based on Numpy loadtxt output) * The FITS format (requires astropy). With this format, tests can return either a Numpy array for a FITS HDU object. * A pandas HDF5 format using the pandas HDFStore

Install

Binary package:

pkg install py312-pytest-arraydiff

From the ports tree:

cd /usr/ports/devel/py-pytest-arraydiff/ && make install clean

To depend on this port in another port's Makefile:

RUN_DEPENDS=	py312-pytest-arraydiff>0:devel/py-pytest-arraydiff

Packages

The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.

Repositoryaarch64amd64armv6armv7i386
FreeBSD:14:latest0.7.00.7.0--0.7.0
FreeBSD:14:quarterly0.7.00.7.0n/a-0.7.0
FreeBSD:15:latest0.7.00.7.0n/a--
FreeBSD:15:quarterly0.7.00.7.0n/an/an/a
FreeBSD:16:latest0.7.00.7.0n/an/an/a
FreeBSD:16:quarterlyn/an/an/an/an/a

Dependencies

As this port's Makefile names them.

Build 2

Runtime 2

Test 2

The full lists below include those, and their dependencies in turn.

Build dependencies 17
Run dependencies 22
Required by 1

Configuration

No options to configure.

USES
python
Service scripts
none

Files

distinfo 1
FileSizeSHA256
pytest_arraydiff-0.7.0.tar.gz1786070e2a9183af5b4f05f694727beb30eb5fc6712632b240ef259ec60984a629b1a
Master sites 1
  • PYPI

Commit history 1

DateCommitCreditsLog message
696938a2d4 Yuri Victorovich devel/py-pytest-arraydiff: update 0.6.1 → 0.7.0