Allow excluding date ranges from billing calculations#6
Open
QuanMPhm wants to merge 1 commit intoCCI-MOC:mainfrom
Open
Allow excluding date ranges from billing calculations#6QuanMPhm wants to merge 1 commit intoCCI-MOC:mainfrom
QuanMPhm wants to merge 1 commit intoCCI-MOC:mainfrom
Conversation
naved001
reviewed
Sep 30, 2025
Collaborator
naved001
left a comment
There was a problem hiding this comment.
looks good, just some minor comments
0380312 to
e22732a
Compare
naved001
reviewed
Oct 1, 2025
bare_metal_billing/main.py
Outdated
| start_str, end_str = arg.split(",") | ||
| start_time, end_time = [parse_time_from_string(i) for i in (start_str, end_str)] | ||
| if start_time >= end_time: | ||
| raise ValueError(f"Start time {start_time} must be before end time {end_time}.") |
Collaborator
There was a problem hiding this comment.
you should raise an argparse.ArgumentTypeError here instead of ValueError. Otherwise, it actually won't print the message from ValueError.
e22732a to
739107f
Compare
Excluded date ranges are specified as a list of start and end ISO timestamps. Example: --excluded-time-ranges '2020-03-16T09:30:00,2020-03-16T10:30:00' '2020-03-18T00:00:00,2020-03-19T00:00:00' All timestamps will be converted to UTC.
739107f to
2cedee7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2. More details in the commit message