-
Notifications
You must be signed in to change notification settings - Fork 273
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
WIP: Add drf-gis fields #38
Conversation
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.
@jayvdb thank you very much for contributing this. have a look at the comments. lets try to reevaluate after those changes but it looks already very promising i think.
assert schema['components']['schemas']['X']['properties']['hash']['format'] == 'byte' | ||
|
||
|
||
def test_serializer_field_extension_geo(no_warnings): |
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.
please move contib tests to tests/contib/PACKAGE_NAME
also would like to see a full schema test for that. have a look at test_oauth_toolkit for reference. makes it easier to inspect that the generated schema look reasonable.
target_class = 'rest_framework_gis.fields.GeometryField' | ||
|
||
def map_serializer_field(self, auto_schema): | ||
return { |
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.
use component as discussed here: #31 (comment)
|
||
def map_serializer_field(self, auto_schema): | ||
return { | ||
'oneOf': [ |
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.
same here i guess
'type': { | ||
'description': 'The type of the geos instance', | ||
'type': 'string', | ||
'enum': ['Feature'], |
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.
I think this should be 'FeatureCollection'
323020f
to
3a7823c
Compare
Codecov Report
@@ Coverage Diff @@
## master #38 +/- ##
==========================================
+ Coverage 96.79% 96.85% +0.05%
==========================================
Files 38 39 +1
Lines 2496 2541 +45
==========================================
+ Hits 2416 2461 +45
Misses 80 80
Continue to review full report at Codecov.
|
1f611b3
to
2a42819
Compare
hey @jayvdb i can't really tell the difference between the last force pushes. what changed? could you do the remaining change requests so we can wrap this up? thanks |
Xenial results in libgdal.so: undefined symbol: OGR_F_GetFieldAsInteger64 Related to tfranzel#31
The pushes are me rebasing my WIP to stay on top of changes to master. |
This is blocked by #130 , as it uses |
Note that openwisp/django-rest-framework-gis#223 is now progressing, and provides the appropriate basis for this PR. Please close #67 and let me finish my own PR, rather than merging incomplete PRs like you did with #125. That is basic respect for people contributing to your project. |
that is good to hear! as a matter of fact i have updated (but not yet pushed) my adaptation in #67 a few days ago. I will happily close it if your/their new approach is better, which i believe it will be. in the meantime i will not continue working on #67 regarding #125: i took the liberty of completing your PR because it was stale for months with pending change requests. you indicated that you were too out-of-sync, lacking time, and basically moved on. i decided it was better for the project to finish it myself instead of not having it at all. imho waiting 3 months for a follow-up is hardly disrespecting your contribution. |
Out of sync is regarding ability to test your patches against my real systems. It has nothing to do with my ability to complete PRs. regarding #125: it was stale because it was waiting for you to finish a solution to #101 - you already cookie licked that one. You never gave a reply to #125 (comment) , which was the last exchange there. So who was "waiting 3 months for a follow-up" ? |
fair enough. i'm sorry that the open question fell off my radar. i invested more time in doing a detailed review of #125 (as requested) than actually completing the PR, which seems like quite an inefficient cookie licking tactic. you are of course entitled to your opinion, but i will no longer respond to accusational or passive aggressive comments. |
openwisp/django-rest-framework-gis#223 merged and released. |
What else needs to happen to get this landed? I'd really like to see support for this. |
I think there were a few things in that PR which were deferred to later, and I havent been tracking this closely. I'll get this rebased next week, and work out the current status of bits outstanding. |
it looks to me that they went with the official recommendation of patching The core question is whether we can extract their spec from their if we were able to use their implementation, the code in this PR is pretty much obsolete. The likely outcome would be to use @jayvdb thanks for picking this up again. |
I'm going to take a quick look this week, to get a plan in place, but I'll be more focused on Django in a few weeks when I can devote some serious time to it, and likely get some patches into drf-gis building on top of what they have done. |
@tfranzel Yeah, that recommendation is quite silly. I had tried to make a change where drf-gis would inherit from |
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.
would be really a great addition! can the review comments be adressed?
this PR got superseded by #746. discussion&feedback continues there. |
Closes #31