Skip to content
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

Resolves #212 #223

Merged
merged 5 commits into from
Jan 27, 2023
Merged

Resolves #212 #223

merged 5 commits into from
Jan 27, 2023

Conversation

lettlini
Copy link
Collaborator

This pull request should resolve #212.

A simple check has been added to correctly handle the case of neither v_max, d_min, d_max being passed to linking_trackpy, i.e. a ValueError is raised if all three arguments are missing. A corresponding test case has also been added.

  • Have you followed our guidelines in CONTRIBUTING.md?
  • Have you self-reviewed your code and corrected any misspellings?
  • Have you written documentation that is easy to understand?
  • Have you written descriptive commit messages?
  • Have you added NumPy docstrings for newly added functions?
  • Have you formatted your code using black?
  • If you have introduced a new functionality, have you added adequate unit tests?
  • Have all tests passed in your local clone?
  • If you have introduced a new functionality, have you added an example notebook?
  • Have you kept your pull request small and limited so that it is easy to review?
  • Have the newest changes from this branch been merged?

Copy link
Member

@JuliaKukulies JuliaKukulies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great, @lettlini! No objections to merging the code changes as they are. Thank you for fixing this one

@JuliaKukulies JuliaKukulies added bug Code that is failing or producing the wrong result Small Change A minor change which should be quick to address and review labels Jan 13, 2023
@codecov
Copy link

codecov bot commented Jan 13, 2023

Codecov Report

Base: 41.01% // Head: 41.06% // Increases project coverage by +0.05% 🎉

Coverage data is based on head (88bdf5e) compared to base (89df5e9).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@              Coverage Diff              @@
##           RC_v1.5.0     #223      +/-   ##
=============================================
+ Coverage      41.01%   41.06%   +0.05%     
=============================================
  Files             14       14              
  Lines           2321     2323       +2     
=============================================
+ Hits             952      954       +2     
  Misses          1369     1369              
Flag Coverage Δ
unittests 41.06% <100.00%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
tobac/tracking.py 65.76% <100.00%> (+0.62%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Collaborator

@snilsn snilsn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job Kolya @lettlini. I have only one thought to discuss, but this is due to my formulation of #212

@@ -178,6 +178,11 @@ def linking_trackpy(
# from trackpy import filter_stubs
# from .utils import add_coordinates

if (v_max is None) and (d_min is None) and (d_max is None):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that I look again at the explanation of d_min in the docstring, I think we should exclude it here, since its original purpose is not to define a search range (The current implementation, however, only mimics d_max).

Since the parameter will eventually be deprecated, it is probably better not to promote its use in an error.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with your thoughts here, Nils. I'll wait to review until this is changed. I'd say that we should leaved_min in the if statement here, but remove it in the error message.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you are both absolutely right. I have updated the error message accordingly.

Copy link
Member

@freemansw1 freemansw1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy with this PR. Once @snilsn has a chance to review again, I'm happy for this to be merged.

@freemansw1
Copy link
Member

@lettlini since Nils has approved, I'm happy to merge this; are you still happy for it to be included?

@lettlini
Copy link
Collaborator Author

@freemansw1 Sorry for the late reply. Yes I am still happy for this PR to be merged

@freemansw1 freemansw1 merged commit 2b43edf into tobac-project:RC_v1.5.0 Jan 27, 2023
@freemansw1 freemansw1 added this to the Version 1.5 milestone Jan 27, 2023
@lettlini lettlini deleted the arguments_bug branch February 16, 2023 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Code that is failing or producing the wrong result Small Change A minor change which should be quick to address and review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants