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

WIP: Fix to model summary methods #268

Merged
merged 1 commit into from
Aug 18, 2016
Merged

Conversation

pstjohn
Copy link
Contributor

@pstjohn pstjohn commented Aug 16, 2016

This fix resolves #267, in which models that do not conform to the
standard boundary reaction format would cause the model_summary method
to fail. Now the summary method will print the ID of the first
metabolite and raise a warning if a boundary reaction exchanges more
than one species.

This fix resolves opencobra#267, in which models that do not conform to the
standard boundary reaction format would cause the `model_summary` method
to fail. Now the summary method will print the ID of the first
metabolite and raise a warning if a boundary reaction exchanges more
than one species.
@coveralls
Copy link

coveralls commented Aug 16, 2016

Coverage Status

Coverage increased (+0.01%) to 84.328% when pulling c4f2dc3 on pstjohn:summary_fix into 9b279ff on opencobra:master.

@pstjohn
Copy link
Contributor Author

pstjohn commented Aug 16, 2016

Good catch -- I'll work on that.
You're right, splitting coupled boundary reactions shouldn't be too tough either

@cdiener
Copy link
Member

cdiener commented Aug 17, 2016

Awesome. If you need help with anything you know where to find me :)

@pstjohn pstjohn changed the title Fix to model summary methods WIP: Fix to model summary methods Aug 17, 2016
@pstjohn
Copy link
Contributor Author

pstjohn commented Aug 17, 2016

While I'm at it we might as well get to #266, #238, and #240.

How would we feel about exporting table formatting to a third party? It might make the code a bit more extendable / maintainable. tabulate looks promising, but I'm certainly happy to look at others if you have suggestions. (Or if we want to avoid additional dependencies)

@cdiener
Copy link
Member

cdiener commented Aug 17, 2016

I agree. This kind of formatting usually has hundreds of edge cases one has to consider ("what happens if the name of the reaction is super long", etc.). I like how it's done now with converting everything to a pandas data frame and then writing some formatting for that data frame. tabulate looks good, we just have to check how it deals with long strings and how it plays with pandas (for instance the reaction strings). In terms of dependencies I think everything that does not have compiled code is fine.

@hredestig hredestig merged commit a3d7216 into opencobra:master Aug 18, 2016
@hredestig
Copy link
Contributor

pardon the premature merge, the bug fix was already good, please open new pr for the additional issues you mentioned. Anyway, tabulate looks like good option, prettytable is another but tabulate directly takes pandas df so maybe the better option.

@pstjohn
Copy link
Contributor Author

pstjohn commented Aug 18, 2016

Yikes, as @cdiener mentioned there was still an issue with assigning input and output fluxes..
I'll try to send in another PR soon that fixes the current master then.

@hredestig
Copy link
Contributor

ouch, yes mea culpa :( This also reminds me I think it would be good to start doing merges to devel first, and only upon release to master..

@cdiener
Copy link
Member

cdiener commented Aug 18, 2016

I think there is no problem here. The bug I reported initially was already fixed here and the rest can be in another pull req. I think bug fix pull requests are fine in master, otherwise master would just be a glorified tag for the latest release :)

@pstjohn
Copy link
Contributor Author

pstjohn commented Aug 18, 2016

Sounds great. Regardless, it shouldn't be too long until I have a newer implementation ready.
Tabulate seems to be working great, and should make maintenance for these methods a lot easier going forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants