Skip to content

Conversation

@joseCarlosAndrade
Copy link

Changing TimeExtrapolationError to OutsideTimeInterval, as pointed by this issue

We're from the team of @vicenzodarezzo , which flagged the assignment of this issue on the original Parcels repo.

@joseCarlosAndrade
Copy link
Author

@erikvansebille
Could you please review our changes related to this issue? also, I'm struggling to understand this docs/readthedocs.org:parcels build.

Copy link
Member

@erikvansebille erikvansebille left a comment

Choose a reason for hiding this comment

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

Good start to fixing issue #2145! But you should propably also update the import statement on /src/parcels/__init.py__, as the unit tests now fail?


ErrorsToThrow = {
StatusCode.ErrorTimeExtrapolation: _raise_time_extrapolation_error,
StatusCode.ErrorOutsideTimeInterval: _raise_time_extrapolation_error,
Copy link
Member

Choose a reason for hiding this comment

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

This _raise_time_extrapolation_error function should probably also be renamed to _raise_outside_time_interval_error?

@github-project-automation github-project-automation bot moved this from Backlog to Ready in Parcels development Oct 13, 2025
@erikvansebille erikvansebille changed the title fix: editing error name of issue #2145 changing TimeExtrapolationError to OutsideTimeInterval Oct 13, 2025
@VeckoTheGecko
Copy link
Contributor

VeckoTheGecko commented Oct 14, 2025

Thanks for the PR here :)

Could you please review our changes related to this issue? also, I'm struggling to understand this docs/readthedocs.org:parcels build.

@joseCarlosAndrade have you seen our contributing documentation on the v4-dev branch? (in particular, the Pixi workflows on how to test locally?) If you follow those and those tests pass, then they'll also pass in CI

@vicenzodarezzo
Copy link
Contributor

Hey! Thank you all for your help, we really appreciate the tutoring!

I've made some updates in this task:

  • Corrected the error name in the module to ensure that the tests run correctly.
  • Renamed the error raise method to match our new semantics.
  • Updated the error message content so it does not suggest allowing time extrapolation to the user.
  • Made a small change in the function and added an example to reflect the new error name.

While running the tests, I encountered some warnings and possible errors that I believe may not be related to this scope.

The output from running: pixi run -e tests with latest env was:

tests/test_advection.py ........................................                                             [ 12%]
tests/test_basegrid.py ....                                                                                  [ 13%]
tests/test_datasets.py ..                                                                                    [ 14%]
tests/test_diffusion.py ............                                                                         [ 18%]
tests/test_field.py ...............                                                                          [ 22%]
tests/test_fieldset.py ..x............................                                                       [ 32%]
tests/test_index_search.py ..                                                                                [ 33%]
tests/test_interpolation.py ..............x                                                                  [ 37%]
tests/test_kernel.py ......                                                                                  [ 39%]
tests/test_particle.py ..............                                                                        [ 43%]
tests/test_particlefile.py s.ssss..xsxsxsxxsx.sx........x                                                    [ 53%]
tests/test_particleset.py ........................                                                           [ 60%]
tests/test_particleset_execute.py .....................................................x...x                 [ 78%]
tests/test_spatialhash.py ...                                                                                [ 79%]
tests/test_structured_gcm.py s                                                                               [ 80%]
tests/test_utils.py .                                                                                        [ 80%]
tests/test_uxarray_fieldset.py .....                                                                         [ 81%]
tests/test_uxgrid.py .....                                                                                   [ 83%]
tests/test_xgrid.py ...............................                                                          [ 93%]
tests/utils/test_time.py ....................                                                                [ 99%]
tests/utils/test_unstructured.py ..                                                                          [100%]

============================ 298 passed, 11 skipped, 12 xfailed, 916 warnings in 55.38s ============================

Is this expected in v4-dev? Could someone help me understand the causes of this output, please?

Copy link
Member

@erikvansebille erikvansebille left a comment

Choose a reason for hiding this comment

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

Looks good; I'm happy to merge this PR. Thanks for the contribution @joseCarlosAndrade!

@erikvansebille
Copy link
Member

Is this expected in v4-dev? Could someone help me understand the causes of this output, please?

Yes, this is indeed expected output. The s and x are for skipped tests and expected failures; these are tests that we haven't ported yet to v4 so that we don't expect to Pass. Since you don't get any F in the outputs, there are no tests that failed but should have passed. So all good to merge!

@erikvansebille erikvansebille merged commit 5bf4a16 into Parcels-code:v4-dev Oct 16, 2025
10 checks passed
@github-project-automation github-project-automation bot moved this from Ready to Done in Parcels development Oct 16, 2025
@joseCarlosAndrade
Copy link
Author

Thanks for the help guys! Great work with this project 👏

@ghtormena
Copy link
Contributor

Thanks everyone for the help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants