Skip to content

Conversation

@ghiggi
Copy link
Collaborator

@ghiggi ghiggi commented Nov 5, 2025

Prework

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and communicate accordingly:

The PR fulfills these requirements:

  • It's submitted to the branch named as follow :
    • Add a reader: reader-<institute>-<campaign>
    • Fix a bug: bugfix-<some_key>-<word>
    • Improve the doc: doc-<some_key>-<word>
    • Add a new feature: feature-<some_key>-<word>
    • Refactor some code: refactor-<some_key>-<word>
    • Optimize some code: optimize-<some_key>-<word>
  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)
  • Don't forget to link PR to issue if you are solving one.
  • All tests are passing.
  • New/updated tests are included

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

Other information:

Related GitHub issues and Pull Requests

  • Ref: #

Summary

Please explain the purpose and scope of your contribution.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 506 to 510
# Initialize label
label = xr.ones_like(ds["time"], dtype=float) * -1 # [mm]

# No precipitation
label = xr.where(n_particles == 0, 1, label)

Choose a reason for hiding this comment

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

P1 Badge Mark zero-particle timesteps as no precipitation

Inside classify_raw_spectrum the “no precipitation” branch assigns label = xr.where(n_particles == 0, 1, label). Because the literal is 1, every timestep with no counted particles is labelled as drizzle (class 1) before the later hydrometeor_type mapping, so empty spectra are reported as rainfall and downstream flags such as precipitation_type, flag_hail, and flag_graupel are derived from the wrong class. The label for the no-particle case should be 0 to represent no precipitation.

Useful? React with 👍 / 👎.

@codecov
Copy link

codecov bot commented Nov 5, 2025

Codecov Report

❌ Patch coverage is 92.20877% with 103 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.75%. Comparing base (0693c3a) to head (0a5eb32).

Files with missing lines Patch % Lines
disdrodb/fall_velocity/graupel.py 41.09% 43 Missing ⚠️
disdrodb/routines/wrappers.py 56.00% 22 Missing ⚠️
disdrodb/fall_velocity/hail.py 75.86% 14 Missing ⚠️
disdrodb/l1/classification.py 96.30% 10 Missing ⚠️
disdrodb/l2/processing.py 93.90% 5 Missing ⚠️
disdrodb/accessor/methods.py 0.00% 2 Missing ⚠️
disdrodb/l0/check_configs.py 87.50% 2 Missing ⚠️
disdrodb/l1/processing.py 90.90% 1 Missing ⚠️
disdrodb/l2/empirical_dsd.py 90.00% 1 Missing ⚠️
disdrodb/physics/wrappers.py 93.75% 1 Missing ⚠️
... and 2 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #237      +/-   ##
==========================================
- Coverage   93.93%   93.75%   -0.18%     
==========================================
  Files         107      115       +8     
  Lines        9906    10871     +965     
==========================================
+ Hits         9305    10192     +887     
- Misses        601      679      +78     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@coveralls
Copy link
Collaborator

coveralls commented Nov 5, 2025

Coverage Status

coverage: 93.599% (-0.2%) from 93.763%
when pulling 0a5eb32 on ghiggi:add-hc
into 0693c3a on ltelab:main.

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.

2 participants