[Beginner] How to perform testing

Hello everyone ,
I am Dhruv Jariwala, Computer Engineering undergrad from Mumbai, India.
I am a data science and Machine Learning enthusiast. I am interested in contributing to Brian but I am a newbie to open source.

I have built the development install of Brian. I working on #1476 since I felt that it is beginner friendly. I have corrected the formula but now I am not understanding how to test it since the docs stated:

For bugs, it is important to not only fix the bug but also to introduce a new test case (see Testing) that makes sure that the bug will not ever be reintroduced by other changes

I know that the doubt is silly and trivial. Apologies for the same and Thanks in advance :smiling_face:

Hi @DHRUVJ2003. Many thanks for your interest in helping out! Nothing silly or trivial about your question :blush:

The issue you selected is indeed quite beginner-friendly – correcting the formula in the respective file is basically all that is needed. It is not a good example for a general bug fix in Brian, though, since it is in an example (i.e., part of the documentation), and not part of Brian’s own code. It is therefore not necessary (or possible, actually), to write a test case for the issue.
Unfortunately, contributing and updating examples is more complex at the moment than it should be, since in addition to changing the example code, there’s a non-trivial procedure with the git submodule that stores the generated plots for the examples… At the moment, I’d recommend to only do a pull request with changes to the example code, and I will take care of updating the example plot, if necessary.

1 Like

okay ,thank you sir , I’ll do the needful. (Made a pr. Pls review the same )
One more doubt…Are tutorials sufficient to understand brian ? Can you provide me with any other specific resource such that I can understand the codebase of brian …So that I can make better contributions in future.

Once again thanks a lot :blush: