ComparerCollection.sel(), time arg errors when selecting a month where some comparers have no temporal overlap

Open
#668 0 comments 1 reaction 2 assignees View on GitHub

@ryan-kipawa is already working on this.

Since Jun 10, 2026.

  • #669 by @copilot-swe-agent — open

Assessment

This issue has not been assessed yet.

Description

bug

Steps to reproduce:

This works:

import modelskill as ms
cc = ms.data.oresund()

cc.sel(time=slice("2022-01-03 00:00:00", "2022-01-03 00:00:00")

This fails:

import modelskill as ms
cc = ms.data.oresund()

cc.sel(time=slice("2022-01-03")

Likely caused by this comparer failing:

cc["Koege"].sel(time=slice("2022-01-03")

Expected behaviour:

Should work the same way when using an explicit slice as using a implicit time period. Selecting a time period with no data should return an empty comparer, and on a comparer collection it gets removed (as it already works today).

Dominant language
Python
Stars
56
Forks
9
Avg merge
57m
Merged PRs (30d)
3

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from DHI/modelskill

All issues in DHI/modelskill

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.