-
Notifications
You must be signed in to change notification settings - Fork 12
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
Start year flexibility #167
Start year flexibility #167
Conversation
Hello @RhysMacMillan! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2024-08-13 19:40:04 UTC |
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.
Great start @RhysMacMillan, a couple of suggestions to help improve this PR! I like that you've given the year a variable, and by making the default value the same as the previous you avoided needing to alter the tests (smart).
- Totally cool to start with updating the year assumption in the scripts, I think we can make this PR a little bit bigger. Either find the rest of the 1965 assumptions, or change the rest of the hard coded variables you've identified in
dataframe_analysis
. - In the ARFC repos we have a bot that comes in and checks for style in Python code. It's based on PEP 8 (Python Enhancement Proposal number 8, which is the official style guide for python that we use). Whenever we make a PR, the bot will review the code changes to ensure the resulting files still comply with the style guide. In this case, the bot has identified two places where you've mixed spaces and tabs. Here's what PEP8 says should be done with indentation; check it out, and push some commits from your clone to your fork.
- I suggested expanding your variable
s_y
tostart_year
. I could be convinced thaty0
is better, but I think thats_y
doesn't convey enough information to people. This is totally a preference thing, and is kind of nitpicky. On my suggestions, you'll see the option toAdd to batch
, which you can do and then commit them all at once, or you can change it to y0 if you like that better and ignore my suggestions! - When there is an associated issue with your PR, you should always reference that PR in your comment. If your PR totally addresses the issue, than you can use a keyword (I think I've sent you this link before) to tell GitHub to close the Issue when the PR is merged. In this case, you are not totally addressing the issue, so you should say something to the effect of "This PR addresses part of # 60" (don't put the space after the #, I did that so my comment wouldn't link the PR and the Issue).
Thank you for the feedback @nsryan2. I couldn't decide between |
Ok! Yeah, I think y0 is better than s_y. You can make changes by making changes on your clone and then pushing them to the Edit: I have updated my suggestions to say y0 instead of start_year. https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/incorporating-feedback-in-your-pull-request |
… the 'sum_and_add_missing_time' function.
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.
This looks fine to me.
@RhysMacMillan are you still adding changes to this PR? You mentioned some other assumptions above but I'm not sure if you've done all the ones you wanted to do. Otherwise, it looks good to me |
Yes @nsryan2 I have one last change for the start year assumption. In |
This would be a great thing to mention in #162! If you make a note of that change as a comment in that issue, I think that would be good. If that's the case, I'll merge this PR. Thanks for the contribution! |
This PR adds the ability for users to choose their own first year for data frame columns. The year 1965 occurs as an arbitrary start year throughout the scripts folder, and this change allows more flexibility for the user.
Edit: This PR addresses part of issue #60, specifically the hard coded variables in
dataframe_analysis_changes