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

Remove default binning #874

Merged
merged 14 commits into from
Jun 18, 2024
Merged

Conversation

paolafer
Copy link
Collaborator

@paolafer paolafer commented May 29, 2024

This PR removes the assignment of a default time binning to sensors, when no sensor response is found in the bunch of files being processed. The city will crash, instead.
Also, a test is modified to account for this change and another one is added.

Closes #857

@paolafer paolafer marked this pull request as draft May 29, 2024 08:54
@paolafer paolafer marked this pull request as ready for review May 31, 2024 13:24
@paolafer paolafer force-pushed the remove-default-binning branch from 2511e12 to 67cfb9e Compare May 31, 2024 13:25
@gonzaponte
Copy link
Collaborator

Just so we don't forget, there is still a problem if the first file does not contain sensor responses. If we don't fix it here, we will open an issue.

Copy link
Collaborator

@gonzaponte gonzaponte left a comment

Choose a reason for hiding this comment

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

Some small comments

invisible_cities/cities/buffy.py Outdated Show resolved Hide resolved
invisible_cities/cities/buffy_test.py Outdated Show resolved Hide resolved
invisible_cities/cities/buffy_test.py Outdated Show resolved Hide resolved
invisible_cities/cities/buffy_test.py Outdated Show resolved Hide resolved
invisible_cities/cities/buffy_test.py Outdated Show resolved Hide resolved
invisible_cities/cities/buffy_test.py Outdated Show resolved Hide resolved
@paolafer paolafer force-pushed the remove-default-binning branch from 3b748dd to 35e57d4 Compare June 4, 2024 20:13
@paolafer paolafer marked this pull request as draft June 5, 2024 10:53
@paolafer paolafer force-pushed the remove-default-binning branch 3 times, most recently from 8e58723 to 34fa42a Compare June 12, 2024 17:24
@paolafer paolafer marked this pull request as ready for review June 13, 2024 09:47
@paolafer paolafer force-pushed the remove-default-binning branch from 34fa42a to c8e7fec Compare June 13, 2024 09:48
@paolafer
Copy link
Collaborator Author

I've rebased on the new master. The PR is now ready to be reviewed one last time.

@paolafer paolafer force-pushed the remove-default-binning branch from c8e7fec to e9410d9 Compare June 13, 2024 11:28
invisible_cities/cities/buffy_test.py Outdated Show resolved Hide resolved
invisible_cities/cities/components.py Outdated Show resolved Hide resolved
invisible_cities/cities/buffy_test.py Outdated Show resolved Hide resolved
@paolafer paolafer force-pushed the remove-default-binning branch from e9410d9 to 23ca5ef Compare June 14, 2024 14:47
Copy link
Collaborator

@gonzaponte gonzaponte left a comment

Choose a reason for hiding this comment

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

Excellent. We remove one of the many instances of dangerous default values in our code. We now handle the case with missing values explicitly, but we still have to address the case where the first file does not contain data, for which we will open an issue. The code looks good and is properly tested. Good job!

@jwaiton jwaiton merged commit a659b23 into next-exp:master Jun 18, 2024
1 check passed
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.

Remove default binning in Buffy
3 participants