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

Handle mod files load through netpyne api method #796

Closed
ddelpiano opened this issue Nov 14, 2023 · 2 comments
Closed

Handle mod files load through netpyne api method #796

ddelpiano opened this issue Nov 14, 2023 · 2 comments
Assignees

Comments

@ddelpiano
Copy link
Collaborator

Please describe the new feature you'd like to see.

As discussed at the UI sprint meeting, it would be nice to have an api method that takes care of the cells import, computes the md5sum hashes of the mod files loaded and if we try to load the same module twice it skips it, otherwise if it is a different mod with the same name handle the rename for it.

Is your feature request related to a problem? Please describe.

related to the import cell type through UI issues raised recently.

Describe the solution you'd like

already done above

@vvbragin
Copy link
Collaborator

vvbragin commented Dec 12, 2023

Proposed API:

  1. Added new method
    loaded, skipped = netpyne.sim.load.processModFiles(modFolderPath, forceCompile=False)
    Returned values:
    loaded: mechanisms that was successfully loaded during the call. List of 2-element tuples in form (fileName, mechName)
    skipped: mechanisms that were already loaded prior to the call, so they were skipped this time. list of 3-element tuples in form (fileName, mechName, status), where status takes values: modified/unmodified/unknown.
    modified - new file and previously loaded file are not the same. Need to notify user that this may have unpredictable consequences, and it's better to change mechanism name
    unmodified - new and previously loaded files are the same, so no need to notify user.
    unknown - impossible to tell if files are the same. Probably need to notify user as well.

  2. Modified the existing netpyne.sim.load.loadModel(), now it gets an additional argument returnLoadMechStatus, which is False by default, and if True, the method returns loadedMods, skippedMods (in same format as described above) in addition to simConfig and netParams

@vvbragin
Copy link
Collaborator

vvbragin commented Mar 4, 2024

Done: #803

@vvbragin vvbragin closed this as completed Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants