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

Skip files that don't have enough points to create a neighbourhood #109

Merged
merged 1 commit into from
Jul 3, 2023

Conversation

abelsiqueira
Copy link
Contributor

Description

If the data does not have enough points, skip it.

Related issues:

Closes #108

Instructions to review the pull request

The CI tests are enough

@abelsiqueira abelsiqueira force-pushed the 108-skip-files-with-not-enough-neighbours branch from 1992417 to 6433aa1 Compare June 27, 2023 10:05
@@ -116,6 +116,11 @@ def _process_data(self, data, origin=""):
)
].index
).reset_index(drop=True)
if len(data) < self.num_neighbours:
print(
f"Warning: There are not enough points to find {self.num_neighbours} neighbourhood"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe it is worth adding the origin to the message as it makes it easier to identify which file this occurs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added origin

@bart1
Copy link
Collaborator

bart1 commented Jun 27, 2023

Should we have a tests of this?

@abelsiqueira abelsiqueira force-pushed the 108-skip-files-with-not-enough-neighbours branch from 6433aa1 to 7e2f87a Compare June 29, 2023 14:38
@abelsiqueira
Copy link
Contributor Author

Hi @bart1, thanks for the review. I've added the origin and a test. I also rebased.

@abelsiqueira abelsiqueira force-pushed the 108-skip-files-with-not-enough-neighbours branch from 7e2f87a to b5ac1e4 Compare June 29, 2023 14:49
@abelsiqueira abelsiqueira force-pushed the 108-skip-files-with-not-enough-neighbours branch from b5ac1e4 to c9a621d Compare July 3, 2023 08:38
@sonarcloud
Copy link

sonarcloud bot commented Jul 3, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@abelsiqueira abelsiqueira requested a review from bart1 July 3, 2023 10:18
@lyashevska lyashevska merged commit f95716a into main Jul 3, 2023
16 checks passed
@lyashevska lyashevska deleted the 108-skip-files-with-not-enough-neighbours branch July 3, 2023 10:40
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.

Bug: Skip files that have less than num_neighbours neighbours
3 participants