opencobra / cobratoolbox

The COnstraint-Based Reconstruction and Analysis Toolbox. Documentation:
https://opencobra.github.io/cobratoolbox
Other
252 stars 317 forks source link

Question - regarding the expectation of mcc ctf compile #2275

Open supertick opened 3 months ago

supertick commented 3 months ago

Hello, This is only an observation and question regarding the expectation of master/head to successfully compile with mcc.

I've started trying to compile cobratoolbox with with a matlab app. The app code compiles fine, but the cobratoolbox has a variety of errors. Some are invalid default values in functions: function allPaths = DFS(graph, s, e, allPaths = {}, path = [], upperBound = 5) But there are a variety of others, I am still working through them. I'm guessing mcc is not used to validate as part of the release process of cobratoolbox ? Forgive my ignorance, I'm a complete noobie regarding MatLab, however, I do have some software engineering experience. Thanks ! Cheers.

rmtfleming commented 3 months ago

Hi supertick,

I wanted to address you by your normal name and I also wanted to understand where you are from. Maybe your gitlab could add a link to your bio?

You are trying to do something that I think is a really good idea. Since a long time, I've wanted to enable those without a matlab licence to use matlab, so by app, I assume you mean this: https://uk.mathworks.com/help/compiler/create-standalone-app-using-application-compiler-app.html

When I took over as lead developer of the cobra toolbox, it was with the ethos that we should not intentionally make an a priori judgement as to what constitutes a "valueable" contribution to the cobra toolbox. We accepted contributions once they followed contribution guidelines https://opencobra.github.io/cobratoolbox/stable/contributing.html Then, it is up to the community to decide for themselves what part of the cobra toolbox to use. As such, there is a variety of levels of quality of code contributions so it will be very difficult to completely isolate all errors.

As part of the developments towards v4 of the toolbox, Farid (in cc) and others have been trying to fix any of the code that fails as a result of running this script https://github.com/opencobra/cobratoolbox/blob/master/test/testAll.m

The idea is to define the core subset of the cobra toolbox by the code that passes the test functions that currently exist. I suggest that you try to isolate that code, then see if that part can be compiled into an app.

One issue that you will face is that the cobra toolbox can manage somewhat with the free glpk solver, but really to make the most of it one needs an industrial solver, like gurobi or mosek, which require licences. How would that work with an app?

By the way, that piece of code function allPaths = DFS(graph, s, e, allPaths = {}, path = [], upperBound = 5) is not in the cobra toolbox: https://github.com/search?q=repo%3Aopencobra%2Fcobratoolbox++allPaths&type=code It might be in one of the submodules, likely this one: https://github.com/dgleich/gaimc/tree/master

It would be an authorship level contribution to v4 if you can get a testAll based app to run, esp with industrial solvers.

Regards,

Ronan

On Wed, 21 Aug 2024 at 17:23, GroG @.***> wrote:

Hello, This is only an observation and question regarding the expectation of master/head to successfully compile with mcc.

I've started trying to compile with with a matlab app. The app code compiles fine, but the cobratoolbox has a variety of errors. Some are invalid default values in functions function allPaths = DFS(graph, s, e, allPaths = {}, path = [], upperBound = 5) But there are a variety of others, still working through them. I'm guessing mcc is not used to validate as part of the release process of cobratoolbox ? Forgive my ignorance, I'm a complete noobie regarding MatLab, however, I do have some software engineering experience. Thanks ! Cheers.

— Reply to this email directly, view it on GitHub https://github.com/opencobra/cobratoolbox/issues/2275, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQMEOWNRL3DTQD3QKFOK23ZSS5HVAVCNFSM6AAAAABM4MDNCWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGQ3TQNBWGAYDGMY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

--

Mr. Ronan MT Fleming B.V.M.S. Dip. Math. Ph.D.

Associate Professor, School of Medicine, University of Galway, Ireland. Coordinator of the Horizon Europe project "Reconstruction and Computational Modelling for Inherited Metabolic Diseases" (Recon4IMD https://www.recon4imd.org/)

Peer-reviewed publications: https://goo.gl/FZPG23 Mobile: +353 852 109 806 Github: @rmtfleming https://github.com/rmtfleming

rmtfleming commented 3 months ago

Sorry, that should read: Since a long time, I've wanted to enable those without a matlab licence to use the COBRA toolbox!

On Thu, 22 Aug 2024 at 21:54, Ronan M.T. Fleming @.***> wrote:

Hi supertick,

I wanted to address you by your normal name and I also wanted to understand where you are from. Maybe your gitlab could add a link to your bio?

You are trying to do something that I think is a really good idea. Since a long time, I've wanted to enable those without a matlab licence to use matlab, so by app, I assume you mean this: https://uk.mathworks.com/help/compiler/create-standalone-app-using-application-compiler-app.html

When I took over as lead developer of the cobra toolbox, it was with the ethos that we should not intentionally make an a priori judgement as to what constitutes a "valueable" contribution to the cobra toolbox. We accepted contributions once they followed contribution guidelines https://opencobra.github.io/cobratoolbox/stable/contributing.html Then, it is up to the community to decide for themselves what part of the cobra toolbox to use. As such, there is a variety of levels of quality of code contributions so it will be very difficult to completely isolate all errors.

As part of the developments towards v4 of the toolbox, Farid (in cc) and others have been trying to fix any of the code that fails as a result of running this script https://github.com/opencobra/cobratoolbox/blob/master/test/testAll.m

The idea is to define the core subset of the cobra toolbox by the code that passes the test functions that currently exist. I suggest that you try to isolate that code, then see if that part can be compiled into an app.

One issue that you will face is that the cobra toolbox can manage somewhat with the free glpk solver, but really to make the most of it one needs an industrial solver, like gurobi or mosek, which require licences. How would that work with an app?

By the way, that piece of code function allPaths = DFS(graph, s, e, allPaths = {}, path = [], upperBound = 5) is not in the cobra toolbox:

https://github.com/search?q=repo%3Aopencobra%2Fcobratoolbox++allPaths&type=code It might be in one of the submodules, likely this one: https://github.com/dgleich/gaimc/tree/master

It would be an authorship level contribution to v4 if you can get a testAll based app to run, esp with industrial solvers.

Regards,

Ronan

On Wed, 21 Aug 2024 at 17:23, GroG @.***> wrote:

Hello, This is only an observation and question regarding the expectation of master/head to successfully compile with mcc.

I've started trying to compile with with a matlab app. The app code compiles fine, but the cobratoolbox has a variety of errors. Some are invalid default values in functions function allPaths = DFS(graph, s, e, allPaths = {}, path = [], upperBound = 5) But there are a variety of others, still working through them. I'm guessing mcc is not used to validate as part of the release process of cobratoolbox ? Forgive my ignorance, I'm a complete noobie regarding MatLab, however, I do have some software engineering experience. Thanks ! Cheers.

— Reply to this email directly, view it on GitHub https://github.com/opencobra/cobratoolbox/issues/2275, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQMEOWNRL3DTQD3QKFOK23ZSS5HVAVCNFSM6AAAAABM4MDNCWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGQ3TQNBWGAYDGMY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

--

Mr. Ronan MT Fleming B.V.M.S. Dip. Math. Ph.D.


Associate Professor, School of Medicine, University of Galway, Ireland. Coordinator of the Horizon Europe project "Reconstruction and Computational Modelling for Inherited Metabolic Diseases" (Recon4IMD https://www.recon4imd.org/)


Peer-reviewed publications: https://goo.gl/FZPG23 Mobile: +353 852 109 806 Github: @rmtfleming https://github.com/rmtfleming


--

Mr. Ronan MT Fleming B.V.M.S. Dip. Math. Ph.D.

Associate Professor, School of Medicine, University of Galway, Ireland. Coordinator of the Horizon Europe project "Reconstruction and Computational Modelling for Inherited Metabolic Diseases" (Recon4IMD https://www.recon4imd.org/)

Peer-reviewed publications: https://goo.gl/FZPG23 Mobile: +353 852 109 806 Github: @rmtfleming https://github.com/rmtfleming

supertick commented 3 months ago

Hi, Thanks for your prompt reply.

My motive started from a project using a product called "MatLab AWS production service" maintained by MatLab. It's intent is to run MatLab as a potential web service. It requires deployments to be compiled into a ctf. It has the MatLab runtime installed only. I'm relatively new to the project I am working on, and a complete noobie to MatLab as I mentioned.

In order to satisfy some of my project requirements quickly, I chose a brute force method of compiling with mcc -a "cobratoolbox" .... At some point, I will go through and find what exactly is being used by our project. There are not many syntax errors considering the amount of code. I'm guessing the command I used goes through recursively linting and compiling all the files. Or, code is pulled in from imports or recursive dependencies? ... again I'm new to mysteries of how MatLab works.

I understand the challenge of maintaining quality of an open source project, I run a couple myself ;) In the end, the first iteration for my project will probably not use ctf, based on the complexity and time constraints. Since a long time, I've wanted to enable those without a matlab licence to use the COBRA toolbox! This seems like a worthy goal.

From my software engineering perspective, I saw the init has a parameter to not update itself which is good, although I'd question it being defaulted to true. Additionally, I didn't see a parameter or method to "not" use a git call if git is installed. In my environment, the expectation is code should not self modify nor reach out over the network by default, but the objectives here could be very different.

Cheers, Greg.