diff options
Diffstat (limited to 'debian')
-rw-r--r-- | debian/NEWS | 12 | ||||
-rw-r--r-- | debian/changelog | 35 | ||||
-rw-r--r-- | debian/compat | 1 | ||||
-rw-r--r-- | debian/control | 30 | ||||
-rw-r--r-- | debian/copyright | 4 | ||||
-rw-r--r-- | debian/tests/control | 7 | ||||
-rwxr-xr-x | debian/tests/python.py | 46 | ||||
-rwxr-xr-x | debian/tests/python.sh | 11 | ||||
-rw-r--r-- | debian/tests/reference/single_triangle.txt | 4 | ||||
-rwxr-xr-x | debian/tests/utils.sh | 32 | ||||
-rw-r--r-- | debian/upstream/metadata | 9 |
11 files changed, 175 insertions, 16 deletions
diff --git a/debian/NEWS b/debian/NEWS new file mode 100644 index 0000000..663e37e --- /dev/null +++ b/debian/NEWS @@ -0,0 +1,12 @@ +phat (1.5-3) unstable; urgency=medium + + This NEWS entry describes a change introduced in version 1.5-1 of the package, + but the entry was only added in -3. + + An entirely unrelated "phat" source package existed in the Debian archives + from 2005 to 2014, before being removed in bug #751276. The current source + and binary reuse the package name, given the fact that the old package was + abandoned upstream (and so is unlikely to reappear), and the long gap between + removal of the old and addition of the new package. + + -- Gard Spreemann <gspr@nonempty.org> Thu, 15 Aug 2019 10:56:51 +0200
\ No newline at end of file diff --git a/debian/changelog b/debian/changelog index be13161..288727f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,38 @@ +phat (1.6-2) unstable; urgency=medium + + * Start d/upstream/metadata file. + * Standards-version 4.5.1. No changes needed. + + -- Gard Spreemann <gspr@nonempty.org> Sat, 23 Jan 2021 18:25:03 +0100 + +phat (1.6-1) unstable; urgency=medium + + * New upstream version. + * Rules-requires-root: no. + * Move git repository to Salsa. + * DH compat 13 (new style). + + -- Gard Spreemann <gspr@nonempty.org> Thu, 27 Aug 2020 12:38:59 +0200 + +phat (1.5-5) unstable; urgency=medium + + * Allow tests to output to stderr without causing failure. + + -- Gard Spreemann <gspr@nonempty.org> Sat, 14 Mar 2020 11:19:04 +0100 + +phat (1.5-4) unstable; urgency=medium + + * Add tests. + * Standards-version 4.5.0. No changes needed. + + -- Gard Spreemann <gspr@nonempty.org> Fri, 13 Mar 2020 13:57:54 +0100 + +phat (1.5-3) unstable; urgency=medium + + * Add NEWS entry describing reused package name. + + -- Gard Spreemann <gspr@nonempty.org> Thu, 15 Aug 2019 11:05:29 +0200 + phat (1.5-2) unstable; urgency=medium * Standards-version 4.4.0.1. No changes needed. diff --git a/debian/compat b/debian/compat deleted file mode 100644 index 48082f7..0000000 --- a/debian/compat +++ /dev/null @@ -1 +0,0 @@ -12 diff --git a/debian/control b/debian/control index a554cd5..0bd1200 100644 --- a/debian/control +++ b/debian/control @@ -2,16 +2,17 @@ Source: phat Maintainer: Gard Spreemann <gspr@nonempty.org> Section: math Priority: optional -Standards-Version: 4.4.0.1 +Standards-Version: 4.5.1 Build-Depends: cmake, - debhelper (>= 12), + debhelper-compat (= 13), dh-python, python3-all-dev, python3-pybind11, python3-setuptools +Rules-Requires-Root: no Homepage: https://bitbucket.org/phat-code/phat -Vcs-Browser: https://git.nonempty.org/debian-phat -Vcs-Git: https://git.nonempty.org/debian-phat -b debian/sid +Vcs-Browser: https://salsa.debian.org/gspr/phat +Vcs-Git: https://salsa.debian.org/gspr/phat.git -b debian/sid Package: libphat-dev Section: libdevel @@ -20,9 +21,10 @@ Multi-Arch: foreign Depends: ${misc:Depends} Suggests: phat-utils Description: C++ library for boundary matrix reductions over Z/2Z - PHAT is a header-only C++ library for performing the filtered Z/2Z - (co)boundary matrix operations commonly needed when computing - (persistent) (co)homology in topological data analysis. + The Persistent Homology Algorithm Toolox is a header-only C++ library + for performing the filtered Z/2Z (co)boundary matrix operations + commonly needed when computing (persistent) (co)homology in + topological data analysis. . This package contains the header files. A standalone program exposing some of the features is available in phat-utils. @@ -32,9 +34,10 @@ Section: math Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends} Description: Utilities from the PHAT library - PHAT is a header-only C++ library for performing the filtered Z/2Z - (co)boundary matrix operations commonly needed when computing - (persistent) (co)homology in topological data analysis. + The Persistent Homology Algorithm Toolox is a header-only C++ library + for performing the filtered Z/2Z (co)boundary matrix operations + commonly needed when computing (persistent) (co)homology in + topological data analysis. . This package contains some standalone utilities built using the PHAT library, such as persistent homology of a given filtered boundary @@ -45,8 +48,9 @@ Section: python Architecture: any Depends: ${misc:Depends}, ${python3:Depends}, ${shlibs:Depends} Description: Python 3 interface for the PHAT library - PHAT is a header-only C++ library for performing the filtered Z/2Z - (co)boundary matrix operations commonly needed when computing - (persistent) (co)homology in topological data analysis. + The Persistent Homology Algorithm Toolox is a header-only C++ library + for performing the filtered Z/2Z (co)boundary matrix operations + commonly needed when computing (persistent) (co)homology in + topological data analysis. . This package contains the library's Python 3 interface. diff --git a/debian/copyright b/debian/copyright index 1f069de..3c547b3 100644 --- a/debian/copyright +++ b/debian/copyright @@ -3,11 +3,11 @@ Upstream-Name: phat Source: https://bitbucket.org/phat-code/phat Files: * -Copyright: 2013-2019 IST Austria +Copyright: 2013-2021 IST Austria License: LGPL-3+ Files: debian/* -Copyright: 2019 Gard Spreemann <gspr@nonempty.org> +Copyright: 2019-2021 Gard Spreemann <gspr@nonempty.org> License: LGPL-3+ License: LGPL-3+ diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 0000000..613d0c7 --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,7 @@ +Tests: utils.sh +Depends: phat-utils, shunit2 +Restrictions: allow-stderr + +Tests: python.sh +Depends: python3-all, python3-phat +Restrictions: allow-stderr diff --git a/debian/tests/python.py b/debian/tests/python.py new file mode 100755 index 0000000..eaad48f --- /dev/null +++ b/debian/tests/python.py @@ -0,0 +1,46 @@ +import phat + +def main(): + files = ["single_triangle"] + + for file in files: + ref = [] + with open("debian/tests/reference/%s.txt" %(file), "r") as f: + f.readline() + for line in f: + splitline = line.strip().split(" ") + assert(len(splitline) == 2) + ref.append((int(splitline[0]), int(splitline[1]))) + ref.sort() + + cols = [] + with open("examples/%s.dat" %(file), "r") as f: + for line in f: + if not line.startswith("#") and line.strip() != "": + splitline = line.rstrip().split(" ") + cols.append((int(splitline[0]), [int(x) for x in splitline[1:]])) + + for repr in phat.representations: + for alg in phat.reductions: + for dualize in [False, True]: + print("File %s, representation %s, algorithm %s, dualization %s" %(file, repr, alg, str(dualize))) + + bd = phat.boundary_matrix(representation=repr) + bd.columns = cols + if dualize: + pairs = list(bd.compute_persistence_pairs_dualized(reduction=alg)) + else: + pairs = list(bd.compute_persistence_pairs(reduction=alg)) + pairs.sort() + + if ref == pairs: + print("OK!") + else: + print("ERROR!") + print("Got", pairs) + print("Expected", ref) + exit(1) + + +if __name__ == "__main__": + main() diff --git a/debian/tests/python.sh b/debian/tests/python.sh new file mode 100755 index 0000000..b66e101 --- /dev/null +++ b/debian/tests/python.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +set -e + +for py3ver in $(py3versions -vs) +do + echo "Running tests with Python ${py3ver}." + /usr/bin/python${py3ver} -B debian/tests/python.py + echo "---------" +done + diff --git a/debian/tests/reference/single_triangle.txt b/debian/tests/reference/single_triangle.txt new file mode 100644 index 0000000..04ffc17 --- /dev/null +++ b/debian/tests/reference/single_triangle.txt @@ -0,0 +1,4 @@ +3 +1 3 +2 4 +5 6 diff --git a/debian/tests/utils.sh b/debian/tests/utils.sh new file mode 100755 index 0000000..6798f82 --- /dev/null +++ b/debian/tests/utils.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +files="single_triangle" +reprs="vector_vector vector_heap vector_set vector_list full_pivot_column sparse_pivot_column heap_pivot_column bit_tree_pivot_column" +algos="standard twist chunk chunk_sequential spectral_sequence row" + +oneTimeSetUp() { + set -u +} + +parse() { + tail -n +2 $1 | sort +} + +test() { + for file in $files + do + for repr in $reprs + do + for algo in $algos + do + tmpfile=$(mktemp -p $AUTOPKGTEST_TMP) + ( set -x; /usr/bin/phat --ascii --${repr} --${algo} examples/${file}.dat ${tmpfile} ) + assertEquals "Non-zero return code." 0 $? + [ "$(parse debian/tests/reference/${file}.txt)" == "$(parse $tmpfile)" ] + assertEquals "Wrong result." 0 $? + done + done + done +} + +. shunit2 diff --git a/debian/upstream/metadata b/debian/upstream/metadata new file mode 100644 index 0000000..a856159 --- /dev/null +++ b/debian/upstream/metadata @@ -0,0 +1,9 @@ +Repository: https://bitbucket.org/phat-code/phat.git +Repository-Browse: https://bitbucket.org/phat-code/phat +Reference: + Title: Persistent Homology Algorithms Toolbox + Author: U. Bauer and M. Kerber and J. Reininghaus and H. Wagner + Journal: Journal of Symbolic Computation + Volume: 78 + Pages: 76–90 + Year: 2017 |