ubsuny / CP1-24-HW7

Homework template for Homework 7
1 stars 14 forks source link

Added Pure Python Implementation of Secant Root Finding #29

Closed iglesias-cardinale closed 7 hours ago

iglesias-cardinale commented 22 hours ago

Added Pure Python Implementation of Secant Root Finding Method to calculus.py and added unit tests to test_calculus.py

Linting

Contents

Reviewer

ojha-aditya commented 21 hours ago

I can take this up if it is open

zbpetersbuf commented 21 hours ago

go right ahead @ojha-aditya

ojha-aditya commented 19 hours ago

go right ahead @ojha-aditya

Alright. I would self assign the review then?

iglesias-cardinale commented 10 hours ago

The PR looks good to merge. Only one warning of RuntimeToleranceReached in pytest shows up. If that can be resolved before merging that will be good. Not exactly sure why it arises. If resolving that is not possible/necessary then I will approve without that too.

I think that happens on that test because the runtime for the test was maxed out. But it happens in the test to check for non-convergence so exceeding the runtime is inherently part of the check. There might be a way around it but I haven't found any obvious options. I can keep digging around if we want to get it resolved before merge.

laserlab commented 9 hours ago

The PR looks good to merge. Only one warning of RuntimeToleranceReached in pytest shows up. If that can be resolved before merging that will be good. Not exactly sure why it arises. If resolving that is not possible/necessary then I will approve without that too.

I think that happens on that test because the runtime for the test was maxed out. But it happens in the test to check for non-convergence so exceeding the runtime is inherently part of the check. There might be a way around it but I haven't found any obvious options. I can keep digging around if we want to get it resolved before merge.

Maybe you can just use a really short timeout for the test.

iglesias-cardinale commented 9 hours ago

The PR looks good to merge. Only one warning of RuntimeToleranceReached in pytest shows up. If that can be resolved before merging that will be good. Not exactly sure why it arises. If resolving that is not possible/necessary then I will approve without that too.

I think that happens on that test because the runtime for the test was maxed out. But it happens in the test to check for non-convergence so exceeding the runtime is inherently part of the check. There might be a way around it but I haven't found any obvious options. I can keep digging around if we want to get it resolved before merge.

Maybe you can just use a really short timeout for the test.

I experimented with this, but I believe that it happens regardless of the time/max iterations. I tried all the way down to maxiter=2 and still got the warning. I think it's just inherent in this type of test since what we're checking for is that the function times out before converging. In my most recent commit I just told pytest to ignore the warning for this test., but I'm happy to remove that if it's not acceptable.

ojha-aditya commented 8 hours ago

Should I approve it in that case @laserlab as this would now be needed for the data presentation members? Minor functionality can be improved later as well maybe?

laserlab commented 8 hours ago

I'm fine with purest to ignore that warning and maybe we can figure out later. Go ahead and merge

zbpetersbuf commented 7 hours ago

@ojha-aditya if I merge before you accept the review you will not get points to my understanding