-
-
Notifications
You must be signed in to change notification settings - Fork 241
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
Add option to specify start of the week #240
Merged
Merged
Conversation
This file contains 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
Hi @pedrorivotti ! Thanks for this useful feature 🙏 We'll review it quickly. |
k4nar
reviewed
Jan 2, 2019
watson/cli.py
Outdated
# Add an offset to match the week beginning specified in the | ||
# configuration | ||
if param.name == "week": | ||
week_start = ctx.obj.config.get("options", "week_start") |
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.
Shouldn't we set a default as well?
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, @k4nar , well spotted!
k4nar
approved these changes
Jan 4, 2019
Thanks! |
jmaupetit
added a commit
that referenced
this pull request
Mar 25, 2019
Added: - New `add` command (#202) - Add lunar start time options to the `report` and `log` commands (#215) - Aggregate reports by day (#231) - Fish shell completion (#239) - Add support for first day of the week configuration in reports and logs (#240) - Python 3.7 support (#241) - Add `start --no-gap` and `stop --at` options (#254) Changed: - The `edit` command now checks data consistency (#203) - Current state saving is now improve when using Watson as a library (#214) - Prevent calling `get_start_time_for_period` multiple times (#219) Fixed: - Improved support for UTF-8 with Python 2 (#211) - Zsh completion for tags and projects with spaces in their names (#227) - Typos in commands output (#230, #235) - Project URL of the project in PyPI (#260) Removed: - Python 3.3 support (#210).
Merged
jmaupetit
added a commit
that referenced
this pull request
Mar 25, 2019
Added: - New `add` command (#202) - Add lunar start time options to the `report` and `log` commands (#215) - Aggregate reports by day (#231) - Fish shell completion (#239) - Add support for first day of the week configuration in reports and logs (#240) - Python 3.7 support (#241) - Add `start --no-gap` and `stop --at` options (#254) Changed: - The `edit` command now checks data consistency (#203) - Current state saving is now improve when using Watson as a library (#214) - Prevent calling `get_start_time_for_period` multiple times (#219) Fixed: - Improved support for UTF-8 with Python 2 (#211) - Zsh completion for tags and projects with spaces in their names (#227) - Typos in commands output (#230, #235) - Project URL of the project in PyPI (#260) Removed: - Python 3.3 support (#210).
jmaupetit
added a commit
that referenced
this pull request
Mar 25, 2019
Added: - New `add` command (#202) - Add lunar start time options to the `report` and `log` commands (#215) - Aggregate reports by day (#231) - Fish shell completion (#239) - Add support for first day of the week configuration in reports and logs (#240) - Python 3.7 support (#241) - Add `start --no-gap` and `stop --at` options (#254) Changed: - The `edit` command now checks data consistency (#203) - Current state saving is now improve when using Watson as a library (#214) - Prevent calling `get_start_time_for_period` multiple times (#219) Fixed: - Improved support for UTF-8 with Python 2 (#211) - Zsh completion for tags and projects with spaces in their names (#227) - Typos in commands output (#230, #235) - Project URL of the project in PyPI (#260) Removed: - Python 3.3 support (#210).
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.
This PR adds a configurable option,
options.week_start
, that allows specifying the start day of a week for reporting and logging purposes.This is useful for those who (like me) need to report weekly time based on a starting day other than Monday. Sunday would be the other common starting day, but I've added the option to specify any day of the week, for completeness.
I've included tests, and a short entry in the docs.
Open to suggestions, of course!