-
Notifications
You must be signed in to change notification settings - Fork 302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add fortnightly interval #1955
base: main
Are you sure you want to change the base?
Conversation
6fba497
to
4a34f47
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR, looks good - I just left some minor comments.
@@ -93,6 +96,31 @@ class Interval(Enum): | |||
YEAR = "year" | |||
QUARTER = "quarter" | |||
MONTH = "month" | |||
FORTNIGHT = "fortnight" | |||
# Note: While a fortnight is a well-defined time interval, there are no |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you move this (maybe in a slightly shortened form) to the help pages this seems relevant for users to understand how this works
In some countries (such as Australia), it is very common for wages to be paid on a fortnightly basis, that is, every 2 weeks. As a result, a number of other expenses are also paid on a fortnightly basis. This commit extends the `Interval` enum by adding a `FORTNIGHT` option. I have added a test for that, and have updated the translations where possible (not that other than for English and French, the other translations may be suboptimal). Resolves: beancount#1939 Signed-off-by: JP-Ellis <[email protected]>
Made a few improvements to the budgets docs by: - Specifying how budgets can replace previous one using an example - Expanding a bit on how each interval is calculated - Some minor refactors to help everything flow a bit better Signed-off-by: JP-Ellis <[email protected]>
4a34f47
to
84fcdbb
Compare
I also realised I misunderstood the 'get_prev_interval' which returns that start of the current interval. So good to have improved test coverage. Signed-off-by: JP-Ellis <[email protected]>
I have updated the tests to ensure 100% test coverage. I did have to add to lines with For the coverage, would you be open to a PR adding integration with Codecov? This will help see coverage of PRs automatically, and it is free for OSS projects. You can see an example of how Codecov integrates within GitHub at: pact-foundation/pact-python#935 And you can follow links therein to see the more detailed coverage reports. |
Any further changes needed before this can be merged? |
In some countries (such as Australia), it is very common for wages to be paid on a fortnightly basis, that is, every 2 weeks. As a result, a number of other expenses are also paid on a fortnightly basis.
This commit extends the
Interval
enum by adding aFORTNIGHT
option. I have added a test for that, and have updated the translations where possible (not that other than for English and French, the other translations may be suboptimal).As part of this commit, I have also taken the opportunity to fix a confusion between ISO weeks and calendar weeks as the two do not always match, andEDIT: I have moved this into #1956.2025-W01
is the ISO format indicating the week starting on December 30 2024. Let me know if you want me to split out this particular change into a separate PR.Resolves: #1939