Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repair Appveyor #697

Merged
merged 4 commits into from
Apr 24, 2018
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ install:
if ($env:CONDA -eq "true") {
conda config --set always_yes yes --set changeps1 no;
conda install -q pip setuptools wheel numpy scipy;
pip install -r develop-requirements.txt;
pip install .
pip install --disable-pip-version-check -r develop-requirements.txt;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than setting these options on each command I prefer to set an environment variable PIP_DISABLE_PIP_VERSION_CHECK=yes.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact, I just set this variable through the interface so you don't have to worry about it. These options can simply be removed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it bother if I still set the environment variable in the config? Just so that it is explicit and people could fork the config and it would still work.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, please do.

pip install --disable-pip-version-check .
} else {
pip install --upgrade setuptools wheel tox
pip install --disable-pip-version-check --upgrade setuptools wheel tox
}

build: off
Expand Down
4 changes: 2 additions & 2 deletions cobra/test/test_solver_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,12 +467,12 @@ def test_reaction_imul(self, model):
with model:
model.reactions.EX_glc__D_e *= 100
assert model.constraints.glc__D_e.expression.coeff(
model.variables.EX_glc__D_e) == -100
model.variables.EX_glc__D_e) == -100.0
assert model.reactions.EX_glc__D_e.reaction == \
'100.0 glc__D_e <=> '

assert model.constraints.glc__D_e.expression.coeff(
model.variables.EX_glc__D_e) == -1
model.variables.EX_glc__D_e) == -1.0
assert model.reactions.EX_glc__D_e.reaction == 'glc__D_e <=> '

with model:
Expand Down
5 changes: 3 additions & 2 deletions cobra/util/version_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

import platform

import pip
import pkg_resources

__all__ = ("show_versions",)

Expand Down Expand Up @@ -55,7 +55,8 @@ def get_pkg_info():
# using requirements files that can be read in.
dependencies = frozenset(PKG_ORDER)
blob = dict()
for dist in pip.get_installed_distributions():
dists = [d for d in pkg_resources.working_set]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since dists is not used for anything else can you combine these two lines to:

for dist in pkg_resources.working_set:

please?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do. This is actually taken from #696.

for dist in dists:
if dist.project_name in dependencies:
blob[dist.project_name] = dist.version
return blob
Expand Down