Skip to content

Question about submodule handling for historical COBRA Toolbox commits #2669

Description

@DrLidaSoltani

I am working with several historical commits of the COBRA Toolbox for dissertation-related analyses, and I need to switch between commits in a reproducible way.

As I understand it, code written for a specific COBRA Toolbox commit is expected to be most reliable when run with that exact commit, especially for large-scale models such as plant or multi-organism models. Switching the main COBRA Toolbox commit using Git is straightforward. However, I am less certain about the correct handling of submodules after switching commits.

After running initCobraToolbox in MATLAB, COBRA attempts to initialize or update submodules. My observations suggest that simply checking out the desired COBRA commit is not sufficient; the submodules also need to match the versions expected by that commit.

I would therefore like to ask:

After switching to a historical COBRA Toolbox commit, should users always run git submodule sync --recursive and git submodule update --init --recursive before running initCobraToolbox?
Does initCobraToolbox attempt to retrieve the exact submodule commits recorded in the selected COBRA commit, or can it update submodules to newer branch heads?
If an older COBRA commit refers to submodule repositories that have since been moved, renamed, or removed, what is the recommended way to reconstruct the correct historical submodule state?
For strict reproducibility, would you recommend maintaining separate COBRA Toolbox clones for each commit/version rather than repeatedly switching commits in the same working tree?

The issue I am currently encountering is that, after switching commits and running initCobraToolbox, COBRA repeatedly attempts to access GitHub but fails to retrieve the required submodules, even with an active internet connection. This makes me suspect that some historical submodule references may no longer be available from their original locations.

For reference, the specific COBRA Toolbox commit I am currently testing is:

8f24cef.
The environment is MATLAB R2018b running on Windows 10.

Any guidance on the recommended reproducible workflow for historical COBRA Toolbox commits would be greatly appreciated.

Thank you very much for your time and assistance.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions