Skip to content

feat: added endpoint option to date_range - #220

Merged
tsutterley merged 5 commits into
mainfrom
dev
Apr 24, 2026
Merged

feat: added endpoint option to date_range#220
tsutterley merged 5 commits into
mainfrom
dev

Conversation

@tsutterley

Copy link
Copy Markdown
Member

feat: add more defaults to from_calendar function
docs: ruff format conf.py
docs: use :py:func: instead of :func:
ci: bump versions for github actions
ci: upload simpler reports to PRs
ci: use ubuntu-slim as default OS

feat: add more defaults to `from_calendar` function
docs: ruff format `conf.py`
docs: use `:py:func:` instead of `:func:`
ci: bump versions for github actions
ci: upload simpler reports to PRs
ci: use `ubuntu-slim` as default OS
Copilot AI review requested due to automatic review settings April 23, 2026 21:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds API options for generating date ranges / calendar times, and updates docs + CI configuration accordingly.

Changes:

  • Add endpoint option to timescale.time.date_range and default month/day values for Timescale.from_calendar.
  • Update module wrapper docstrings to use Sphinx :py: roles.
  • Update CI workflows (runner OS labels, action versions, PR coverage reporting behavior) and ruff configuration.

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
timescale/time.py Adds endpoint arg to date_range; adds default month/day for from_calendar.
timescale/__init__.py Updates wrapper docstrings to Sphinx :py: roles.
pyproject.toml Removes doc from ruff exclude list.
pixi.lock Updates lockfile hash for local package entry.
doc/source/conf.py Ruff formatting / quoting normalization.
.github/workflows/ruff-format.yml Changes runner label and bumps checkout action major.
.github/workflows/python-request.yml Adjusts triggers/permissions; changes action versions; adds PR-only reporting; adds draft gating.
.github/workflows/python-publish.yml Changes release trigger, runner label, and bumps checkout action major.
.github/workflows/auto-update-files.yml Changes runner label and simplifies job definition.
.github/workflows/auto-update-bulletin-a.yml Changes runner label and simplifies job definition.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread timescale/time.py
Comment thread timescale/__init__.py Outdated
Comment thread timescale/__init__.py
Comment thread timescale/__init__.py Outdated
Comment thread .github/workflows/python-request.yml
Comment thread timescale/time.py
@github-actions

github-actions Bot commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

Coverage

Tests Skipped Failures Errors Time
39 0 💤 0 ❌ 0 🔥 16m 10s ⏱️

@github-actions

github-actions Bot commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

Coverage

Tests Skipped Failures Errors Time
39 0 💤 0 ❌ 0 🔥 20m 52s ⏱️

@github-actions

github-actions Bot commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

Coverage

Tests Skipped Failures Errors Time
39 0 💤 0 ❌ 0 🔥 11m 51s ⏱️

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 11 changed files in this pull request and generated 8 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/ruff-format.yml

runs-on: ubuntu-latest

runs-on: ubuntu-slim

Copilot AI Apr 23, 2026

Copy link

Choose a reason for hiding this comment

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

ubuntu-slim is not a valid GitHub-hosted runner label, so this publish workflow will fail to start. Use a supported runner label such as ubuntu-latest/ubuntu-22.04/ubuntu-24.04.

Suggested change
runs-on: ubuntu-slim
runs-on: ubuntu-latest

Copilot uses AI. Check for mistakes.
run:
shell: bash -l {0}

runs-on: ubuntu-slim

Copilot AI Apr 23, 2026

Copy link

Choose a reason for hiding this comment

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

ubuntu-slim is not a valid GitHub-hosted runner label, so this scheduled job will not run. Use a supported runner label such as ubuntu-latest or ubuntu-22.04.

Suggested change
runs-on: ubuntu-slim
runs-on: ubuntu-latest

Copilot uses AI. Check for mistakes.
Comment thread timescale/time.py Outdated
Comment on lines +303 to +307
start = np.array(parse(start), dtype=f"datetime64[{units}]")
if isinstance(end, str):
end = np.array(parse(end), dtype=f"datetime64[{units}]")
# create date range
return np.arange(start, end + step, step)
return np.arange(start, end + endpoint * step, step)

Copilot AI Apr 23, 2026

Copy link

Choose a reason for hiding this comment

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

date_range advertises support for datetime.datetime inputs, but only string inputs are converted to datetime64. If callers pass datetime.datetime, np.arange will receive non-datetime64 values and is likely to error or produce object arrays. Convert datetime.datetime inputs to datetime64[{units}] (or tighten the type hints/docs to match supported types).

Copilot uses AI. Check for mistakes.
Comment thread timescale/time.py Outdated
Comment thread test/test_time.py
Comment on lines +218 to +222
exp = 58849 + np.arange(32)
assert np.all(ts.MJD == exp)
ts = timescale.from_range('2020-01-01','2020-02-01',1,'D',endpoint=False)
exp = 58849 + np.arange(31)
assert np.all(ts.MJD == exp)

Copilot AI Apr 23, 2026

Copy link

Choose a reason for hiding this comment

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

There’s trailing whitespace after the assertions, which will cause formatter/linter noise and can fail strict checks. Remove the extra spaces so the file stays clean under ruff/flake8.

Copilot uses AI. Check for mistakes.
Comment thread test/test_time.py Outdated
run:
shell: bash -l {0}

runs-on: ubuntu-slim

Copilot AI Apr 23, 2026

Copy link

Choose a reason for hiding this comment

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

ubuntu-slim is not a valid GitHub-hosted runner label, so this scheduled job will not run. Switch to a supported Ubuntu runner label (e.g., ubuntu-latest or a pinned ubuntu-22.04).

Suggested change
runs-on: ubuntu-slim
runs-on: ubuntu-22.04

Copilot uses AI. Check for mistakes.
tsutterley and others added 3 commits April 23, 2026 15:13
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
feat: raise original exceptions in cases of `HTTPError`/`URLError`
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@tsutterley
tsutterley merged commit 2cd4cdf into main Apr 24, 2026
4 checks passed
@tsutterley
tsutterley deleted the dev branch April 24, 2026 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants