Skip to content

Refactor Parcels time strategies into tests.strategies submodule#2602

Merged
VeckoTheGecko merged 6 commits intoParcels-code:mainfrom
VeckoTheGecko:push-qowuxozwlnwo
Apr 28, 2026
Merged

Refactor Parcels time strategies into tests.strategies submodule#2602
VeckoTheGecko merged 6 commits intoParcels-code:mainfrom
VeckoTheGecko:push-qowuxozwlnwo

Conversation

@VeckoTheGecko
Copy link
Copy Markdown
Contributor

Description

This makes it easier to share these strategies between tests.

Also moved test_datasets.py to datasets/test_structured.py. This is because we will want to have tests for creating and manipulating output data as well (as part of #2600 ) so this structure would be nice. At the end of last week I started work on #2600 , but since decided to stop in favour of other work. I think these changes are good to get into main regardless.

Checklist

  • Closes None
  • This PR targets the correct branch (main for normal development, v3-support for v3 support)

Comment thread tests/utils/test_time.py
from hypothesis import given
from hypothesis import strategies as st

import tests.strategies as pst # parcels strategies
Copy link
Copy Markdown
Contributor Author

@VeckoTheGecko VeckoTheGecko Apr 28, 2026

Choose a reason for hiding this comment

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

This import alias is common convention for Hypothesis (and packages that provide hypothesis strategies).

import hypothesis.strategies as st
import xarray.testing.strategies as xrst

# and here
import tests.strategies as pst # <-- parcels strategies

@VeckoTheGecko VeckoTheGecko changed the title Refactor Parcels Hypothesis strategies into their own module Refactor Parcels time strategies into tests.strategies submodule Apr 28, 2026
@VeckoTheGecko VeckoTheGecko enabled auto-merge (squash) April 28, 2026 10:27
@VeckoTheGecko VeckoTheGecko disabled auto-merge April 28, 2026 11:07
@VeckoTheGecko VeckoTheGecko merged commit 1a430b9 into Parcels-code:main Apr 28, 2026
10 of 14 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in Parcels development Apr 28, 2026
@VeckoTheGecko VeckoTheGecko deleted the push-qowuxozwlnwo branch April 28, 2026 11:08
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.

2 participants