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

Make atomizer use pathfinder, improve help msg #460

Merged
merged 2 commits into from Sep 18, 2019

Conversation

@alubbock
Copy link
Member

alubbock commented Sep 9, 2019

Atomizer now uses pysb.pathfinder to locate the external binary,
which gives a more meaningful error message.

In addition, pathfinder now shows a conda install command for missing
optional packages.

Old Error:

FileNotFoundError: [Errno 2] No such file or directory: '[...]/share/bionetgen/bin/sbmlTranslator': '[...]/share/bionetgen/bin/sbmlTranslator'

New Error:

Exception: The program Atomizer was not found in the default search path(s) for your operating system:

/usr/local/share/BioNetGen/bin
/Users/alex/miniconda3/envs/pysb/bin
/Users/alex/miniconda3/condabin
/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin
/Library/TeX/texbin
/opt/X11/bin

Either install it to one of those paths, or set a custom path using the environment variable BNGPATH or by calling the function pysb.pathfinder.set_path()

Conda users can install Atomizer using the following command:

conda install -c alubbock atomizer
Atomizer now uses pysb.pathfinder to locate the external binary,
which gives a more meaningful error message.

In addition, pathfinder now shows a conda install command for missing
optional packages.
Copy link
Member

jmuhlich left a comment

Looks good, although pathfinder.get_path is getting hairy. :)

@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Sep 18, 2019

Codecov Report

Merging #460 into master will decrease coverage by 0.89%.
The diff coverage is 7.69%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #460     +/-   ##
=========================================
- Coverage   79.45%   78.55%   -0.9%     
=========================================
  Files          96       96             
  Lines        9633     9644     +11     
=========================================
- Hits         7654     7576     -78     
- Misses       1979     2068     +89
Impacted Files Coverage Δ
pysb/pathfinder.py 48.31% <0%> (-7.53%) ⬇️
pysb/importers/sbml.py 76.92% <100%> (-2.83%) ⬇️
pysb/simulator/scipyode.py 69.23% <0%> (-20.98%) ⬇️
pysb/tests/test_simulator_scipy.py 93.26% <0%> (-5.06%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f6ee586...9d5683b. Read the comment docs.

@alubbock alubbock merged commit b909661 into pysb:master Sep 18, 2019
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@alubbock alubbock deleted the alubbock:check_atomizer_installed branch Sep 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.