Repository: Cosmoglobe/zodipy (language: python)

Issue:
TST: test_get_emission_pix fails with hypothesis.errors.InvalidArgument when run with hypothesis 6.99.11
I see that you pinned:

https://github.com/Cosmoglobe/zodipy/blob/1a99511426d640aaa2caa848013072ea4b79abd5/pyproject.toml#L48

But probably a good idea to catch up to newer hypothesis release at some point?

```
    @given(model(), time(), nside(), data())
>   @settings(deadline=None)

tests/test_get_emission.py:30:
...
E           hypothesis.errors.InvalidArgument: ListStrategy(
    integers(min_value=0, max_value=196607), min_size=8_193, max_size=8_193)
    can never generate an example, because min_size is larger than Hypothesis supports.
    Including it is at best slowing down your tests for no benefit;
    at worst making them fail (maybe flakily) with a HealthCheck error.
E           while generating 'Draw 3: ' from pixels(128)
E           Falsifying example: test_get_emission_pix(
E               model=functools.partial(zodipy.zodipy.Zodipy)(
...
E           Draw 1: 'earth'
E           Draw 2: <Quantity 1.25 micron>
E           Explanation:
E               These lines were always and only run by failing examples:
E                   python3.12/enum.py:198

hypothesis/strategies/_internal/collections.py:152: InvalidArgument
--------------
FAILED tests/test_get_emission.py::test_get_emission_pix - hypothesis.errors.InvalidArgument:
ListStrategy(integers(min_value=0, max_value=196607), min_size=8_193, max_size=8...
```
MNT: Unleash Dependabot on Actions
I noticed that your workflow versions are a little behind. This would auto-update them going forward. Example:

https://github.com/Cosmoglobe/zodipy/blob/1a99511426d640aaa2caa848013072ea4b79abd5/.github/workflows/tests.yml#L16

It is v5 now.
TST: test_get_emission_pix fails with hypothesis.errors.InvalidArgument when run with hypothesis 6.99.11
I see that you pinned:

https://github.com/Cosmoglobe/zodipy/blob/1a99511426d640aaa2caa848013072ea4b79abd5/pyproject.toml#L48

But probably a good idea to catch up to newer hypothesis release at some point?

```
    @given(model(), time(), nside(), data())
>   @settings(deadline=None)

tests/test_get_emission.py:30:
...
E           hypothesis.errors.InvalidArgument: ListStrategy(
    integers(min_value=0, max_value=196607), min_size=8_193, max_size=8_193)
    can never generate an example, because min_size is larger than Hypothesis supports.
    Including it is at best slowing down your tests for no benefit;
    at worst making them fail (maybe flakily) with a HealthCheck error.
E           while generating 'Draw 3: ' from pixels(128)
E           Falsifying example: test_get_emission_pix(
E               model=functools.partial(zodipy.zodipy.Zodipy)(
...
E           Draw 1: 'earth'
E           Draw 2: <Quantity 1.25 micron>
E           Explanation:
E               These lines were always and only run by failing examples:
E                   python3.12/enum.py:198

hypothesis/strategies/_internal/collections.py:152: InvalidArgument
--------------
FAILED tests/test_get_emission.py::test_get_emission_pix - hypothesis.errors.InvalidArgument:
ListStrategy(integers(min_value=0, max_value=196607), min_size=8_193, max_size=8...
```


Discussion / hints:

Sounds good, thanks!


Fix patch:
diff --git a/.github /dependabot.yml b/.github/dependabot.yml
similarity index 100%
rename from .github /dependabot.yml
rename to .github/dependabot.yml
diff --git a/README.md b/README.md
index 644ad3a..7270835 100644
--- a/README.md
+++ b/README.md
@@ -64,7 +64,7 @@ See [CITATION](https://github.com/Cosmoglobe/zodipy/blob/dev/CITATION.bib) if yo
 Contributing developers will need to download the following additional dependencies:
 - pytest
 - pytest-cov
-- hypothesis (<=6.47.5)
+- hypothesis
 - coverage
 - ruff
 - mypy
diff --git a/poetry.lock b/poetry.lock
index 0c4487a..bcc5e2e 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -619,35 +619,36 @@ test = ["pytest", "pytest-cython", "pytest-doctestplus", "requests"]
 
 [[package]]
 name = "hypothesis"
-version = "6.47.5"
+version = "6.99.11"
 description = "A library for property-based testing"
 optional = false
-python-versions = ">=3.7"
+python-versions = ">=3.8"
 files = [
-    {file = "hypothesis-6.47.5-py3-none-any.whl", hash = "sha256:87049b781ee11ec1c7948565b889ab02e428a1e32d427ab4de8fdb3649242d06"},
-    {file = "hypothesis-6.47.5.tar.gz", hash = "sha256:e0c1e253fc97e7ecdb9e2bbff2cf815d8739e0d1d3d093d67c3af5bb6a7211b0"},
+    {file = "hypothesis-6.99.11-py3-none-any.whl", hash = "sha256:9c010b219ec611c995bac7e11a3edc96cea3c2c0b04a9d08ec586a7981715353"},
+    {file = "hypothesis-6.99.11.tar.gz", hash = "sha256:3df99ecf501e056c7e2c6ac7a9e3726f4fe8d2139dcce068aceffdab58265f1e"},
 ]
 
 [package.dependencies]
-attrs = ">=19.2.0"
-exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""}
+attrs = ">=22.2.0"
+exceptiongroup = {version = ">=1.0.0", markers = "python_version < \"3.11\""}
 sortedcontainers = ">=2.1.0,<3.0.0"
 
 [package.extras]
-all = ["backports.zoneinfo (>=0.2.1)", "black (>=19.10b0)", "click (>=7.0)", "django (>=2.2)", "dpcontracts (>=0.4)", "importlib-metadata (>=3.6)", "lark-parser (>=0.6.5)", "libcst (>=0.3.16)", "numpy (>=1.9.0)", "pandas (>=0.25)", "pytest (>=4.6)", "python-dateutil (>=1.4)", "pytz (>=2014.1)", "redis (>=3.0.0)", "rich (>=9.0.0)", "tzdata (>=2022.1)"]
+all = ["backports.zoneinfo (>=0.2.1)", "black (>=19.10b0)", "click (>=7.0)", "crosshair-tool (>=0.0.51)", "django (>=3.2)", "dpcontracts (>=0.4)", "hypothesis-crosshair (>=0.0.2)", "lark (>=0.10.1)", "libcst (>=0.3.16)", "numpy (>=1.17.3)", "pandas (>=1.1)", "pytest (>=4.6)", "python-dateutil (>=1.4)", "pytz (>=2014.1)", "redis (>=3.0.0)", "rich (>=9.0.0)", "tzdata (>=2024.1)"]
 cli = ["black (>=19.10b0)", "click (>=7.0)", "rich (>=9.0.0)"]
 codemods = ["libcst (>=0.3.16)"]
+crosshair = ["crosshair-tool (>=0.0.51)", "hypothesis-crosshair (>=0.0.2)"]
 dateutil = ["python-dateutil (>=1.4)"]
-django = ["django (>=2.2)"]
+django = ["django (>=3.2)"]
 dpcontracts = ["dpcontracts (>=0.4)"]
 ghostwriter = ["black (>=19.10b0)"]
-lark = ["lark-parser (>=0.6.5)"]
-numpy = ["numpy (>=1.9.0)"]
-pandas = ["pandas (>=0.25)"]
+lark = ["lark (>=0.10.1)"]
+numpy = ["numpy (>=1.17.3)"]
+pandas = ["pandas (>=1.1)"]
 pytest = ["pytest (>=4.6)"]
 pytz = ["pytz (>=2014.1)"]
 redis = ["redis (>=3.0.0)"]
-zoneinfo = ["backports.zoneinfo (>=0.2.1)", "tzdata (>=2022.1)"]
+zoneinfo = ["backports.zoneinfo (>=0.2.1)", "tzdata (>=2024.1)"]
 
 [[package]]
 name = "identify"
@@ -2014,4 +2015,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p
 [metadata]
 lock-version = "2.0"
 python-versions = ">=3.8"
-content-hash = "62c8b1922ae8beff925a35d64fd8e30882f096c964b35dcc7c7e00e8c528d204"
+content-hash = "7950300618bb5f2a956f670c1132cf7ffe78a90050bec4f26c24c38cc5685684"
diff --git a/pyproject.toml b/pyproject.toml
index 3aa127a..377515f 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -45,7 +45,7 @@ mkdocstrings = "^0.23.0"
 mkdocstrings-python = "^1.7.3"
 ruff = "^0.1.4"
 markdown = "<3.4.0"
-hypothesis = "<=6.47.5"
+hypothesis = "6.99.11"
 
 
 [build-system]


Test patch:
diff --git a/tests/_strategies.py b/tests/_strategies.py
index 477f7e6..baad257 100644
--- a/tests/_strategies.py
+++ b/tests/_strategies.py
@@ -86,7 +86,7 @@ def pixels(draw: DrawFn, nside: int) -> int | list[int] | npt.NDArray[np.integer
 
     shape = draw(integers(min_value=1, max_value=npix - 1))
 
-    list_stategy = lists(pixel_strategy, min_size=shape, max_size=shape)
+    list_stategy = lists(pixel_strategy, min_size=1)
     array_strategy = arrays(dtype=int, shape=shape, elements=pixel_strategy)
 
     return draw(one_of(pixel_strategy, list_stategy, array_strategy))