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

fix: find toolbox version #166

Merged
merged 2 commits into from
Oct 8, 2018
Merged

fix: find toolbox version #166

merged 2 commits into from
Oct 8, 2018

Conversation

BenjaSanchez
Copy link
Contributor

@BenjaSanchez BenjaSanchez commented Oct 1, 2018

Main improvements in this PR:

A recent change in exportForGit.m (PR #160) created a bug that duplicated the version number for RAVEN and COBRA (as fopen will look up a file in all available paths if full path is not specified):

image

To correct this, version.txt is now opened with its full path. This was tested on yeast-GEM with the changes included locally in the master branch of RAVEN and works as expected:

image

I hereby confirm that I have:

find version.txt with full path to avoid replicates
@BenjaSanchez BenjaSanchez added the bug Bug that needs fixing. label Oct 1, 2018
@BenjaSanchez BenjaSanchez requested a review from edkerk October 1, 2018 09:32
Copy link
Member

@edkerk edkerk left a comment

Choose a reason for hiding this comment

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

If masterFlag is true, and a toolbox is not in master, then it doesn't give the relevant error message, but rather prints "RAVEN/COBRA toolbox cannot be found". The reason for this is that checkIfMaster is called within a try-catch block, so the error message triggered by checkIfMaster is not shown, while Matlab will jump to the catch section that prints "RAVEN/COBRA toolbox cannot be found".

if toolboxes are not in master and checkIfMaster=TRUE, the proper error message will be displayed
@BenjaSanchez
Copy link
Contributor Author

@edkerk thanks for spotting this. The latest commit fixes this issue, by doing things separately:

  1. Find root of toolbox repo. If not found, version = 'unknown'
  2. Check if toolbox is in the master branch. If checkIfMaster=TRUE, error when not.
  3. Read version.txt. If not found, version = 'unknown'

@edkerk edkerk merged commit 3b0f2ec into devel Oct 8, 2018
@edkerk edkerk deleted the fix/exportForGit branch October 8, 2018 14:57
@edkerk edkerk mentioned this pull request Oct 16, 2018
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug that needs fixing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants