-
-
Notifications
You must be signed in to change notification settings - Fork 434
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
made the timo_0 in decay framework required #2183
Conversation
*beep* *bop* Hi, human. I'm the @tardis-bot and couldn't find your records in my database. I think we don't know each other, or you changed your credentials recently. Please add your name and email to In case you need to map an existing alias, follow this example. |
This seems to break the tests. |
The tests probably assume that the "default value" is set to 0, as it was in previously. @Soumya624 , can you look into that? |
Yeah sure! |
@Soumya624 do you plan to address the currently failing checks soon? |
@Soumya624 Are you still working on resolving this? If not, please let me know if I can take it forward from here. |
@andrewfullard I was going through the entire repository and i found that any test cases that create an instance of the IsotopeAbundance class without explicitly specifying the time_0 parameter are likely to fail. So, I searched the test cases and found that if we can modify 'tardis/io/tests/test_decay.py' and 'tardis/model/tests/test_base.py', then we can omit these. To modify the simple_abundance_model() fixture in tardis/io/tests/test_decay.py to avoid the failure due to the time_0 parameter not being specified, we can add an explicit time_0 parameter with a default value of 0 to the function definition and pass this default value to the constructor of IsotopeAbundances.
And to modify the simple_isotope_abundance() function in tardis/model/tests/test_base.py, we can add a similar explicit time_0 parameter with a default value of 0 to the function definition and pass this default value to the constructor of IsotopeAbundances.
Please let me know if this approach is correct. I will made the PR! |
@AyushiDaksh Yeah i'm about to make a PR. With the necessary changes in the test cases! |
Sorry for the late response. I think your solution is sensible, please commit it to this PR. |
@Soumya624 Are you still working on this? @andrewfullard If @Soumya624 is not actively working on this, then I'll take this up. In that case, would I have to make a new PR or append my changes to this PR? |
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Hi @andrewfullard, Thanks |
|
Please resolve the merge conflict |
Hi @andrewfullard , Thanks for your review regarding the variable name. Please have a look at this now! |
@wkerzendorf do we want to require "time_0" now that we are changing how the model is set up? |
Closing this in favour of later configuration restructure |
📝 Description
Type: 🪲
bugfix
| 🚀feature
Changed the current init method in line 11 of "\tardis\io\decay.py" file, to resolve the issue. Here is a snippet of the modified version of the init method that includes a check to ensure that the time_0 parameter is specified by the user:
This modified version first checks if the time_0 parameter is included in the kwargs dictionary. If it is not, it raises a ValueError to inform the user that the time_0 parameter must be specified. If the time_0 parameter is present, it is extracted from the kwargs dictionary and assigned to the time_0 variable. The time_0 key is then removed from the kwargs dictionary before calling the parent class's init method. Finally, the value of time_0 is assigned to the time_0 attribute of the IsotopeAbundance instance.
Also, link issues affected by this pull request by using the keywords:
close
,closes
,closed
,fix
,fixes
,fixed
,resolve
,resolves
orresolved
.📌 Resources
Examples, notebooks and links to useful references.
🚦 Testing
How did you test these changes?
☑️ Checklist
build_docs
label