draeger-lab / SBSCL

The Systems Biology Simulation Core Library (SBSCL) provides an efficient and exhaustive Java implementation of methods to interpret the content of models encoded in the Systems Biology Markup Language (SBML) and its numerical solution.
https://draeger-lab.github.io/SBSCL/
GNU Lesser General Public License v3.0
20 stars 13 forks source link

GSoC - SBML L3V2 models support with some other bug fixes #48

Closed hemilpanchiwala closed 4 years ago

hemilpanchiwala commented 4 years ago

Major changes made in SBSCL (from GSoC start):

This PR closes #38, closes #41, closes #42, closes #43. More information about changes made till now in SBSCL can be found at my blog posts [Link].

hemilpanchiwala commented 4 years ago

You have a ton of formating changes of comments in this pull request which makes it very hard to review the actual changes. In the future do separate pull requests for formating changes (of the 98 changed files only ~5-6 were actually changed)

@matthiaskoenig, will take care of it from next time.

hemilpanchiwala commented 4 years ago

@hemilpanchiwala: Some of the comments are not related to your code. Please address the comments related to your changes first. For the rest: I am OK if you will adjust the rest during the next phase.

Small comments for the future:

  • Please always exclude the formatting changes to the separate PR. I've seen a lot of whitespace changes/etc. in this PR. This will only add work for the reviewer and is not interesting at all.
  • I would suggest looking into coding conventions and guidelines of Eclipse Foundation (if you didn't do this already): https://wiki.eclipse.org/Development_Conventions_and_Guidelines

Nice work.

@zakharc, Extremely sorry for adding the formatting in this PR. I will take care from next time. And, I have formatted the code according to the template provided by the JSBML community linked here.

hemilpanchiwala commented 4 years ago

@zakharc, I have updated most of the requested changes. I will soon update the SBMLTestSuiteRunnerWrapper class by dividing the code into different methods. And for the JavaDoc comments of the overridden methods and some others, I will update it as I work. However, all comment changes pointed by you have been updated.

shalinshah1993 commented 4 years ago

Lots of good work here!

# avoid
text=auto 
eol=lf

# Java sources
*.java          text diff=java
*.gradle        text diff=java
*.gradle.kts    text diff=java

# These files are text and should be normalized (Convert crlf => lf)
*.css           text diff=css
*.df            text
*.htm           text diff=html
*.html          text diff=html
*.js            text
*.jsp           text
*.jspf          text
*.jspx          text
*.properties    text
*.tld           text
*.tag           text
*.tagx          text
*.xml           text

# These files are binary and should be left untouched
# (binary is a macro for -text -diff)
*.class         binary
*.dll           binary
*.ear           binary
*.jar           binary
*.so            binary
*.war           binary
*.jks           binary
hemilpanchiwala commented 4 years ago

@shalinshah1993, I will add the snippet you gave in the .gitattributes file in the next commit. But for the tests, I don't think there is a single failing test instead there are many SBML Test Suite tests that are failing currently due to some SBML L3V2 and other issues.

hemilpanchiwala commented 4 years ago

Why did subclassing not work? I.e. only overwriting the solve method?

@matthiaskoenig, It did not work as the new instance of GlpkSolver was made in the solve() method explicitly. We did not have any reference to that class in SBSCL.

Here, the thing is going on as follows: We make an object of LinearProgramSolver (which is an interface) that is implemented by GLPKSolver class where the solve() method implementation is found. In this solve() method, scpsolver creates an instance of the GlpkSolver class which was creating all the problems and so making that instance (of GlpkSolver) null using deleteProb() solves the issue. But this is all in scpsolver so I made a copy of the GLPKSolver class with making the instance of GlpkSolver null on completing its usage. Once scpsolver makes this change then we can remove this class.

Note: GLPKSolver and GlpkSolver are different classes in scpsolver.

matthiaskoenig commented 4 years ago

Will merge this as soon as the minor changes & the test case are there.

hemilpanchiwala commented 4 years ago

Please add a FluxBalanceAnalysis test which:

  • takes the ecoli core model, simulates a FBA, compares objective; currently a simple test case for FBA outside of the SBMLTestSuite is missing

@matthiaskoenig, I have updated the changes. And FBA test was there but it was named CobraSolverTest and was ignored by @Ignore tag. I have renamed it to FluxBalanceAnalysisTest and also removed the ignore tag.