• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

hydrologie / xdatasets / 19147573697

06 Nov 2025 07:34PM UTC coverage: 20.335% (-0.2%) from 20.507%
19147573697

Pull #258

github

web-flow
Merge cbf57e240 into f3ea17ca6
Pull Request #258: Bump the actions group in /.github/workflows with 6 updates + cruft update

0 of 16 new or added lines in 7 files covered. (0.0%)

7 existing lines in 6 files now uncovered.

97 of 477 relevant lines covered (20.34%)

1.22 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

12.5
/src/xdatasets/validations.py
1
import logging
6✔
2

3
import geopandas as gpd
6✔
4

5

6
def _validate_space_params(
6✔
7
    clip: str,
8
    geometry: dict[str, tuple] | gpd.GeoDataFrame,
9
    averaging: bool = False,
10
    unique_id: str | None = None,
11
):
12
    _clip_available_methods = ["bbox", "point", "polygon", None]
×
13

14
    if clip not in _clip_available_methods:
×
15
        raise ValueError(f"clip value '{clip}' is not one of {_clip_available_methods}")
×
16

17
    if not isinstance(averaging, bool):
×
18
        raise ValueError(f"averaging value '{averaging}' should be a boolean")
×
19

20
    if not (isinstance(unique_id, type(None)) or isinstance(unique_id, str)):
×
21
        raise ValueError(f"unique_id value '{unique_id}' should be a string")
×
22

23
    if unique_id is not None:
×
24
        if isinstance(geometry, gpd.GeoDataFrame) and unique_id not in geometry.columns:
×
NEW
25
            message = f"\nunique_id value '{unique_id}' was not found in gpd.GeoDataFrame \nso a random index will be used instead."
×
UNCOV
26
            logging.warning(message)
×
27

28
    if averaging is True and not isinstance(geometry, gpd.GeoDataFrame):
×
29
        message = (
×
30
            f"\naveraging value '{averaging}' is not necessary \nbecause geometry is not a GeoPandas GeoDataFrame.\naveraging value will be ignored."
31
        )
32
        logging.warning(message)
×
33

34
    if averaging is True and clip in ["point"]:
×
35
        message = (
×
36
            f"\naveraging value '{averaging}' is not necessary \nbecause clip operation requested is on a {clip}.\naveraging value will be ignored."
37
        )
38
        logging.warning(message)
×
39

40
    if unique_id is not None and not isinstance(geometry, gpd.GeoDataFrame):
×
41
        message = (
×
42
            f"\nunique_id value '{unique_id}' is not necessary \nbecause geometry is not a GeoPandas GeoDataFrame.\nunique_id value will be ignored."
43
        )
44
        logging.warning(message)
×
45

46
    return True
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc