Skip to content

Revert band_name model field change; remove assertion from test instead#11

Merged
JBorrow merged 7 commits intomainfrom
copilot/resolve-ty-check-issues
Mar 11, 2026
Merged

Revert band_name model field change; remove assertion from test instead#11
JBorrow merged 7 commits intomainfrom
copilot/resolve-ty-check-issues

Conversation

Copy link
Contributor

Copilot AI commented Mar 11, 2026

The previous commit converted FeedResult.band_name from a @property to a Pydantic model field to satisfy a type checker, but the correct fix is to remove the test assertion rather than alter the model.

Changes

  • models/feed.py: Restored band_name as a computed @property returning f"f{self.frequency}"
  • client/feed.py: Removed the now-unnecessary explicit band_name=f"f{frequency}" from FeedResult construction
  • tests/test_backend/test_feed.py: Dropped assert feed.band_name == "f145" — the property is an implementation detail, not a contract worth asserting in integration tests
# Before: band_name promoted to a required model field
class FeedResult(BaseModel):
    frequency: int
    band_name: str  # ← added to appease type checker

# After: back to a derived property
class FeedResult(BaseModel):
    frequency: int

    @property
    def band_name(self) -> str:
        return f"f{self.frequency}"
Original prompt

Good morning! I would like you to continually run ty check lightcurvedb/storage/postgres and resolve all issues. Make minimal changes.

The user has attached the following file paths as relevant context:

  • .github/copilot-instructions.md

Created from VS Code.


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: JBorrow <7839515+JBorrow@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix type check issues in lightcurvedb storage Fix all ty check errors in lightcurvedb/storage/postgres Mar 11, 2026
@JBorrow
Copy link
Member

JBorrow commented Mar 11, 2026

Now that is fixed, please apply the new pattern (i.e. with the PostgresPoolUser subclass) to the timescale/ storage dependency.

@JBorrow JBorrow marked this pull request as ready for review March 11, 2026 14:30
Co-authored-by: JBorrow <7839515+JBorrow@users.noreply.github.com>
Copilot AI changed the title Fix all ty check errors in lightcurvedb/storage/postgres Apply PostgresPoolUser pool pattern to timescale/ storage and fix pooler typing Mar 11, 2026
Co-authored-by: JBorrow <7839515+JBorrow@users.noreply.github.com>
Copilot AI changed the title Apply PostgresPoolUser pool pattern to timescale/ storage and fix pooler typing Apply PostgresPoolUser pool pattern to timescale/ storage; fix pre-existing test failures Mar 11, 2026
…read

Co-authored-by: JBorrow <7839515+JBorrow@users.noreply.github.com>
Copilot AI changed the title Apply PostgresPoolUser pool pattern to timescale/ storage; fix pre-existing test failures Fix failing tests: FeedResult.band_name field and cutout test key lookup Mar 11, 2026
Copilot stopped work on behalf of JBorrow due to an error March 11, 2026 17:50
Co-authored-by: JBorrow <7839515+JBorrow@users.noreply.github.com>
Copilot AI changed the title Fix failing tests: FeedResult.band_name field and cutout test key lookup Revert band_name model field change; remove assertion from test instead Mar 11, 2026
@JBorrow JBorrow merged commit 04dfd1a into main Mar 11, 2026
3 checks passed
@JBorrow JBorrow deleted the copilot/resolve-ty-check-issues branch March 11, 2026 20:53
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