-
Notifications
You must be signed in to change notification settings - Fork 1
Release 0.6.0-beta #452
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
Open
bgmeulem
wants to merge
106
commits into
master
Choose a base branch
from
rc-0.6.0
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Release 0.6.0-beta #452
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Filtering parameterfiles by content is wise for speedup and ensuring you only get unique parameterfiles, but it only really makes sense if you do "hash_rename" copy method for parameterfiles. If you use "remount", you want parameterfiles to preserve their different filenames, independent of whether or not they may be identical in content. Otherwise, rerun_db throws an error when it reruns e.g. a sim_trial_index that has a paramfile with mismatching filename (but identical content) to the paramfile it is looking for.
…iles When rerunning simulation trials from databases, the .syn and .con files referenced in network param files will contain relative db paths. these should be resolved when parsing the re-runned simulation trials to a new database
…ll other paramfiles)
…traces so the `sim_trial_index` doesn't get jangled
This PR fixes the following bugs in parsing parameterfiles into a database: - When `copy_method="remount"`, copying parameterfiles failed when only one parameterfile of a certain kind is found. In these cases, it cannot infer the shared filestructure it is supposed to be preserving. Having only 1 paramfile easily happens when you resimulate a subselection of trials and want to initialize those in a db. The odds those all share the same .hoc file is not small - It could not yet resolve relative references to `.syn` and `.hoc` files in `.con` and `.syn` files resp. This issue only arised when resimulating trials, where the network parameters will have references to e.g. `.con` files whose internal references have already been resolved and put in a database. - Fetching the recsite ID from dendritic voltage traces was not robust to different naming schemes. Now uses a regex instead of making assumptions on filename conventions - Rerunning creation of parameterfiles could fail for netp and neup since they did not have `exist_ok=True`. - Dendritic voltage traces had faulty `sim_trial_index` (full path instead of just the index) Tested by: - Initialized db from marias data: check ✔️ - re-run specific simulation trials from that db: check✔️ - Initialize the re-run simulation trials into yet another db: check ✔️ (had an issue where there was only 1 hoc file and - relative folder structure could not be preserved when copy_method="remount" , this now simply throws an error) - Check if results are same for soma voltage traces: check ✔️ - Check if results are same for dendritic voltage traces: check ✔️ (found bug in sim_trial_index for that one, now fixed)
sphinx's default domain is python anyways. i stripped all leading :py: from directives to clean up docs a bit
NEURON 9.0 and up compiles `.mod` files to C++ instead of C.
This is incompatible with our `.mod` files, as they have VERBATIM
blocks, which are valid C code, but not always valid C++ code.
For example, `ProbAMPANMDA2.mod` has the VERBATIM block:
```c
#include<stdlib.h>
#include<stdio.h>
#include<math.h>
double nrn_random_pick(void* r);
void* nrn_random_arg(int argpos);
```
This however overloads a previous definition from:
```c
.pixi/envs/default/lib/python3.9/site-packages/neuron/.data/include/nrnrandom.h:6:7:
note: previous declaration is here
6 | Rand* nrn_random_arg(int);
| ~~~~~ ^
```
Overloading functions with a different return type is OK in C, but not
in C++:
```cpp
error: functions that differ only in their return type cannot be
overloaded
```
Rather than making our VERBATIM blocks C++-proof, it's easier to just
keep compiling them to C
NEURON 9.0 and up compiles `.mod` files to C++ instead of C. This is
incompatible with our `.mod` files, as they have VERBATIM blocks, which
are valid C code, but not always valid C++ code.
For example, `ProbAMPANMDA2.mod` has the VERBATIM block:
```c
#include<stdlib.h>
#include<stdio.h>
#include<math.h>
double nrn_random_pick(void* r);
void* nrn_random_arg(int argpos);
```
This however overloads a previous definition from:
```c
.pixi/envs/default/lib/python3.9/site-packages/neuron/.data/include/nrnrandom.h:6:7:
note: previous declaration is here
6 | Rand* nrn_random_arg(int);
| ~~~~~ ^
```
Overloading functions with a different return type is OK in C, but not
in C++:
```cpp
error: functions that differ only in their return type cannot be
overloaded
```
Rather than making our VERBATIM blocks C++-proof, it's easier to just
keep compiling them to C
Fix documentation for function and class arguments, which are now reflinked. Fix math-mode issues: backslashes weren't properly escaped without raw strings Remove asterisks from `*args` and `**kwags` in docs Fix escaping trailing underscores in docs(e.g. `raise_`) Add explicit args in functions that otherwise inherit. Fix home button (see #441 ) Use implicit Python namespace in sphinx. The default domain is python anyways, so reflinks don't neet the `: py` prefix. This makes reflinking slightly less verbose, which is very welcome
Newer versions of astroid interfere with sphinx-autoapi, breaking its API Somehow, filenames get mangled, and the last three characters are repeated. This then prevents Sphinx from correctly reading in files. E.g., my_module_D.py becomes my_module_D.pyD.py Newer versions of sphinx-autoapi pin down astroid. We however don't use the newest version of sphinx-autoapi, so we pin down astroid manually Todo: why can't we use the newest version of sphinx-autoapi?
Newer versions of astroid interfere with sphinx-autoapi, breaking its API Somehow, filenames get mangled, and the last three characters are repeated. This then prevents Sphinx from correctly reading in files. E.g., `my_module_D.py` becomes `my_module_D.pyD.py` Newer versions of sphinx-autoapi pin down astroid. We however don't use the newest version of sphinx-autoapi, so we pin down astroid manually Todo: why can't we use the newest version of sphinx-autoapi?
database registers were improperly implemented after db renaming by me. It assumed the register always means "your own register", which is not always the case. This made it impossible to asismilate remote registers.
`get_db_by_unique_id()` only fetched databases as configured by the default database. It should instead infer the correct format so API using older databases still works, e.g. `init_simrun_general`
Previously, the colorscale (both color and normalization) did not always update at the correct point. this leads to undesirable behavior when plotting multiple plots using the same CMV object, such as voltage first, and a current second. Depending on the plot order, plots would still inherit the colorscale of previous plots.
# Environment NEURON is pinned down to <9.0 on macOS. The NEURON 9.0 update translates `.mod` files to C++ rather than C. This breaks some of our `.mod` files, as they have duplicate function definitions. Allowed (but recommended against) in C, disallowed in C++. (ecd7d14). Astroid is pinned down. Newer versions of astroid break our older version of Sphinx, and filenames get mangled (ada6784) Pin down g++ and use the conda-distributed version on Linux to avoid using too-new g++ on very new systems (49a44e2) # Bug fixes Fix: initializing other people's register. Logical bug in assuming the database register is always your own (it's not) (7bc4baf) Fix: allow fetching `ModelDataBase`s by unique ID (b5d95d2) Fix faulty `sim_trial_index` for dendritic voltage traces (81723e1) Fix: Only filter paramfiles during `simrun_init_db` when `hash_rename` is True (afc4968) Fix: resolve relative `.syn` and `.con` files (81723e1) # Minor changes Internal reflinking to function and class arguments now works. not all `:param:` roles have a valid FQN yet though. Improve wording in documentation Fix typo's Update reflink to NEURON documentation Escape backslashes, underscores and asterisks in docstsrings
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Environment
NEURON is pinned down to <9.0 on macOS. The NEURON 9.0 update translates
.modfiles to C++ rather than C. This breaks some of our.modfiles,as they have duplicate function definitions. Allowed (but recommended
against) in C, disallowed in C++.
(ecd7d14).
Astroid is pinned down. Newer versions of astroid break our older
version of Sphinx, and filenames get mangled
(ada6784)
Pin down g++ and use the conda-distributed version on Linux to avoid
using too-new g++ on very new systems
(49a44e2)
Bug fixes
Fix: initializing other people's register. Logical bug in assuming the
database register is always your own (it's not)
(7bc4baf)
Fix: allow fetching
ModelDataBases by unique ID(b5d95d2)
Fix faulty
sim_trial_indexfor dendritic voltage traces(81723e1)
Fix: Only filter paramfiles during
simrun_init_dbwhenhash_renameis True (afc4968)
Fix: resolve relative
.synand.confiles(81723e1)
Minor changes
Internal reflinking to function and class arguments now works. not all
:param:roles have a valid FQN yet though.Improve wording in documentation
Fix typo's
Update reflink to NEURON documentation
Escape backslashes, underscores and asterisks in docstsrings