Skip to content
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

8.0 stable #388

Merged
merged 10 commits into from Dec 5, 2023
Merged

8.0 stable #388

merged 10 commits into from Dec 5, 2023

Conversation

Beardev118
Copy link
Contributor

@Beardev118 Beardev118 commented Nov 12, 2023

What does this PR do?

Copy link
Member

@keithdoggett keithdoggett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for submitting this @Beardev118. Like I mentioned in my comment the goal is to be able to compare objects directly and not attributes since that used to work, but isn't anymore. A good first step would be identifying which attributes are different from each other and we can then work towards identifying the issue.

Comment on lines 109 to 110
assert_equal factory.point(0, 0).x, obj.default_latlon.x
assert_equal factory.point(0, 0).y, obj.default_latlon.y
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the bigger issue we're trying to look at here is that we should be able to compare by rgeo objects and not their attributes.

assert_equal factory.point(0,0), obj.default_latlon

should work but it's not for some reason.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed this issue

Copy link
Member

@keithdoggett keithdoggett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch thanks for looking into that. We can now apply that to the other failing test too.

Comment on lines 125 to 127
area_p = MyPolygon.new(area)
obj_area_p = MyPolygon.new(object.area)
assert_equal area_p, obj_area_p
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also need to change this back to comparing area and object.area directly. We can remove the MyPolygon class as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

@Beardev118
Copy link
Contributor Author

Hello, Keith
Would you please tell me how can I test the failed cases in the local?
With current test code, I can't find the failed cases in the local

@keithdoggett
Copy link
Member

It's only failing on postgres 11. I assume it has something to do with not being able to cast the WKT for the default value to the proper SRID now that it's been changed to 3857.

Thinking about this more I think the solution is to change the SRID of that column back to 0 and instead modify the factory method in test_helper to accept an srid parameter.

def factory(srid: 3857)
      RGeo::Cartesian.preferred_factory(srid: srid)
end

And when we're comparing data to the default_latlon we do

      assert_equal factory(srid: 0).point(0, 0), obj.default_latlon

@keithdoggett
Copy link
Member

Should be a similar solution to the other test. Just make sure the factory we're generating features with is the same SRID of the column. Thanks!

@Beardev118
Copy link
Contributor Author

All workflow passed

image

@keithdoggett
Copy link
Member

Thanks @Beardev118 this looks good. Last question is any reason this is pointing to 8.0-stable rather than main?

@Beardev118
Copy link
Contributor Author

Beardev118 commented Dec 4, 2023 via email

@Beardev118 Beardev118 changed the base branch from 8.0-stable to master December 4, 2023 22:02
Copy link
Contributor Author

@Beardev118 Beardev118 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

@keithdoggett keithdoggett merged commit 86a6b34 into rgeo:master Dec 5, 2023
20 checks passed
@keithdoggett
Copy link
Member

Thank you! LGTM merging

@Beardev118
Copy link
Contributor Author

Beardev118 commented Dec 6, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants