Skip to content

Commit 34ed552

Browse files
committed
Merge branch 'nov20' of github.com:bjodah/chempy into nov20
2 parents cba1a43 + 88fd2f5 commit 34ed552

File tree

4 files changed

+13
-19
lines changed

4 files changed

+13
-19
lines changed

.ci/ci-01-install.sh

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/bin/bash
22
set -euxo pipefail
3+
source /opt-3/cpython-v3.*-apt-deb/bin/activate
34
export CPATH=$SUNDBASE/include:${CPATH:-}
45
export LIBRARY_PATH=$SUNDBASE/lib
56
export LD_LIBRARY_PATH=$SUNDBASE/lib
6-
source /opt-3/cpython-v3.*-apt-deb/bin/activate
77
PYTHON=python
88
INSTALL_PIP_FLAGS="--cache-dir $CACHE_ROOT/pip_cache ${INSTALL_PIP_FLAGS:-}" # --user
99
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
4040
#( cd /tmp; $PYTHON -m pytest -k "not pool_discontinuity_approx" --pyargs $pypkg )
4141
done
4242

43-
$PYTHON -m pip install $INSTALL_PIP_FLAGS -e .[all]
4443
$PYTHON -c "import pycvodes; import pyodesys; import pygslodeiv2"
44+
$PYTHON -m pip install $INSTALL_PIP_FLAGS -e .[all]
45+
[[ $(python3 setup.py --version) =~ ^[0-9]+.* ]]
4546
#git fetch -tq
4647
$PYTHON setup.py sdist # test pip installable sdist (checks MANIFEST.in)
4748
git archive -o dist/chempy-head.zip HEAD # test pip installable zip (symlinks break)
4849
mkdir -p deploy/public_html/branches/${CI_COMMIT_BRANCH}
4950
cp dist/chempy-* deploy/public_html/branches/${CI_COMMIT_BRANCH}/
50-
51-
set +e
52-
[[ $($PYTHON setup.py --version) =~ ^[0-9]+.* ]]
53-
./scripts/run_tests.sh --cov chempy --cov-report html
54-
bash
55-
./scripts/coverage_badge.py htmlcov/ htmlcov/coverage.svg
56-

.ci/ci-02-run-tests.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#!/bin/bash
22
set -euxo pipefail
33
source /opt-3/cpython-v3.*-apt-deb/bin/activate
4-
5-
[[ $(python3 setup.py --version) =~ ^[0-9]+.* ]]
6-
export \
7-
PYODESYS_CVODE_FLAGS="-isystem $SUNDBASE/include -isystem /usr/include/suitesparse" \
8-
PYODESYS_CVODE_LDFLAGS="-Wl,--disable-new-dtags -Wl,-rpath,$SUNDBASE/lib -L$SUNDBASE/lib"
9-
4+
export CPATH=$SUNDBASE/include:${CPATH:-}
5+
export LIBRARY_PATH=$SUNDBASE/lib
6+
export LD_LIBRARY_PATH=$SUNDBASE/lib
7+
PYTHON=python
8+
INSTALL_PIP_FLAGS="--cache-dir $CACHE_ROOT/pip_cache ${INSTALL_PIP_FLAGS:-}" # --user
9+
$PYTHON -m pip install $INSTALL_PIP_FLAGS -e .[all]
1010
./scripts/run_tests.sh --cov chempy --cov-report html
1111
./scripts/coverage_badge.py htmlcov/ htmlcov/coverage.svg

chempy/chemistry.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -482,10 +482,10 @@ def from_string(cls, string, substance_keys=None, globals_=None, **kwargs):
482482
>>> r4 = Reaction.from_string("A -> 2 B; 'k'", 'A B')
483483
>>> r4.rate(dict(A=3, B=5, k=7)) == {'A': -3*7, 'B': 2*3*7}
484484
True
485-
>>> r5 = Reaction.from_string("A -> B; 1/molar/second", 'A B')
485+
>>> r5 = Reaction.from_string("A -> B; 1/molar/second", 'A B') # doctest: +IGNORE_EXCEPTION_DETAIL
486486
Traceback (most recent call last):
487487
...
488-
ValueError: Unable to convert between units ...
488+
ValueError: Incompatible units
489489
490490
491491
Notes

chempy/units.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -651,10 +651,10 @@ class Backend(object):
651651
>>> math.exp(3*km) == math.exp(3*m)
652652
True
653653
>>> be = Backend('math')
654-
>>> be.exp(3*km)
654+
>>> be.exp(3*km) # doctest: +IGNORE_EXCEPTION_DETAIL
655655
Traceback (most recent call last):
656656
...
657-
ValueError: Unable to convert between units of "km" and "dimensionless"
657+
ValueError: Incompatible units
658658
>>> import numpy as np
659659
>>> np.sum([1000*pq.metre/pq.kilometre, 1])
660660
1001.0

0 commit comments

Comments
 (0)