Skip to content

Add brian_configuration summary helper#1806

Open
sukarxn wants to merge 1 commit into
brian-team:masterfrom
sukarxn:codex/new-function-for-brian-configuration-summary
Open

Add brian_configuration summary helper#1806
sukarxn wants to merge 1 commit into
brian-team:masterfrom
sukarxn:codex/new-function-for-brian-configuration-summary

Conversation

@sukarxn
Copy link
Copy Markdown

@sukarxn sukarxn commented Mar 29, 2026

Summary

Closes #641.

Adds a new public function, brian_configuration(), that returns a plain-text
summary of Brian’s current preference values. The output follows the structure
of the autogenerated preference documentation, but reports active values
instead of defaults.

Changes

  • add brian_configuration() to the preferences subsystem
  • reuse the existing preference-formatting logic to keep the output consistent
  • export brian_configuration from the public Brian API
  • add tests covering formatting, changed preference values, reset behavior, and importability
  • document the new helper in the preferences guide

Testing

  • .venv-brian2/bin/pytest brian2/tests/test_preferences.py

This is my first PR, so please let me know if I should adjust anything.

@mstimberg
Copy link
Copy Markdown
Member

Hi @sukarxn Thanks for the PR. I did not yet have time to look into it in detail, but I noticed that at least one of your new tests is failing on our CI. Please note that checking the current preferences is a bit tricky, since our test suite changes them to run different code generation targets, and also sets the default type for scalars to float32 in some test runs to check that 32bit float computing works.

@mstimberg
Copy link
Copy Markdown
Member

Hi @sukarxn, are you still interested in working on this?

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.

Brian configuration summary

2 participants