-
Notifications
You must be signed in to change notification settings - Fork 119
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
Files dat #964
Conversation
Alternative to old pc.nrnbbcore_write(datpath, gidroups_vector). User does not need to construct, or know the format of, files.dat, when sequentially constructing and writing mod files. When append is 0, files.dat is written from scratch. When append is non-zero, reads existing files.dat, modifies the ngroupids line and appends groupids to end of file. This works also when submodels are constructed by different launches.
Codecov Report
@@ Coverage Diff @@
## master #964 +/- ##
==========================================
- Coverage 27.84% 27.83% -0.01%
==========================================
Files 570 570
Lines 108613 108664 +51
==========================================
+ Hits 30239 30249 +10
- Misses 78374 78415 +41
Continue to review full report at Codecov.
|
I'm wondering if the second optional arg, "append", is needed or desireable. Would it be too magical if nrncore_write checks the existence and version of a gidgroup file before writing, to decide whether to append or create from scratch a files.dat file. If an old one exists, it seems reasonable to remove all the [0-9]*.dat files and start afresh. |
I assume this PR is still work-in-progress. |
I got distracted. Will make the changes and ask for a final review. |
Parallel.nrncore_write(path, append) optional second arg must be a number. Resolves reviewer suggestions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…964) * pc.nrncore_write(datpath, append) Alternative to old pc.nrnbbcore_write(datpath, gidroups_vector). User does not need to construct, or know the format of, files.dat, when sequentially constructing and writing mod files. When append is 0, files.dat is written from scratch. When append is non-zero, reads existing files.dat, modifies the ngroupids line and appends groupids to end of file. This works also when submodels are constructed by different launches. * Update ParallelContext.nrncore_write documentation. * Parallel.nrnbbcore_write(path, Vector) deprecated. Parallel.nrncore_write(path, append) optional second arg must be a number.
…964) * pc.nrncore_write(datpath, append) Alternative to old pc.nrnbbcore_write(datpath, gidroups_vector). User does not need to construct, or know the format of, files.dat, when sequentially constructing and writing mod files. When append is 0, files.dat is written from scratch. When append is non-zero, reads existing files.dat, modifies the ngroupids line and appends groupids to end of file. This works also when submodels are constructed by different launches. * Update ParallelContext.nrncore_write documentation. * Parallel.nrnbbcore_write(path, Vector) deprecated. Parallel.nrncore_write(path, append) optional second arg must be a number.
Related to neuronsimulator/ringtest#18 where test_submodel.py uses the latest
pc.nrncore_write(path, append)
implemented in this pull requestAlternative to old pc.nrnbbcore_write(datpath, gidroups_vector).
User does not need to construct, or know the format of, files.dat, when
sequentially constructing and writing mod files. When append is 0, files.dat
is written from scratch. When append is non-zero, reads existing files.dat,
modifies the ngroupids line and appends groupids to end of file. This
works also when submodels are constructed by different launches.
Updates ParallelContext.nrncore_write documentation