Skip to content

Rename the timeslices table's timeslice_id column to timeslice - #140

Open
nick-gorman wants to merge 2 commits into
apply-per-timeslice-link-limitsfrom
rename-timeslice-id-to-timeslice
Open

Rename the timeslices table's timeslice_id column to timeslice#140
nick-gorman wants to merge 2 commits into
apply-per-timeslice-link-limitsfrom
rename-timeslice-id-to-timeslice

Conversation

@nick-gorman

@nick-gorman nick-gorman commented Aug 24, 2026

Copy link
Copy Markdown
Member

Realised that I'd use both timeslice and timeslice_id as column names for different tables. This PR does a big cleanup to unify the naming to just use timeslice. The change needs to touch code in #137 so this PR is currently targeting #137, but I intend to merge #137 and then target this PR at main.

The tables that reference timeslice windows (network_transmission_path_limits,
custom_constraints_rhs) have always called the column timeslice, so any
consumer joining limits onto windows had to rename one side first -- the
apply-per-timeslice-link-limits branch adds the first such join and with it
the first rename shim. Using one name end-to-end removes that seam; the
divergence from the path_id/constraint_id suffix convention is accepted.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Eip6Q6HyAwbqVkoKthGA8Z
@codecov

codecov Bot commented Aug 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/ispypsa/pypsa_build/links.py 100.00% <100.00%> (ø)
src/ispypsa/templater/timeslices.py 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

The point of the line is that the caller's timeslice_snapshots frame is
not mutated; .copy() states that directly instead of leaning on assign
returning a new frame.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Eip6Q6HyAwbqVkoKthGA8Z
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.

1 participant