Skip to content

Conversation

@su-saka
Copy link
Collaborator

@su-saka su-saka commented Jun 23, 2025

Refactor the RW class and add the option to provide custom exploration mode

@su-saka su-saka requested a review from mariaroyo June 23, 2025 14:30
@codecov
Copy link

codecov bot commented Jun 23, 2025

Codecov Report

❌ Patch coverage is 9.14634% with 149 lines in your changes missing coverage. Please review.
✅ Project coverage is 47.57%. Comparing base (7169be0) to head (df85e7e).
⚠️ Report is 8 commits behind head on develop.

Files with missing lines Patch % Lines
...iophysics_fitting/exploration_from_seedpoint/RW.py 7.54% 147 Missing ⚠️
biophysics_fitting/hay/evaluation.py 50.00% 1 Missing ⚠️
single_cell_parser/cell_parser.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #392      +/-   ##
===========================================
+ Coverage    47.53%   47.57%   +0.04%     
===========================================
  Files          239      239              
  Lines        22135    22138       +3     
===========================================
+ Hits         10522    10533      +11     
+ Misses       11613    11605       -8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

su-saka and others added 21 commits June 26, 2025 14:29
the CaHVA and CaLVA begin and end are set according to the specific morphology, these shouldn't have default values
[BUG] Fix path resolution for database register & correct import
Remove code formatting for `pixi`
Compilation should always happen on the user machine
Tests don't run on some windows machines, because the combination of
long filenames in `simrun` (such as dendritic voltage traces) and long
pytest `tmpdir` directories (i.e.
`{temproot}/pytest-of-{user}/pytest-{num}/{testname}/`) quickly exceed
the `260` character limit imposed on most windows machines. Rather than
requiring users to mess with the registry, I implemented a different
default `basetmp` for windows.

Other fix: No more verbose error output for `spiketrain` creation. See
#360
Add pytest.mark.statistical for statistical tests. This is much improved
over XFAIL.

Short paths on windows (see #400)

Download the barrel cortex model during testing. Idk why I didn't do
this earlier, it's pretty important.

Add timeout for entire test session (10 minutes) as well as single
function (3 minutes).

Reduce warnings during testing:

- Don't call plt.show() on non-GUI backends
- Don't use np.fromstring, but rather np.frombuffer
- Don't check empty lists using any()

Add pytest-timeout as dependency. This should prevent deadstalling tests
(if they still pop up) from eating through our github minutes
# API

Added `copy_tree` to our own implementation of `NTParameterSet` to be
backwards compatible with `sumatra`'s implementation. this is used in
network mapping. See 7ee9782

# Performance

Vectorize network mapping (see PR #408)
More conscious output during network mapping. Only main points are INFO
level, the rest ist DEBUG level.

# Compatibility

macOS sometimes automatically creates `.DS_Store` files in folders for
god knows what. This confuses databases: they think it's a key they need
to construct metadata for. Databases now ignore these files.

# Test

fitting synaptic strength hovers around the 180s mark, which is also our
test timeout. I set it so this one test is allowed to take longer.
## Bugfixes
- Now properly fetch and resolve the exact parameter file name for
re-running simulation trials (or in general, really)
- Update error message when reading a ModelDataBase using DataBase when
you haven't yet imported `compatibility`, thanks to @su-saka

## Data base initialization from `simrun`

See PR #420

- Allow passing an integer to `repartition` to pass a target partition
size for the voltage traces
- Added health check that scans simulation results to see if they can be
initialized and reproduced. htis was necessary to handle some missing
data, throwing off the `init()` function. See PR #420
- Copying parameterfiles is now parallellized
- You can pass `param_file_copy_kwargs` to specify where and how
parameterfiles should be copied to the `DataBase`
- Allows for using the recsite ID as subdirectory for dendritic vts,
rather than the full label (useful for slightly scaled morphologies)
- Allow specifying the file format for database `meta`s (for msgpack and
parquet) in `config.db_settings.json`. Available formats are `json` and
`msgpack`. See #416
- More robust fetching of dendritic voltage traces with
`get_recsite_labels_from_dend_vt_filelist`. Avoids having to pass around
a `suffix_dict` too.
- Faster reading of voltage traces using `pd.read_csv()` instead of
`np.readtxt()`
- Refactor `load_dendritic_voltage_traces_helper` for readability.
responsibility of handling of old/new/newer filename conventions is
passed to
`data_base.db_initializers.load_simrun_general.file_handling.get_recsite_labels_from_dend_vt_filelist`
- Don't error anymore when soft references (e.g. refs to .hoc in .syn
files) are not found: this is not a simulation-breaking issue, just a
minor inconvenience. `.hoc` files are sometimes saved in the `.syn`
files with relative paths, which makes it impossible to infer the exact
location.
- Speed up extracting paramfile reference from other paramfiles using
regex instead of building all paramfiles


## Documentation
See PR #421 

## Other changes
- Deprecate the `tStim` argument in `simrun.run_new_simulations`. It is
unused, and led to a decent amount of confusion for me. Stimulus onset
is defined per population as an `offset` key in the network parameters.
- Update `pixi` version in CI (building cythong packages with conda's
`gcc` and Python not pinned down was broken otherwise due to missing
`crypt.h` lib)
- Allow passing user flags to compiling NEURON mechanisms. This turned
out to not be necessary to fix compilation on newer systems (now we
simply pin down `gcc` on linux), but is kept as a feature.
- Add `BlenderSpike` as a run-dependency to the environment
This PR separates out the documentation dependencies from run/default
dependencies, and updates them accordingly to fix the broken
documentation build
remove unnecessary args and simplify the code to load existing results
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants