Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
346 commits
Select commit Hold shift + click to select a range
c11a4ff
feat(swc2nml): use graph root as start point
sanjayankur31 Aug 27, 2024
fc882de
chore(swc2nml): re-order method args for consistency
sanjayankur31 Aug 27, 2024
3c57468
chore: comment purpose of class variables
sanjayankur31 Aug 29, 2024
c2ab280
wip: reviewing
sanjayankur31 Aug 29, 2024
398f4aa
chore(swc2nml): use try/except instead of check
sanjayankur31 Sep 3, 2024
ce8f4ae
feat(swc2nml): refactor general segment creation
sanjayankur31 Sep 3, 2024
326988d
feat(swc2nml): strip down tests
sanjayankur31 Sep 3, 2024
21eb3cb
feat(swc2nml): return NeuroMLDocument for programmatic access
sanjayankur31 Sep 3, 2024
d3ed6bb
chore: ignore `.coverage` everywhere
sanjayankur31 Sep 3, 2024
b77390d
chore: `logger.warn` -> `logger.warning`
sanjayankur31 Sep 3, 2024
bcf71c4
feat(swc2nml): allow main generate function to also only do morph
sanjayankur31 Sep 3, 2024
e9e2e60
test(swc2nml): checkin CVApp generated nml files
sanjayankur31 Sep 3, 2024
477e9ae
chore(load-swc): start line count from 0
sanjayankur31 Sep 3, 2024
35c3e41
test(swc2nml): re-do to compare created Python objects
sanjayankur31 Sep 3, 2024
0a881c7
refactor(swc2nml): comment code, other cosmetic changes
sanjayankur31 Sep 3, 2024
8612387
feat(swc2nml): improve `handle_soma` documentation and structure
sanjayankur31 Sep 3, 2024
0bb18a9
fix(swc2nml): correctly include parent info
sanjayankur31 Sep 3, 2024
3c56f28
wip(swc2nml): improve tests
sanjayankur31 Sep 3, 2024
e79c23b
chore: remove unused import
sanjayankur31 Sep 3, 2024
cf0d077
test(swc2nml): parameterize tests
sanjayankur31 Sep 4, 2024
0b72255
feat(swc2nml): note addition of proximal point to "cable" roots
sanjayankur31 Sep 4, 2024
99f0b0f
fix(swc2nml): correct generation of multi-point soma segments
sanjayankur31 Sep 4, 2024
0cd7e50
test(swc2nml): also match all the segments individually
sanjayankur31 Sep 4, 2024
57a86a5
chore(swc2nml): remove unused import
sanjayankur31 Sep 4, 2024
0755ed2
chore(swc2nml): add man page
sanjayankur31 Sep 4, 2024
1367ec5
feat(swc2nml): improve multi-point soma conversion
sanjayankur31 Sep 4, 2024
a486102
fix(swc2nml): handle all other soma cases, not just ones with >3 points
sanjayankur31 Sep 4, 2024
9f4e478
chore(pre-commit): allow 2MB files
sanjayankur31 Sep 4, 2024
4a0eda4
test(swc2nml): check in test swc + CVapp NML files
sanjayankur31 Sep 4, 2024
c2a4f38
chore(swc): tweak info message
sanjayankur31 Sep 4, 2024
9eda784
feat(swc2nml): improve segment group creation
sanjayankur31 Sep 4, 2024
e45cbc1
test(swc2nml): allow skipping detailed checks
sanjayankur31 Sep 4, 2024
1ee37a2
feat(plot-morph): use default group colours for single cells
sanjayankur31 Sep 4, 2024
6aee352
chore: remove stray print
sanjayankur31 Sep 4, 2024
14b61a2
Merge pull request #421 from NeuroML/feat/ExportSWC-ankur
sanjayankur31 Sep 4, 2024
72074ea
Fix for SBML import - allow *.xml
pgleeson Sep 4, 2024
6dd3eee
Merge branch 'development' of github.com:NeuroML/pyNeuroML into devel…
pgleeson Sep 4, 2024
7af3c82
wip: fix upper cap
sanjayankur31 Sep 4, 2024
a3ee75f
feat(morph-plot): fix closed cylinder generation
sanjayankur31 Sep 4, 2024
a4db627
fix(vispy): type hints and other misc fixes
sanjayankur31 Sep 4, 2024
c2fee35
chore: bump dev to 1.3.10
sanjayankur31 Sep 4, 2024
2ac8be7
docs: add swc.ExportNML
sanjayankur31 Sep 5, 2024
5d9de7f
feat(swc2nml): allow toggling creation of unbranched segment groups
sanjayankur31 Sep 6, 2024
0a378df
fix(swc2nml): ensure that segments are also added to default groups
sanjayankur31 Sep 6, 2024
3d9a27f
feat(morph-plot): also allow plotting of swc files
sanjayankur31 Sep 6, 2024
7266cb3
chore: regen man page
sanjayankur31 Sep 6, 2024
96a0069
chore: bump dev to 1.3.11
sanjayankur31 Sep 6, 2024
a2e053b
feat(vispy): cast `axes_pos` to tuple to ensure it's a hashable object
sanjayankur31 Sep 10, 2024
755ffd2
chore(vispy): various type hint fixes
sanjayankur31 Sep 10, 2024
97b1c63
feat(vispy): use `detailed` as default visualisation style
sanjayankur31 Sep 10, 2024
be61e1e
Merge pull request #424 from NeuroML/feat-improve-cached-method-invoc…
sanjayankur31 Sep 10, 2024
e64c447
chore: bump dev to 1.3.12, regen man pages
sanjayankur31 Sep 10, 2024
2bf70ec
feat(vispy): simplify mesh creation
sanjayankur31 Sep 10, 2024
a760552
Merge pull request #425 from NeuroML/feat-simplify-mesh-creator
sanjayankur31 Sep 10, 2024
536a9fc
chore: bump dev to 1.3.13
sanjayankur31 Sep 13, 2024
0db80d6
Added segment picking from faces
lej0hn Sep 13, 2024
088a727
docs(lems): add return info to function doc
sanjayankur31 Sep 13, 2024
85377ed
feat(lemssimulation): store lems file name for easy access
sanjayankur31 Sep 13, 2024
10e4d09
feat(lemssimulation): replace explicit dict with instance attributes
sanjayankur31 Sep 13, 2024
9a347c8
feat(lems): minor lint fixes
sanjayankur31 Sep 13, 2024
853d319
Merge pull request #427 from NeuroML/feat-lemssimulation
sanjayankur31 Sep 13, 2024
2bf0970
Disabled pick with schematic viewing
lej0hn Sep 13, 2024
14efdb7
Merge branch 'development' into development
sanjayankur31 Sep 13, 2024
d088537
chore: add DOI to readme
sanjayankur31 Sep 16, 2024
18cde13
Merge branch 'master' into experimental
pgleeson Sep 24, 2024
4e7c9ee
Allow both xml and nml extensions when validating nml 1/2 files
pgleeson Sep 24, 2024
6816315
Print info on jnml -validate on how many successful etc.
pgleeson Sep 24, 2024
74a186a
Only attempt to load libsedml (and warn if not present) if using it
pgleeson Sep 24, 2024
ae7d8f0
Merge pull request #429 from NeuroML/experimental
sanjayankur31 Sep 25, 2024
5a3e4e0
Merge branch 'development' into development
sanjayankur31 Sep 30, 2024
f36c1cd
chore(face-picking): convert prints to debug logs messages
sanjayankur31 Sep 30, 2024
8751faf
feat(face-picking): update docstrings and comments
sanjayankur31 Sep 30, 2024
91f588a
feat(util): add helper to include new components
sanjayankur31 Oct 2, 2024
30aae2b
fix(utils): wrap component in a LEMS model
sanjayankur31 Oct 2, 2024
c89421e
feat(utils): update new_component to not be included in the main doc
sanjayankur31 Oct 15, 2024
899f148
chore(component): remove unused imports
sanjayankur31 Oct 15, 2024
2e7bbb9
chore(logging): correctly setup module level logger config
sanjayankur31 Oct 15, 2024
076b077
Merge branch 'development' into feat-util-new-components
sanjayankur31 Oct 15, 2024
08126cf
chore(face-pick): add link to Vispy example
sanjayankur31 Oct 16, 2024
6632c9c
Merge branch 'ioannis-dev' into development
sanjayankur31 Oct 16, 2024
24a1b69
Merge pull request #430 from NeuroML/feat-util-new-components
sanjayankur31 Oct 23, 2024
b7b8104
chore(timeseries): reduce logging level
sanjayankur31 Oct 23, 2024
e8755c4
fix(timeseries): enable interactive legend
sanjayankur31 Oct 23, 2024
8328d6c
feat(timeseries): allow users to specify what columns to plot
sanjayankur31 Oct 23, 2024
e8349c0
chore(timeseries): ensure that at least one file is provided
sanjayankur31 Oct 23, 2024
1427c0a
chore: regen man pages
sanjayankur31 Oct 23, 2024
89b7da0
fix(timeseries): set value of optional argument to None
sanjayankur31 Oct 23, 2024
d70ec51
feat(timeseries): allow users to toggle labels
sanjayankur31 Oct 23, 2024
cdf66b3
chore: regen man pages
sanjayankur31 Oct 23, 2024
188e80e
feat(timeseries): enable labels by default
sanjayankur31 Oct 23, 2024
581d1a4
Merge pull request #431 from NeuroML/feat-timeseries-tweaks
sanjayankur31 Oct 23, 2024
16c7da0
feat: support py3.13
sanjayankur31 Oct 23, 2024
d81850b
ci: install libhdf5 for py3.13 until pytables publishes wheels
sanjayankur31 Oct 23, 2024
6f4fb0b
fix(archive): set default omex archive extension if not provided
sanjayankur31 Nov 5, 2024
9953908
chore(archive): use `.zip` suffix
sanjayankur31 Nov 5, 2024
17c71be
tests(archive): update test files to include `.zip` suffix
sanjayankur31 Nov 5, 2024
1a909ba
Merge pull request #434 from NeuroML/fix-pynml-archive
sanjayankur31 Nov 5, 2024
302d22c
fix(io): also check root tags when testing for file types
sanjayankur31 Nov 6, 2024
b01fcbf
test(io): test `confirm_file_type`
sanjayankur31 Nov 6, 2024
99b7397
wip: improve `pynml-summary`
sanjayankur31 Nov 6, 2024
76958b4
feat(summary): generalise to all NML elements
sanjayankur31 Nov 8, 2024
dd57bf6
Merge pull request #437 from NeuroML/feat-improve-summary
sanjayankur31 Nov 8, 2024
57c666d
fix(info): correct numbering logic
sanjayankur31 Nov 8, 2024
6131ee4
feat: add NEURON as a dep for netpyne extra
sanjayankur31 Nov 12, 2024
690c825
Merge pull request #436 from NeuroML/fix-file-compatibility-check
sanjayankur31 Dec 18, 2024
0f2793c
chore: bump to next patch release
sanjayankur31 Dec 18, 2024
5e6e199
Add example testing execute_command_in_dir etc.
pgleeson Jan 21, 2025
1040db6
More tests on execute_command_in_dir
pgleeson Jan 21, 2025
93253ce
fix(morph-plot): handle files with single point cell types
sanjayankur31 Feb 10, 2025
3c10a56
To v1.3.15; uses jnml v0.14.0
pgleeson Feb 12, 2025
fe715e4
Merge pull request #442 from NeuroML/experimental
pgleeson Feb 12, 2025
875b9f7
Merge branch 'development' into fix-plotting-plot-all-point-cell-comp…
sanjayankur31 Feb 12, 2025
d0934b1
chore: bump development to 1.3.16
sanjayankur31 Feb 12, 2025
b15c660
Merge branch 'development' into fix-plotting-plot-all-point-cell-comp…
sanjayankur31 Feb 12, 2025
7bc3b1b
fix(morph-plotter): ignore exception for an empty list
sanjayankur31 Feb 12, 2025
fd10574
Merge pull request #441 from NeuroML/fix-plotting-plot-all-point-cell…
sanjayankur31 Feb 12, 2025
adbd4fb
fix: ensure that args to functions using lrucache are hashable
sanjayankur31 Feb 18, 2025
d38ca51
Applied pre-commit formatting - remove whitespace - to all
pgleeson Apr 11, 2025
7c10fd3
Bump to v1.3.17 - update to require latest pylems/libneuroml/neuromllite
pgleeson Apr 11, 2025
b06cf90
Update README.md
pgleeson May 1, 2025
dcf98f6
feat: remove numpy version pin
sanjayankur31 May 9, 2025
8a183f6
feat: drop Python 3.8
sanjayankur31 May 9, 2025
440006f
Merge pull request #444 from NeuroML/experimental
pgleeson May 10, 2025
2a6b9e1
#446 remove numpy pin
sanjayankur31 Jun 7, 2025
7893b52
chore: bump to 1.3.18
sanjayankur31 Jun 7, 2025
1d6f639
Update ci.yml
pgleeson Jun 10, 2025
362c2cb
Update setup.cfg
pgleeson Jun 10, 2025
6d4d21c
Avoid numpy.typing
pgleeson Jun 11, 2025
354eb10
Merge branch 'experimental' of github.com:NeuroML/pyNeuroML into expe…
pgleeson Jun 11, 2025
da0d31b
fix: drop unused import
sanjayankur31 Jun 11, 2025
e212011
fix: remove undefined variable
sanjayankur31 Jun 11, 2025
8db2dc3
Merge pull request #448 from NeuroML/experimental
pgleeson Jun 11, 2025
07dec4f
Merge pull request #449 from NeuroML/feat-fix-typing-conflict
pgleeson Jun 11, 2025
0482758
chore: update imports
sanjayankur31 Jun 11, 2025
ed36605
chore: regenerate man pages
sanjayankur31 Jun 11, 2025
6d43a71
feat: to 1.3.19
sanjayankur31 Jun 11, 2025
d430778
feat(jnml): add simple wrapper
sanjayankur31 Jun 12, 2025
fbb5c2a
feat(setup): add a jnml console script
sanjayankur31 Jun 12, 2025
a921feb
ci: also test newly added `jnml` wrapper
sanjayankur31 Jun 12, 2025
59d5e65
feat(jnml): remove pyneuroml output wrapping
sanjayankur31 Jun 12, 2025
eaa1c59
feat(jnml): fix output to stdout
sanjayankur31 Jun 12, 2025
5fc4003
fix(jnml-wrapper): ensure that command fails properly
sanjayankur31 Jun 20, 2025
650ed42
chore: reduce logging level of some errors
sanjayankur31 Jun 20, 2025
63181e9
fix(vispy): handle case where no rotation is required
sanjayankur31 Jun 25, 2025
200af2e
ci: remove numpy pin
sanjayankur31 Jul 2, 2025
1a9c01a
Merge branch 'development' into feat-test-py313
sanjayankur31 Jul 2, 2025
5d03d36
Merge pull request #453 from NeuroML/feat-remove-numpy-pin-ci
sanjayankur31 Jul 2, 2025
33141a5
Merge pull request #445 from NeuroML/feat-test-py313
sanjayankur31 Jul 2, 2025
c4c5e2c
Merge pull request #451 from NeuroML/fix-mesh-zeros
sanjayankur31 Jul 2, 2025
3b0ba50
Merge branch 'development' into feat-provide-jnml-wrapper
sanjayankur31 Jul 2, 2025
f863ce3
Merge pull request #450 from NeuroML/feat-provide-jnml-wrapper
sanjayankur31 Jul 2, 2025
b004f14
feat: to 1.3.20
sanjayankur31 Jul 2, 2025
2baaa7a
feat(deps): unpin pyopengl-acclerate
sanjayankur31 Jul 7, 2025
784b33d
Merge pull request #455 from NeuroML/feat-unpin-pyopengl-accelerate
sanjayankur31 Jul 7, 2025
3e4fcf5
feat: to 1.3.21
sanjayankur31 Jul 7, 2025
3442026
fix(file-list): correct recursive file listing
sanjayankur31 Jul 22, 2025
4177770
fix(ruff): remove unnecessary f string marker
sanjayankur31 Jul 22, 2025
ace7994
chore: rename file to prevent detection by pytest
sanjayankur31 Jul 22, 2025
584c3ab
test(archive): split scenarios into individual tests
sanjayankur31 Jul 22, 2025
1e3f9d9
fix(get-file-list): correct logic to handle different scenarios
sanjayankur31 Jul 22, 2025
81b3817
fix: change to directory before getting list of model files
sanjayankur31 Jul 22, 2025
4befd67
fix(archive): move to directory before getting model file list
sanjayankur31 Jul 22, 2025
33dbeb2
feat(file-list): refactor to simplify logic
sanjayankur31 Jul 22, 2025
30afc86
chore: revert logging level
sanjayankur31 Jul 22, 2025
616b7fe
Merge pull request #456 from NeuroML/fix-filelist
sanjayankur31 Jul 22, 2025
0d8397b
chore: to 1.3.22
sanjayankur31 Jul 22, 2025
c6e926c
Regenerated mod file
pgleeson Jul 29, 2025
3d811cf
Ignoring *.neux.zip files
pgleeson Jul 29, 2025
5913e09
feat(timeseries): separate saving and plotting of individual files
sanjayankur31 Jul 30, 2025
bab77aa
fix: update imports to prevent circular imports
sanjayankur31 Jul 31, 2025
7f16728
feat(plot-time-series): refactor plotting from data
sanjayankur31 Jul 31, 2025
b13c46d
feat: tweak imports to prevent circular imports
sanjayankur31 Jul 31, 2025
25b438d
refactor: remove `pynml` import
sanjayankur31 Jul 31, 2025
618e2aa
fix: ensure `reload_saved_data` maintains its API
sanjayankur31 Aug 1, 2025
2391902
feat: add deprecation warning for `pynml` function
sanjayankur31 Aug 1, 2025
a14ecb0
doc: add `utils.simdata`
sanjayankur31 Aug 1, 2025
67c6760
chore(ci): prefer `uv` if available
sanjayankur31 Aug 1, 2025
bfc2a1b
chore: update mod file
sanjayankur31 Aug 1, 2025
9e2fd4b
Merge pull request #458 from NeuroML/feat-timeseries-split
pgleeson Aug 4, 2025
260653e
fix(time-series): respect `offset` arg
sanjayankur31 Aug 5, 2025
de84bba
Merge branch 'feat-timeseries-split' into experimental
sanjayankur31 Aug 5, 2025
5ad898c
fix(time-series): pass all args
sanjayankur31 Aug 5, 2025
c778194
Merge branch 'feat-timeseries-split' into experimental
sanjayankur31 Aug 5, 2025
edb8b9e
chore(archive): add logging
sanjayankur31 Aug 6, 2025
d20cca1
test(archive): add test case
sanjayankur31 Aug 6, 2025
80ca4e1
fix(archive): handle lems.model modifying the include path
sanjayankur31 Aug 6, 2025
7051d55
feat(utils): add `chdir` context manager
sanjayankur31 Aug 6, 2025
1ffa606
feat: use new `chdir` context manager
sanjayankur31 Aug 6, 2025
f22e9b6
Merge pull request #459 from NeuroML/fix-archiving-redux
sanjayankur31 Aug 6, 2025
2a42475
Merge branch 'development' into feat-timeseries-split
sanjayankur31 Aug 6, 2025
44acd3f
Merge branch 'feat-timeseries-split' into experimental
sanjayankur31 Aug 6, 2025
8835fe3
fix: correct import
sanjayankur31 Aug 6, 2025
3e9e594
Merge branch 'feat-timeseries-split' into experimental
sanjayankur31 Aug 6, 2025
b1bd9b7
fix(archive): handle pylems issue related to includes
sanjayankur31 Aug 7, 2025
cb65fa0
fix(annotation): limit FOAF attributes to those supported by NeuroML/…
sanjayankur31 Aug 7, 2025
63cf16a
fix(annotations): ensure rdf tags are single line
sanjayankur31 Aug 7, 2025
ac7ddf5
fix(annotations): use py str instead of unicode encoding
sanjayankur31 Aug 14, 2025
a87cf25
fix(annotations): decode byte string to utf-8
sanjayankur31 Aug 14, 2025
f224be0
docs: add utils.component to API docs
sanjayankur31 Sep 24, 2025
f468b52
docs: add pylems dep
sanjayankur31 Sep 24, 2025
3776b8e
fix(docs): correct rst line length
sanjayankur31 Sep 24, 2025
1ebc33d
docs: correct module name
sanjayankur31 Sep 24, 2025
34099c0
fix(docs): nope, now correct the module name
sanjayankur31 Sep 24, 2025
3632f1c
docs: update docstring and include an example
sanjayankur31 Sep 24, 2025
03f2f34
Merge branch 'master' into development
sanjayankur31 Apr 14, 2026
318e372
Merge branch 'master' into development
sanjayankur31 Apr 14, 2026
dc955d0
feat(agents): init
sanjayankur31 Apr 22, 2026
c3e2e3b
Merge pull request #465 from NeuroML/agents
sanjayankur31 Apr 22, 2026
e4fa670
feat: add script to generate python scripts from xml
sanjayankur31 Apr 22, 2026
60e6a57
feat(nml2py): remove nonexistent scalars
sanjayankur31 Apr 22, 2026
e94fe31
feat(nml2py): improve scalar detection
sanjayankur31 Apr 22, 2026
7e0f26d
feat(agents): correct claude.md as symlink
sanjayankur31 Apr 22, 2026
2c27774
feat(nml2py): correct model creation order
sanjayankur31 Apr 22, 2026
ee5d063
chore: remove unicode characters
sanjayankur31 Apr 22, 2026
41f9394
feat(nml2py): remove unnecessary hardcoded lists
sanjayankur31 Apr 22, 2026
39825f6
chore(agents): add log
sanjayankur31 Apr 22, 2026
596129b
feat(contributing): improve guidelines, add PR template
sanjayankur31 Apr 22, 2026
08d97c1
chore: rename template
sanjayankur31 Apr 22, 2026
18a1b93
Merge branch 'master' into development
sanjayankur31 Apr 22, 2026
d37ce59
Merge branch 'development' into feat-xml2py
sanjayankur31 Apr 22, 2026
bf3d680
fix(tests): correctly handle error raising test
sanjayankur31 Apr 22, 2026
0b6e16f
fix(tests): use context manager when changing dirs
sanjayankur31 Apr 22, 2026
7812cc1
fix(tests): use pytest monkeypatch instead of fixtures
sanjayankur31 Apr 22, 2026
d478ce6
fix(tests): more use of monkeypatch
sanjayankur31 Apr 22, 2026
587af66
fix(tests): even more monkey patching
sanjayankur31 Apr 22, 2026
36c20f9
fix(tests): use our chdir wrapper for py<3.11
sanjayankur31 Apr 22, 2026
620d1d1
feat: drop py3.9 support
sanjayankur31 Apr 22, 2026
579167e
Merge pull request #468 from NeuroML/fix-tests
sanjayankur31 Apr 22, 2026
f132e98
feat: enable py3.14 ci + support
sanjayankur31 Apr 22, 2026
8e95ae8
Merge pull request #469 from NeuroML/feat-3.14
sanjayankur31 Apr 22, 2026
c986ce1
Merge branch 'development' into feat-xml2py
sanjayankur31 Apr 22, 2026
9e86aff
feat(nml2py): add entry point
sanjayankur31 Apr 29, 2026
f1159c9
feat(nml2py): limit script runs to cwd of file
sanjayankur31 Apr 29, 2026
0bbb3b3
chore(agents): ignore opencode scratch directory
sanjayankur31 Apr 29, 2026
d28242e
fix(nml2py): use correct string repr
sanjayankur31 Apr 29, 2026
ba273c2
chore: ignore temporary test folder
sanjayankur31 Apr 29, 2026
9bff34e
feat(nml2py): add initial test
sanjayankur31 Apr 29, 2026
a64f159
chore(agents): add session log
sanjayankur31 Apr 29, 2026
7df6a04
feat(nml2py): review + refactor
sanjayankur31 May 8, 2026
f773fc9
feat(nml2py): add more tests
sanjayankur31 May 8, 2026
cbef4c5
feat(agents): add note about conciseness and pytest
sanjayankur31 May 12, 2026
a8b86bd
test(nml2py): add more tests
sanjayankur31 May 12, 2026
9b5fd21
feat(nml2py): explicitly note all parameters
sanjayankur31 May 12, 2026
b38c9c1
test(nml2py): remove redundant test
sanjayankur31 May 12, 2026
ee75a1f
chore: lint file
sanjayankur31 May 12, 2026
6ec2cfd
chore(agent): add session log
sanjayankur31 May 12, 2026
c632722
feat(nml2py): complete tests
sanjayankur31 May 13, 2026
b7050ff
chore: update pre-commit config
sanjayankur31 May 13, 2026
76c5294
feat(nml2py): clarify output dir name creation
sanjayankur31 May 21, 2026
16ff1c5
Merge pull request #466 from NeuroML/feat-xml2py
sanjayankur31 May 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .agents/2026-04-22.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Session: 2026-04-22

**Authoring agent:** opencode

## Objective
Implemented `NmlPythonizer` — converts NeuroML XML files into Python scripts using the libNeuroML API.

## Completed
- Created `pyneuroml/utils/nml2py.py` with `NmlPythonizer` class
- Traverses object tree via `info()`, generates `parent.add()` calls with string-literal references
- Extracts inline cells/channels/synapses to separate files; preserves includes
- Orders output by human-logical construction: networks -> populations -> cells -> channels -> synapses -> projections -> connections -> inputs -> metadata
- Type classification uses substring matching (`"Cell" in type_name`) rather than hardcoded sets to avoid maintenance drift
- All NmlId and population references kept as string literals (XML paths like `cell/0/soma/3` cannot be reliably resolved)
- Verified round-trip: generated script produces model identical to original XML

## Key Design Decisions
- Root doc via `component_factory()`, all others via `parent.add()`
- Variable names from component `id` attributes; type-based names with counters for idless components
- `_is_default_value()` compares against fresh instance defaults to skip cluttering output

## Lessons Learned
- `read_neuroml2_file` (not `read_neuroml2`) is the correct import from `pyneuroml.io`
- `Connection.id` can be an integer — `_sanitize_var_name` must handle both
- Some attributes have non-None defaults (e.g., `Connection.pre_segment_id = 0`) — must compare against defaults, not just `None`

## Open Questions
- Future: handle cell XML files with morphologies (currently skipped due to size)

## References
- [libNeuroML generatedssupersuper.py](https://github.com/NeuralEnsemble/libNeuroML/blob/master/neuroml/nml/generatedssupersuper.py) - `add()`, `component_factory()`, `info()` implementation
- [Test XML](https://github.com/NeuroML/Documentation/raw/refs/heads/main/source/Userdocs/NML2_examples/izhikevich2007_network.nml) - 2 populations, 20 connections, 5 pulse generators
16 changes: 16 additions & 0 deletions .agents/2026-04-29.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Session: 2026-04-29

**Authoring agent:** opencode

## Objective
Reviewed include path handling in `nml2py.py` and discussed round-trip test strategy.

## Completed
- Decided to keep original include hrefs as-is (no `../` prefix) with a user note explaining they may need to update paths or copy files

## Open Questions
- Round-trip test design: `info()` dict comparison is closest option, but must account for different include paths and extracted inline components. Need to compare children by type+id rather than position. Deeper discussion deferred.

## Notes
- Branch: `feat-xml2py`
- Latest commit: `9e86aff` (feat: add nml2py entry point)
19 changes: 19 additions & 0 deletions .agents/2026-05-12.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Session: 2026-05-12

**Authoring agent:** opencode

## Objective
Diagnosed pytest logging capture issues and added tests for nml2py.py generator methods.

## Completed
- Identified root cause: `--log-cli-level` doesn't work with xdist; `--log-level=DEBUG` captures logs but hides them for passing tests (need `-rP`)
- Updated AGENTS.md with logging quirks and "be concise" convention
- Added `test_generated_code_structure` (string assertions) and `test_generated_code_exec` (exec + namespace) for nml2py.py
- Removed `_is_default_value` from nml2py.py — now always includes all values explicitly

## Errors and Lessons
- `tests/lems/` directory shadows real `lems` package in sys.path when cwd is `tests/` — caused confusing import errors
- `pyneuroml` and `tests.*` loggers are in different branches of the logger hierarchy; `propagate=False` on pyneuroml has no effect on test loggers

## References
- AGENTS.md for full pytest logging quirks
46 changes: 46 additions & 0 deletions .agents/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Agent Session Summaries

Directory for storing summaries from chats with coding agents for future context.

## Session File Format

Based on Claude Code's session memory structure.

```markdown
# Session: YYYY-MM-DD

**Authoring agent:** <agent-name>

## Objective
Brief 1-2 sentence overview of what was discussed/accomplished.

## Completed
- Completed item 1
- Completed item 2

## Errors and Lessons
- Lesson learned (from error)

## Open Questions
- Question 1

## Notes
Any other relevant context for future agents

## References
- [Title](URL) - brief description
```

## Naming Convention

Session files should be named with the date:
```
YYYY-MM-DD.md
```

## Guidelines

- **Be concise**: Logs are added to agent context. Aim for 5-10 lines total. Focus on decisions and outcomes, not task-by-task details.
- **Focus on continuity**: Capture what's needed to continue work in future sessions.
- **Omit routine work**: Don't log every lint fix or commit unless noteworthy.
- **Preserve information**: When updating a session log, do not remove existing content. Merge new information with what's already there.
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
fail-fast: false

steps:
Expand All @@ -36,15 +36,16 @@ jobs:
echo "github.ref is: ${{ github.ref }}"
echo "github.base_ref is: ${{ github.base_ref }}"


- name: Upgrade pip, install deps
run: |
python -m pip install --upgrade pip
pip install 'numpy<2.0.0' # due to lingering issues with other modules
pip install .[dev]

- name: List packages so far
run: |
pip list
env

- name: Run tests
run: |
Expand Down
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ examples/results/*.dat
.mypy_cache/
/examples/test_data/TwoCell.net.png
/examples/test_data/Purk2M9s.png
/.coverage
**/.coverage
/Nav.channel.nml
/iv_izh2007RS0.net.nml
/leak_chan.channel.nml
Expand Down Expand Up @@ -181,3 +181,10 @@ coverage.xml
/examples/hhcell.swc
/examples/metadata.rdf
/tests/utils/test_translation.net.nml
/examples/LEMS_NML2_Ex5_DetCell.neux.zip
/examples/NML2_SingleCompHHCell.neux.zip
/tests/HH_example.neux.zip

.opencode/

/tests/temp_nml2py*
11 changes: 6 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-added-large-files
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-added-large-files
args: [ "--maxkb=5000"]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.1
rev: v0.15.12
hooks:
- id: ruff
args: [ "--select", "I", "--fix" ]
Expand Down
74 changes: 74 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# AGENTS.md - pyNeuroML

Single Python package for reading, writing, simulating and analysing NeuroML2/LEMS models.

## Architecture

- **Single package** — all code under `pyneuroml/`, tests under `tests/`, examples under `examples/`
- **Bundled jNeuroML** — `pyneuroml/lib/*.jar` provides Java simulation backend
- **CLI entry points** — `pynml` (main), `jnml`, `pynml-channelanalysis`, `pynml-povray`, `pynml-tune`, `pynml-swc2nml`, `pynml-xpp`, and others (see `setup.cfg` `[options.entry_points]`)
- **Core modules**: `pynml.py` (main CLI), `io.py`, `runners.py`, `lems/`, `analysis/`, `neuron/`, `channelml/`, `plot/`, `tune/`, `swc/`, `xppaut/`

## Developer Commands

```bash
# Install for development (from repo root)
pip install .[dev]

# Run lint + format (ruff)
ruff check . --fix
ruff format .

# Run full test suite (installs deps, runs CLI tests + pytest + examples)
./test.sh # or ./test-ghactions.sh
./test-ghactions.sh -neuron # includes NEURON examples

# Run pytest only (skips tests marked localonly — they segfault on CI)
pytest -m "not localonly"

# Run a single test file
pytest tests/test_pynml.py

# Run pre-commit hooks manually
pre-commit run --all-files
```

## Testing Quirks

- `pyproject.toml` defines a `localonly` marker — tests with it are skipped on GitHub Actions because they segfault
- `test-ghactions.sh` is the authoritative test script; it installs the package, verifies all CLI tools, runs pytest, and executes examples
- Some tests require a display (matplotlib); they're guarded by `if [[ "$CI" != "true" ]]`
- NEURON examples require the `-neuron` flag and `nrniv` on PATH
- **Pytest logging**: `--log-level=DEBUG` captures logs but hides them for passing tests by default — use `-rP` to show. `--log-cli-level` does not work with xdist.

## CI

- **ci.yml** — matrix build on Python 3.9–3.13, runs `./test-ghactions.sh -neuron`
- **ruff.yml** — ruff check on PRs (changed files only)
- **python-publish.yml** — PyPI publishing

## Conventions

- **Be concise**: no fluff, no explanations, no summaries of what was done — just the answer.
- **No unicode characters in code**: use ASCII only in comments and strings.
- **Branch**: development is the working branch; master is stable
- **Ruff config**: ignores `F403`, `F405` (wildcard imports); excludes `examples/`
- **mypy**: `ignore_missing_imports = True` (minimal type checking)
- **Pre-commit**: trailing whitespace, EOF fixer, large file check (<5MB), ruff import sort + format
- **Python support**: 3.9–3.13

## Session Continuity

- Check `.agents/` for prior session logs (`YYYY-MM-DD.md`) at session start
- Use the template in `.agents/Readme.md` for new session summaries

## Dependencies

- **External**: Java (JRE) for jNeuroML, Graphviz (`dot`) for diagrams
- **Optional backends**: NEURON, Brian2, NetPyNE, Tellurium (installed via extras like `[neuron]`, `[brian]`, etc.)

## References

- `setup.cfg` — authoritative source for entry points, extras, and dependencies
- `pyproject.toml` — pytest, ruff, and coverage config
- `test-ghactions.sh` — full integration test flow
1 change: 1 addition & 0 deletions CLAUDE.md
1 change: 0 additions & 1 deletion LICENSE.lesser
Original file line number Diff line number Diff line change
Expand Up @@ -163,4 +163,3 @@ whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ A single package in Python unifying scripts and modules for reading, writing, si

Builds on: [libNeuroML](https://github.com/NeuralEnsemble/libNeuroML) & [PyLEMS](https://github.com/LEMS/pylems) and wraps functionality from [jNeuroML](https://github.com/NeuroML/jNeuroML).

Installation
Installation
------------

### Dependencies
Expand Down
2 changes: 1 addition & 1 deletion docs/source/_static/pynml_jnml.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion docs/source/pyneuroml.analysis.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,3 @@ pyneuroml.analysis.ChannelHelper module
:members:
:undoc-members:
:show-inheritance:

1 change: 0 additions & 1 deletion docs/source/pyneuroml.channelml.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ pyneuroml.channelml package
:members:
:undoc-members:
:show-inheritance:

1 change: 0 additions & 1 deletion docs/source/pyneuroml.neuron.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ pyneuroml.neuron.analysis module
:members:
:undoc-members:
:show-inheritance:

1 change: 0 additions & 1 deletion docs/source/pyneuroml.povray.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,3 @@ pyneuroml.povray.OverlaySimulation module
:members:
:undoc-members:
:show-inheritance:

8 changes: 8 additions & 0 deletions docs/source/pyneuroml.swc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,11 @@ pyneuroml.swc.ExportSWC module
:members:
:undoc-members:
:show-inheritance:

pyneuroml.swc.ExportNML module
------------------------------

.. automodule:: pyneuroml.swc.ExportNML
:members:
:undoc-members:
:show-inheritance:
28 changes: 22 additions & 6 deletions docs/source/pyneuroml.utils.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,26 @@ pyneuroml.utils package
:undoc-members:
:show-inheritance:

pyneuroml.utils.info module
pyneuroml.utils.cli module
---------------------------

.. automodule:: pyneuroml.utils.info
.. automodule:: pyneuroml.utils.cli
:members:
:undoc-members:
:show-inheritance:

pyneuroml.utils.plot module
pyneuroml.utils.components module
----------------------------------

.. automodule:: pyneuroml.utils.components
:members:
:undoc-members:
:show-inheritance:

pyneuroml.utils.info module
---------------------------

.. automodule:: pyneuroml.utils.plot
.. automodule:: pyneuroml.utils.info
:members:
:undoc-members:
:show-inheritance:
Expand All @@ -30,10 +38,18 @@ pyneuroml.utils.misc module
:undoc-members:
:show-inheritance:

pyneuroml.utils.cli module
pyneuroml.utils.plot module
---------------------------

.. automodule:: pyneuroml.utils.cli
.. automodule:: pyneuroml.utils.plot
:members:
:undoc-members:
:show-inheritance:

pyneuroml.utils.simdata module
-------------------------------

.. automodule:: pyneuroml.utils.simdata
:members:
:undoc-members:
:show-inheritance:
Expand Down
1 change: 0 additions & 1 deletion docs/source/refs.bib
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ @Article{Vella2014
timestamp = {2019-02-20},
year = {2014},
}

Loading
Loading