-
-
Notifications
You must be signed in to change notification settings - Fork 411
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
Added timestamps in crontab.py(#928) #930
Conversation
Thank you for working on this issue, it seems that all tests are passing but linting. |
Codecov Report
@@ Coverage Diff @@
## master #930 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 37 37
Lines 2342 2343 +1
=====================================
+ Hits 2342 2343 +1
Continue to review full report at Codecov.
|
@FabioRosado done that. |
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 doing this! Have a couple of questions.
Co-Authored-By: Jacob Tomlinson <jacobtomlinson@users.noreply.github.com>
Welcome to open source, it's awesome to have you here 🎉! This kind of code review is pretty standard for open source contribution. Please don't be put off by the questioning, it's not a criticism, I'm just keen to understand why you have made these decisions. Particularly I'm keen to understand the difference between :
We should aim to add the least code possible to meet the requirement. Do the nested calls add value? I can imagine that localtime might help us with timezones. As for the original message, that's probably my fault for not being clear in the issue. I would like to keep the original message and also add the time to it. |
@jacobtomlinson you are right I should probably not simply have done what I always do with time, thank you for the correction. Anyways, after reading in the API I have committed and pushed a new version - I do not think we need the format, though - at least when I try it it does not change the result. |
I believe Jacob was just asking if there was a difference between the different ways to show up time, but since you tested it out and there was no different from the output I'd say this way is much easier to read 😄 Using format on the logger would have caused a linting failure since I did that on my previous PR and it failed haha I am not sure if you tried this but if you change the Logging line from:
to
Will it work exactly the same as well? I'm asking this since we have been using the above way to format the logging throughout the codebase. Also, the test that failed doesn't have anything to do with your code so don't worry about it since the changes that you did with this PR are all green and passing 😄 👍 |
@FabioRosado I did just now test your other suggestion - to be honest I used a print for testing but this should not matter in this case - for some reason, if I use your suggestion I get:
So - I really wonder, I guess you do not really want the %s in the text - why does this not happen in the rest of the logging? Or does it? Uhm..........can you answer my pull request? I know it seems childish but I am kinda excited to be contributor to some project. |
I am going to assume that the issue is how the print is working, since I just tested it on my end and this is what I get: But I've also noticed an issue with my suggestion, that line needs to be: and perhaps add a separator between the end of the sentence and the It's understandable that you want to get your first PR merged, this looks really good and we are very happy for you to take the time in contributing to the project 😄 👍 We need to try and fix appveyor and then we are able to merge this PR into core 👍 |
I agree with @FabioRosado that it should be I don't think the AppVeyor failures are related to this,. |
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.
Here is a change suggestion based on @FabioRosado's suggestion. I'm just going to suggest you make this change so we can get this over the line.
Co-Authored-By: Jacob Tomlinson <jacobtomlinson@users.noreply.github.com>
@anweber111 thank you for updating this PR again. Jacob has fixed the issue we where getting on appveyor so as soon as the tests pass after I updated this branch we are ready to have this PR merged into the core. This is amazing work and will help us when trying to debug things so thank you again for working on this 👍 Also, we send stickers to new contributors so feel free to send your home address by DM to opsdroid twitter account. I hope you enjoyed your first contribution and hope to see you again in this Project 😄 |
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes #928
Status
READY | UNDER DEVELOPMENT | ON HOLD
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.
Checklist: