-
Notifications
You must be signed in to change notification settings - Fork 908
Refactor LatLong and Datetime Primitives into Separate Files #1861
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
Refactor LatLong and Datetime Primitives into Separate Files #1861
Conversation
…om lat_long_transform.py
Issue#1855 split primitive 2
…o issue#1855-Split_Primitive
…o issue#1855-Split_Primitive
…_primitive; added all classes containing date and/or time functions to date_time_transform_primitive
|
@jacobboney Thank you for the submission. It looks like many tests are breaking, have you run |
@jacobboney @dvreed77 There is an issue with the latest version of pandas. We are going to need to restrict our max pandas version before most of these tests will pass. I'm working on a PR for that now. Once my PR gets merged, @jacobboney will need to update his fork with the latest changes from |
| from .date_time_transform_primitive import * | ||
| from .lat_long_transform_primitive import * |
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 we name this file different?
| from .date_time_transform_primitive import * | |
| from .lat_long_transform_primitive import * | |
| from .datetime_transform_primitives import * | |
| from .latlong_transform_primitives import * |
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.
Of course, I'll implement those name changes today.
|
@dvreed77 @thehomebrewnerd |
|
@jacobboney You will need to update your branch to get the latest from |
…_primitive; added all classes containing date and/or time functions to date_time_transform_primitive
|
The two tests that fail are: I looked at each test and am unsure what may be causing the failure. |
For the test The |
|
Sounds good, I'll look into the issue with first test then. Thank you for your input. |
thehomebrewnerd
left a comment
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.
Other than one minor comment regarding release notes wording, this looks fine to me. Let me know when you are ready to address the remaining failing serialization test, and I can help with getting that resolved.
docs/source/release_notes.rst
Outdated
| * Add DateToHoliday Transform Primitive (:pr:`1848`) | ||
| * Add DistanceToHoliday Transform Primitive (:pr:`1853`) | ||
| * Temporarily restrict pandas and koalas max versions (:pr:`1863`) | ||
| * Split date, time, latitude and longitude primitives into separate files (:pr:`1861`) |
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 is a very minor nitpick, but I'd probably say Split Datetime and LatLong primitives into separate files here to make it a little more clear we are talking about primitives that specifically operate on Datetime or LatLong column inputs. Not a big deal though.
|
Will do. I won't be able to get to those initial fixes until later in the evening. If that ends up being to late I will be available all day tomorrow to work on the final fix. |
|
The test_checks_primitives_correct_type issue seems to be resolved. I ran the tests again and there was no failure. |
@jacobboney Thanks for the update. Looks like you will need to resolve the merge conflicts in the release notes file before the full CI tests will run again. |
|
Alright, after some Git confusion on my part I think I've resolved the merge conflicts. |
|
@jacobboney. I uploaded a new test JSON file to S3 to allow your PR to pass. Can you make the following changes in your code: File: File: |
|
@dvreed77 Great, thank you. I'll make those changes this evening. |
|
I was able to make all of the changes, however, after running the tests, the features serializer test still failed. I found that the schema version also had to be updated in test_features_serializer. Unfortunately, there still seems to be an issue with koalas/pandas. The failures come from: All failures seem to be assertion errors. |
Codecov Report
@@ Coverage Diff @@
## main #1861 +/- ##
=======================================
Coverage 98.82% 98.82%
=======================================
Files 145 147 +2
Lines 16277 16290 +13
=======================================
+ Hits 16086 16099 +13
Misses 191 191
Continue to review full report at Codecov.
|
|
Well, after seeing that all tests passed I guess that means there must be some version issue on my side. Glad to see there are no more errors though. |
@jacobboney Not exactly sure what might be happening, but all of our CI tests pass with the latest code you pushed, so I think we are good now, unless the final reviews highlight anything else that needs to be updated. |
|
@thehomebrewnerd Not a problem at all. I was just looking for a issue in the code that wasn't there. It must be something on my end that I'll have to figure out. I'll just stay tuned then for any possible final changes. @dvreed77 @thehomebrewnerd @gsheni Thank you all very much for your guidance through this process. I greatly appreciate it. |
|
Congrats @jacobboney! Thanks for contribution! |
|
Great! Thank you! |
|
fixes #1855 |
Pull Request Description
Changes:
I decided to split all classes containing Lat/Long functions into their own file as well as classes containing date/time into their own file. In each file I also organized classes in alphabetical order. I don't believe there are any conflicts with the new files as I was able to run the tests.
Comments:
Whenever someone is able to review my changes I would also appreciate some input/advice on the testing. I am running them as described on Ubuntu. They run to the end but I do have some failed tests, not sure if this is due to my changes or if it is just part of the process.
As an aside I apologize for all of the unnecessary commits. I'm still getting the hang of it and understand now I may have gone overboard. Also, I accidentally deleted my original branch which is why I am submitting a second pull request.