Skip to content

Create agent_cost_limits table#499

Merged
tsmbland merged 10 commits intomainfrom
agent_cost_limits
Apr 28, 2025
Merged

Create agent_cost_limits table#499
tsmbland merged 10 commits intomainfrom
agent_cost_limits

Conversation

@tsmbland
Copy link
Copy Markdown
Collaborator

@tsmbland tsmbland commented Apr 24, 2025

Description

Splitting cost limits out from the main agents table so they can be specified by year

Fixes #455

Type of change

  • Bug fix (non-breaking change to fix an issue)
  • New feature (non-breaking change to add functionality)
  • Refactoring (non-breaking, non-functional change to improve maintainability)
  • Optimization (non-breaking change to speed up the code)
  • Breaking change (whatever its nature)
  • Documentation (improve or add documentation)

Key checklist

  • All tests pass: $ cargo test
  • The documentation builds and looks OK: $ cargo doc

Further checks

  • Code is commented, particularly in hard-to-understand areas
  • Tests added that prove fix is effective or that feature works

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 24, 2025

Codecov Report

Attention: Patch coverage is 95.86207% with 6 lines in your changes missing coverage. Please review.

Project coverage is 94.54%. Comparing base (d502c32) to head (f43e5cb).
Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
src/input/agent/cost_limit.rs 97.03% 0 Missing and 4 partials ⚠️
src/input/agent.rs 66.66% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #499      +/-   ##
==========================================
+ Coverage   94.33%   94.54%   +0.20%     
==========================================
  Files          37       38       +1     
  Lines        4751     4878     +127     
  Branches     4751     4878     +127     
==========================================
+ Hits         4482     4612     +130     
+ Misses        138      128      -10     
- Partials      131      138       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tsmbland tsmbland marked this pull request as ready for review April 24, 2025 12:02
@tsmbland tsmbland requested a review from alexdewar April 24, 2025 12:03
@tsmbland tsmbland linked an issue Apr 24, 2025 that may be closed by this pull request
@tsmbland tsmbland marked this pull request as draft April 28, 2025 11:00
@tsmbland
Copy link
Copy Markdown
Collaborator Author

Converted back to draft as this needs to be updated to use parse_year_str instead of YearSelection

@tsmbland
Copy link
Copy Markdown
Collaborator Author

Ok ready now (once #475 is approved)

@tsmbland tsmbland marked this pull request as ready for review April 28, 2025 12:28
Copy link
Copy Markdown
Member

@alexdewar alexdewar left a comment

Choose a reason for hiding this comment

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

LGTM!

Comment thread src/input/agent/cost_limit.rs Outdated
Comment thread src/input/agent/cost_limit.rs Outdated
Comment thread src/input/agent/cost_limit.rs Outdated
Comment thread src/input/agent/cost_limit.rs Outdated
Comment on lines +181 to +183
let milestone_years = vec![2020, 2025];

let iter = vec![create_agent_cost_limits_raw(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
let milestone_years = vec![2020, 2025];
let iter = vec![create_agent_cost_limits_raw(
let milestone_years = [2020, 2025];
let iter = [create_agent_cost_limits_raw(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

For iterators with one thing in you can also just use std::iter::once

Comment thread src/input/agent/cost_limit.rs Outdated
Base automatically changed from annual_field_alternative to main April 28, 2025 18:44
tsmbland and others added 2 commits April 28, 2025 19:53
Co-authored-by: alexdewar <alexdewar@users.noreply.github.com>
@tsmbland tsmbland enabled auto-merge April 28, 2025 18:56
@tsmbland tsmbland merged commit 219e477 into main Apr 28, 2025
7 checks passed
@tsmbland tsmbland deleted the agent_cost_limits branch April 28, 2025 19:02
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.

Create agent_cost_limits table

2 participants