[med-svn] [Git][med-team/scrm][master] 10 commits: Switch d/watch version to 4

Andreas Tille gitlab at salsa.debian.org
Thu Mar 12 20:58:22 GMT 2020



Andreas Tille pushed to branch master at Debian Med / scrm


Commits:
d9d134e9 by Samyak Jain at 2020-03-13T01:08:49+05:30
Switch d/watch version to 4

- - - - -
038df4fa by Samyak Jain at 2020-03-13T01:09:01+05:30
New upstream version 1.7.4
- - - - -
c0c779da by Samyak Jain at 2020-03-13T01:09:02+05:30
Update upstream source from tag 'upstream/1.7.4'

Update to upstream version '1.7.4'
with Debian dir a2f69e60c39095192b6d633f74cf797636fdb03b
- - - - -
0ada82b1 by Samyak Jain at 2020-03-13T01:10:04+05:30
Bumps standard version and remove d/compat (use debhelper-compaat instead)

- - - - -
093d97ef by Samyak Jain at 2020-03-13T02:00:38+05:30
Adds autopkgtest

- - - - -
bd37d6c2 by Samyak Jain at 2020-03-13T02:01:16+05:30
Document how users can test their local installation

- - - - -
801a4db6 by Samyak Jain at 2020-03-13T02:01:53+05:30
Add debian/salsa-ci.yml

- - - - -
2c90b198 by Samyak Jain at 2020-03-13T02:02:48+05:30
Properly install tests data in examples package

- - - - -
75be8520 by Samyak Jain at 2020-03-13T02:03:59+05:30
Updates d/changelog for 1.7.4-1 release

- - - - -
63390d49 by Andreas Tille at 2020-03-12T20:58:16+00:00
Merge branch 'master' into 'master'

Update to latest upstream version plus adds Autopkgtest

See merge request med-team/scrm!1
- - - - -


21 changed files:

- + .devcontainer/Dockerfile
- + .devcontainer/devcontainer.json
- .gitignore
- .travis.yml
- NEWS.md
- README.md
- configure.ac
- + debian/README.test
- debian/changelog
- − debian/compat
- debian/control
- + debian/salsa-ci.yml
- + debian/scrm-examples.docs
- + debian/scrm-examples.install
- + debian/tests/control
- + debian/tests/run-unit-test
- debian/watch
- src/forest.cc
- src/param.cc
- tests/test_binaries.sh
- + tests/tree.newick


Changes:

=====================================
.devcontainer/Dockerfile
=====================================
@@ -0,0 +1,18 @@
+FROM debian:buster-slim
+
+RUN apt-get update && \
+  apt-get install -y --no-install-recommends \
+    autoconf \
+    autoconf-archive \
+    automake \
+    build-essential \
+    git \
+    libcppunit-dev \
+    valgrind && \
+  apt-get clean && \
+  rm -rf /var/lib/apt/lists/ && \
+  rm -rf /tmp/downloaded_packages/ /tmp/*.rds 
+
+RUN adduser developer
+
+USER developer


=====================================
.devcontainer/devcontainer.json
=====================================
@@ -0,0 +1,34 @@
+// For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at:
+// https://github.com/microsoft/vscode-dev-containers/tree/v0.101.1/containers/docker-existing-dockerfile
+{
+	"name": "scrm:develop",
+
+	// Sets the run context to one level up instead of the .devcontainer folder.
+	"context": ".",
+
+	// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
+	"dockerFile": "Dockerfile",
+
+	// Set *default* container specific settings.json values on container create.
+	"settings": { 
+		"terminal.integrated.shell.linux": null
+	},
+
+	// Add the IDs of extensions you want installed when the container is created.
+	"extensions": ["ms-vscode.cpptools"],
+
+	// Use 'forwardPorts' to make a list of ports inside the container available locally.
+	// "forwardPorts": [],
+
+	// Uncomment the next line to run commands after the container is created - for example installing git.
+	// "postCreateCommand": "apt-get update && apt-get install -y git",
+
+	// Uncomment when using a ptrace-based debugger like C++, Go, and Rust
+	// "runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],
+
+	// Uncomment to use the Docker CLI from inside the container. See https://aka.ms/vscode-remote/samples/docker-in-docker.
+	// "mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ],
+
+	// Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root.
+	"remoteUser": "developer"
+}


=====================================
.gitignore
=====================================
@@ -36,6 +36,7 @@ tests/*working*
 scrm
 scrm_dbg
 scrm_prof
+scrm_asan
 
 # automake
 Makefile


=====================================
.travis.yml
=====================================
@@ -13,7 +13,7 @@ matrix:
     - os: osx
       env: CXXFLAGS="-m32 -Werror"
 sudo: required
-dist: xenial
+dist: bionic
 before_install: .travis/setup.sh "$TRAVIS_OS_NAME" "$CXX" "$CXXFLAGS"
 before_script:
   - ./bootstrap


=====================================
NEWS.md
=====================================
@@ -1,6 +1,17 @@
 scrm Version History
 ========================
 
+scrm 1.7.4
+------------------------
+Released: 2020-03-07
+
+### Bug Fixes
++ Fixes the initialization with an inital tree in Newick format (`-init`).
+  Big thanks to @nspope for reporting and locating this bug along with
+  suggesting a fix! 
+
+
+
 scrm 1.7.3
 ------------------------
 Released: 2018-11-18


=====================================
README.md
=====================================
@@ -1,4 +1,4 @@
-[![Project Status: Active - The project has reached a stable, usable state and is being actively developed.](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active)
+[![Project Status: Inactive – The project has reached a stable, usable state but is no longer being actively developed; support/maintenance will be provided as time allows.](https://www.repostatus.org/badges/latest/inactive.svg)](https://www.repostatus.org/#inactive)
 [![Build Status](https://travis-ci.org/scrm/scrm.svg?branch=master)](https://travis-ci.org/scrm/scrm)
 
 scrm
@@ -45,8 +45,7 @@ Details are available [in the wiki][2].
 
 ## Troubleshooting
 If you encounter problems while using _scrm_, please 
-[file a bug report](https://github.com/scrm/scrm/wiki/Reporting-Bugs) or mail to
-`develop (at) paulstaab.de`.
+[file a bug report](https://github.com/scrm/scrm/wiki/Reporting-Bugs).
 
 
 ## Citation


=====================================
configure.ac
=====================================
@@ -1,4 +1,4 @@
-AC_INIT([scrm], [1.7.3],[https://github.com/paulstaab/scrm/issues])
+AC_INIT([scrm], [1.7.4],[https://github.com/paulstaab/scrm/issues])
 AM_INIT_AUTOMAKE([subdir-objects -Wall -Werror foreign])
 
 # Use -O3 as default optimization level
@@ -52,6 +52,7 @@ AX_CHECK_COMPILE_FLAG([-Wcast-align], [OPT_CXXFLAGS="$OPT_CXXFLAGS -Wcast-align"
 AX_CHECK_COMPILE_FLAG([-Wunused], [OPT_CXXFLAGS="$OPT_CXXFLAGS -Wunused"], [], [-Werror])
 AX_CHECK_COMPILE_FLAG([-Woverloaded-virtual], [OPT_CXXFLAGS="$OPT_CXXFLAGS -Woverloaded-virtual"], [], [-Werror])
 AX_CHECK_COMPILE_FLAG([-pedantic], [OPT_CXXFLAGS="$OPT_CXXFLAGS -pedantic"], [], [-Werror])
+AX_CHECK_COMPILE_FLAG([-Wcatch-value], [OPT_CXXFLAGS="$OPT_CXXFLAGS -Wcatch-value"], [], [-Werror])
 
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT


=====================================
debian/README.test
=====================================
@@ -0,0 +1,9 @@
+Notes on how this package can be tested.
+────────────────────────────────────────
+
+This package can be tested by installing the package scrm-examples and
+running the provided test:
+
+    sh run-unit-test
+
+in order to confirm its integrity.


=====================================
debian/changelog
=====================================
@@ -1,3 +1,22 @@
+scrm (1.7.4-1) unstable; urgency=medium
+
+  * Team upload.
+
+  [ Steffen Möller ]
+  * Update metadata with ref to conda
+  * Update metadata - latexification
+
+  [ Samyak Jain ]
+  * Switch d/watch version to 4
+  * New upstream version 1.7.4
+  * Bumps standard version and remove d/compat (use debhelper-compaat instead)
+  * Adds autopkgtest
+  * Document how users can test their local installation
+  * Add debian/salsa-ci.yml
+  * Properly install tests data in examples package
+
+ -- Samyak Jain <samyak.jn11 at gmail.com>  Fri, 13 Mar 2020 02:02:53 +0530
+
 scrm (1.7.3-1) unstable; urgency=medium
 
   * Team upload.


=====================================
debian/compat deleted
=====================================
@@ -1 +0,0 @@
-11


=====================================
debian/control
=====================================
@@ -3,9 +3,9 @@ Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.
 Uploaders: Kevin Murray <spam at kdmurray.id.au>
 Section: science
 Priority: optional
-Build-Depends: debhelper (>= 11~),
+Build-Depends: debhelper-compat (= 12),
                libcppunit-dev
-Standards-Version: 4.2.1
+Standards-Version: 4.5.0
 Vcs-Browser: https://salsa.debian.org/med-team/scrm
 Vcs-Git: https://salsa.debian.org/med-team/scrm.git
 Homepage: https://github.com/scrm/scrm


=====================================
debian/salsa-ci.yml
=====================================
@@ -0,0 +1,4 @@
+---
+include:
+  - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml
+  - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml


=====================================
debian/scrm-examples.docs
=====================================
@@ -0,0 +1 @@
+debian/tests/run-unit-test


=====================================
debian/scrm-examples.install
=====================================
@@ -0,0 +1 @@
+tests/*	usr/share/doc/scrm/examples


=====================================
debian/tests/control
=====================================
@@ -0,0 +1,3 @@
+Tests: run-unit-test
+Depends: @
+Restrictions: allow-stderr


=====================================
debian/tests/run-unit-test
=====================================
@@ -0,0 +1,142 @@
+#!/bin/bash
+set -e
+
+pkg="scrm"
+
+export LC_ALL=C.UTF-8
+if [ "${AUTOPKGTEST_TMP}" = "" ] ; then
+  AUTOPKGTEST_TMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX)
+  # Double quote below to expand the temporary directory variable now versus
+  # later is on purpose.
+  # shellcheck disable=SC2064
+  trap "rm -rf ${AUTOPKGTEST_TMP}" 0 INT QUIT ABRT PIPE TERM
+fi
+
+cp -a /usr/share/doc/${pkg}/examples/* "${AUTOPKGTEST_TMP}"
+
+cd "${AUTOPKGTEST_TMP}"
+gunzip -r *
+
+cd tests/
+# Test the binaries using scrms build in debug checks
+if [ "$1" == "osx" ]; then
+  echo "On macOS => Skipping valgrind checks"
+  valgrind=0
+else
+  valgrind=1
+fi
+
+make scrm scrm_dbg || exit 1
+make scrm_asan 2> /dev/null
+supports_sanitizers=$?
+if [ "$supports_sanitizers" == "0" ]; then
+  echo "Using address sanitizers"
+fi
+
+function test_scrm {
+  echo -n " scrm $@ "
+  for i in `seq 1 10`; do
+    echo -n "."
+
+    # Test using scrm self-checks
+    ./scrm_dbg $@ -seed $i > /dev/null
+    if [ $? -ne 0 ]; then
+      echo ""
+      echo "Executing \"./scrm_dbg $@ -seed $i\" failed."
+      echo "Debug Call: make -mj2 scrm_dbg && ./scrm_dbg $@ -seed $i 2>&1 | less"
+      exit 1
+    fi
+
+    if [ "$supports_sanitizers" == "0" ]; then
+      ./scrm_asan $@ -seed $i > /dev/null
+      if [ $? -ne 0 ]; then
+        echo ""
+        echo "ASAN error in \"./scrm $@ -seed $i\""
+        exit 1
+      fi
+    fi
+
+    # Test for memory leaks
+    if [ $valgrind -ne 0 ]; then
+      valgrind --error-exitcode=1 --leak-check=full -q ./scrm $@ -seed $i > /dev/null
+      if [ $? -ne 0 ]; then
+        echo ""
+        echo "Valgrind check of \"./scrm $@ -seed $i\" failed."
+        exit 1
+      fi
+    fi
+
+  done
+  echo " done."
+}
+
+
+echo "Testing Initial Tree"
+ test_scrm 5 100 -t 5 || exit 1
+ test_scrm 3 100 -t 5 -L -oSFS -transpose-segsites || exit 1
+ test_scrm 50 20 -O || exit 1
+ test_scrm 25 1 -T || exit 1
+ test_scrm 10 5 -I 1 5 -eI 1.0 5 -L || exit 1
+ test_scrm 10 5 -I 2 2 2 0.5 -eI 1.0 3 3 -L || exit 1
+echo ""
+
+echo "Testing Recombinations"
+ test_scrm 4 10 -r 5 100 -l -1 || exit 1
+ test_scrm 6 10 -r 1 100 -t 5 -L -T -transpose-segsites -l -1 || exit 1
+ test_scrm 8 10 -r 1 100 -t 5 -oSFS -O -l -1 || exit 1
+ test_scrm 10 5 -r 5 100 -I 2 2 2 0.5 -eI 1.0 3 3 -L -l -1 || exit 1
+echo ""
+
+echo "Testing Pruning"
+ test_scrm 10 20 -r 10 500 -l 10 -t 5 -oSFS || exit 1
+ test_scrm 3 50 -r 10 500 -l 0 -t 1 -oSFS || exit 1
+ test_scrm 10 20 -r 10 500 -l 2r -L || exit 1
+ test_scrm 10 20 -r 1 500 -l -1 -T || exit 1
+ test_scrm 10 5 -r 5 100 -I 2 2 2 0.5 -eI 1.0 3 3 -L -l 2r || exit 1
+echo ""
+
+echo "Testing Migration"
+ test_scrm 5 5 -r 5 100 -I 2 3 2 1.2 || exit 1
+ test_scrm 10 2 -r 20 200 -I 5 2 2 2 2 2 0.75 -l 5 || exit 1
+ test_scrm 10 2 -r 10 100 -I 2 7 3 0.5 -eM 0.3 1.1 -O || exit 1
+ test_scrm 10 2 -r 10 100 -I 2 7 3 -m 1 2 0.3 -em 0.5 2 1 0.6 -eM 2.0 1 || exit 1
+ test_scrm 20 2 -I 3 2 2 2 1.0 -eI 1.0 2 2 2 -eI 2.0 2 3 3 || exit 1
+echo ""
+
+echo "Testing Size Change"
+  test_scrm 10 2 -r 1 100 -I 3 3 3 4 0.5 -eN 0.1 0.05 -eN 0.2 0.5 -O || exit 1 
+  test_scrm 10 2 -r 10 100 -I 3 3 3 4 0.5 -eN 0.1 0.05 -eN 0.2 0.5 -l 10 || exit 1 
+echo ""
+
+echo "Testing Splits & Merges"
+ test_scrm 5 3 -r 20 200 -I 2 3 2 0.4 -ej 1.1 2 1 -l 25  || exit 1
+ test_scrm 6 3 -r 20 200 -I 3 2 2 2 -ej 0.2 2 1 -ej 0.25 3 1 -l 25 || exit 1
+ test_scrm 20 2 -r 5 200 -I 2 10 10 1.5 -es 1.6 2 0.5 -eM 2.0 1 -l 25 || exit 1
+ test_scrm 20 2 -r 5 200 -I 2 10 10 1.5 -es 0.9 1 0.8 -es 1.6 2 0.5 -eM 2.0 1 -l 50 || exit 1
+ test_scrm 20 2 -r 5 200 -I 2 10 10 -eps 1.0 2 1 0.0 || exit 1
+echo ""
+
+echo "Testing Growth"
+ test_scrm 5 10 -r 20 200 -G 1.5 -l 25 || exit 1
+ test_scrm 5 6 -r 2 200 -G -2.5 -eG 1 0.0 -l 25 || exit 1
+ test_scrm 4 3 -r 2 200 -G -2.5 -eN 1 0.25 -eG 2 0.0 -eN 2.5 0.25 -l 25 || exit 1
+echo ""
+
+echo "Testing Variable Rates"
+ test_scrm 3 2 -r 2 100 -t 5 -st 10 10 -sr 20 5 -st 30 1 -sr 40 0 -st 50 20 -T || exit 1
+echo ""
+
+echo "Various Edge Cases"
+ test_scrm 6 1 -I 2 3 3 0.5 -r 1 100 -es 0 2 0.5 -ej 1 3 1 -t 1  || exit 1
+ test_scrm 10 1 -es 1.0 1 0.5 -ej 1.0 2 1 || exit 1
+ test_scrm 4 1 -t 1.0 -I 2 2 0 -ej 1.0 1 2 -eI 3.5 0 2 || exit 1
+echo ""
+
+# Generate html report
+lcov --base-directory . --directory . --zerocounters -q
+make check -mj
+lcov --base-directory . --directory . -c -o libbash_test.info
+# --rc lcov_branch_coverage=1 option will turn on branch check
+lcov --remove libbash_test.info "/usr*" -o libbash_test.info # remove output for external libraries
+rm -rf ./testCoverage
+genhtml -o ./testCoverage -t "libbash test coverage" --num-spaces 4 libbash_test.info --legend --function-coverage --demangle-cpp


=====================================
debian/watch
=====================================
@@ -1,3 +1,2 @@
-version=3
-
+version=4
 https://github.com/scrm/scrm/tags .*/v?(\d\S*)\.tar\.gz


=====================================
src/forest.cc
=====================================
@@ -1324,7 +1324,8 @@ Node* Forest::readNewickNode( std::string &in_str, std::string::iterator &it, si
 
 
 void Forest::readNewick( std::string &in_str ){
-  this->current_rec_ = 1;
+  this->set_next_base(0.0);
+  ++current_rec_;
   std::string::iterator it = in_str.begin();
   (void)this->readNewickNode( in_str, it );
   this->set_local_root( this->nodes()->last() );


=====================================
src/param.cc
=====================================
@@ -132,7 +132,7 @@ Model Param::parse() {
       // there might or might not follow a symmetric migration rate
       try {
         model.addSymmetricMigration(0.0, readNextInput<double>()/(model.population_number()-1), true, true);
-      } catch (std::invalid_argument e) {
+      } catch (std::invalid_argument& e) {
         --argv_i;
       }
     }
@@ -382,7 +382,7 @@ Model Param::parse() {
       try {
         // Maybe read in up to 3 seeds (ms compatibility)
         for (size_t i = 1; i < 3; ++i) seeds.at(i) = readNextInt();
-      } catch (std::invalid_argument e) {
+      } catch (std::invalid_argument& e) {
         --argv_i;
       }
 


=====================================
tests/test_binaries.sh
=====================================
@@ -13,6 +13,7 @@ make scrm_asan 2> /dev/null
 supports_sanitizers=$?
 if [ "$supports_sanitizers" == "0" ]; then
   echo "Using address sanitizers"
+  export ASAN_OPTIONS=detect_leaks=0
 fi
 
 function test_scrm {
@@ -60,6 +61,7 @@ echo "Testing Initial Tree"
  test_scrm 25 1 -T || exit 1
  test_scrm 10 5 -I 1 5 -eI 1.0 5 -L || exit 1
  test_scrm 10 5 -I 2 2 2 0.5 -eI 1.0 3 3 -L || exit 1
+ test_scrm 3 1 -init tests/tree.newick -t 5 || exit 1
 echo ""
 
 echo "Testing Recombinations"
@@ -67,6 +69,7 @@ echo "Testing Recombinations"
  test_scrm 6 10 -r 1 100 -t 5 -L -T -transpose-segsites -l -1 || exit 1
  test_scrm 8 10 -r 1 100 -t 5 -oSFS -O -l -1 || exit 1
  test_scrm 10 5 -r 5 100 -I 2 2 2 0.5 -eI 1.0 3 3 -L -l -1 || exit 1
+ test_scrm 3 10 -r 5 100 -init tests/tree.newick -t 5 || exit 1
 echo ""
 
 echo "Testing Pruning"


=====================================
tests/tree.newick
=====================================
@@ -0,0 +1 @@
+((1:1.0,2:1.0):1.0,3:1.0);



View it on GitLab: https://salsa.debian.org/med-team/scrm/-/compare/4039116d33850495ba3cc5a669290882c539c9b6...63390d493b31fb25324a89a08f1793326c5cb637

-- 
View it on GitLab: https://salsa.debian.org/med-team/scrm/-/compare/4039116d33850495ba3cc5a669290882c539c9b6...63390d493b31fb25324a89a08f1793326c5cb637
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20200312/bcd0ca6d/attachment-0001.html>


More information about the debian-med-commit mailing list