diff --git a/.ci/ci-01-install.sh b/.ci/ci-01-install.sh index 56e9d346..a6a82903 100755 --- a/.ci/ci-01-install.sh +++ b/.ci/ci-01-install.sh @@ -1,9 +1,9 @@ #!/bin/bash set -euxo pipefail +source /opt-3/cpython-v3.*-apt-deb/bin/activate export CPATH=$SUNDBASE/include:${CPATH:-} export LIBRARY_PATH=$SUNDBASE/lib export LD_LIBRARY_PATH=$SUNDBASE/lib -source /opt-3/cpython-v3.*-apt-deb/bin/activate PYTHON=python INSTALL_PIP_FLAGS="--cache-dir $CACHE_ROOT/pip_cache ${INSTALL_PIP_FLAGS:-}" # --user for pypkg in pyodeint pygslodeiv2 pycompilation pycodeexport pycvodes pykinsol sym pyodesys; do @@ -40,17 +40,11 @@ for pypkg in pyodeint pygslodeiv2 pycompilation pycodeexport pycvodes pykinsol s #( cd /tmp; $PYTHON -m pytest -k "not pool_discontinuity_approx" --pyargs $pypkg ) done -$PYTHON -m pip install $INSTALL_PIP_FLAGS -e .[all] $PYTHON -c "import pycvodes; import pyodesys; import pygslodeiv2" +$PYTHON -m pip install $INSTALL_PIP_FLAGS -e .[all] +[[ $(python3 setup.py --version) =~ ^[0-9]+.* ]] #git fetch -tq $PYTHON setup.py sdist # test pip installable sdist (checks MANIFEST.in) git archive -o dist/chempy-head.zip HEAD # test pip installable zip (symlinks break) mkdir -p deploy/public_html/branches/${CI_COMMIT_BRANCH} cp dist/chempy-* deploy/public_html/branches/${CI_COMMIT_BRANCH}/ - -set +e -[[ $($PYTHON setup.py --version) =~ ^[0-9]+.* ]] -./scripts/run_tests.sh --cov chempy --cov-report html -bash -./scripts/coverage_badge.py htmlcov/ htmlcov/coverage.svg - diff --git a/.ci/ci-02-run-tests.sh b/.ci/ci-02-run-tests.sh index f15f709c..15040980 100755 --- a/.ci/ci-02-run-tests.sh +++ b/.ci/ci-02-run-tests.sh @@ -1,11 +1,11 @@ #!/bin/bash set -euxo pipefail source /opt-3/cpython-v3.*-apt-deb/bin/activate - -[[ $(python3 setup.py --version) =~ ^[0-9]+.* ]] -export \ - PYODESYS_CVODE_FLAGS="-isystem $SUNDBASE/include -isystem /usr/include/suitesparse" \ - PYODESYS_CVODE_LDFLAGS="-Wl,--disable-new-dtags -Wl,-rpath,$SUNDBASE/lib -L$SUNDBASE/lib" - +export CPATH=$SUNDBASE/include:${CPATH:-} +export LIBRARY_PATH=$SUNDBASE/lib +export LD_LIBRARY_PATH=$SUNDBASE/lib +PYTHON=python +INSTALL_PIP_FLAGS="--cache-dir $CACHE_ROOT/pip_cache ${INSTALL_PIP_FLAGS:-}" # --user +$PYTHON -m pip install $INSTALL_PIP_FLAGS -e .[all] ./scripts/run_tests.sh --cov chempy --cov-report html ./scripts/coverage_badge.py htmlcov/ htmlcov/coverage.svg diff --git a/chempy/chemistry.py b/chempy/chemistry.py index 5fb209f9..1861e871 100644 --- a/chempy/chemistry.py +++ b/chempy/chemistry.py @@ -482,10 +482,10 @@ def from_string(cls, string, substance_keys=None, globals_=None, **kwargs): >>> r4 = Reaction.from_string("A -> 2 B; 'k'", 'A B') >>> r4.rate(dict(A=3, B=5, k=7)) == {'A': -3*7, 'B': 2*3*7} True - >>> r5 = Reaction.from_string("A -> B; 1/molar/second", 'A B') + >>> r5 = Reaction.from_string("A -> B; 1/molar/second", 'A B') # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... - ValueError: Unable to convert between units ... + ValueError: Incompatible units Notes diff --git a/chempy/units.py b/chempy/units.py index c0eac974..7479d241 100644 --- a/chempy/units.py +++ b/chempy/units.py @@ -651,10 +651,10 @@ class Backend(object): >>> math.exp(3*km) == math.exp(3*m) True >>> be = Backend('math') - >>> be.exp(3*km) + >>> be.exp(3*km) # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... - ValueError: Unable to convert between units of "km" and "dimensionless" + ValueError: Incompatible units >>> import numpy as np >>> np.sum([1000*pq.metre/pq.kilometre, 1]) 1001.0