[Django] #22632: Spatial backend tests uses hardcoded set of backends

9 views
Skip to first unread message

Django

unread,
May 16, 2014, 4:06:33 AM5/16/14
to django-...@googlegroups.com
#22632: Spatial backend tests uses hardcoded set of backends
-------------------------------+----------------------------------
Reporter: jtiai | Owner: nobody
Type: Uncategorized | Status: new
Component: GIS | Version: 1.6
Severity: Normal | Keywords: gis database testing
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+----------------------------------
In django.contrib.gis.tests.utils is hardcoded parts that spatial backend
must be located inside 'django.contrib.gis' and there are bunch of
hardcoded imports depending on selected backend.

This makes impossible to test any custom backend for GIS options.

--
Ticket URL: <https://code.djangoproject.com/ticket/22632>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
May 16, 2014, 4:56:43 AM5/16/14
to django-...@googlegroups.com
#22632: Spatial backend tests uses hardcoded set of backends
--------------------------------------+------------------------------------
Reporter: jtiai | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: GIS | Version: 1.6
Severity: Normal | Resolution:
Keywords: gis database testing | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by claudep):

* needs_better_patch: => 0
* stage: Unreviewed => Accepted
* type: Uncategorized => Cleanup/optimization
* needs_tests: => 0
* needs_docs: => 0


Comment:

You are referring to `has_spatial_db`, I suppose. You are right, however
it's a bit tricky because that utility is used many times during test
modules import time. We have to be careful not to have to load too much
things to determine if the backend is gis-enabled or not.

--
Ticket URL: <https://code.djangoproject.com/ticket/22632#comment:1>

Django

unread,
May 16, 2014, 7:16:09 AM5/16/14
to django-...@googlegroups.com
#22632: Spatial backend tests uses hardcoded set of backends
--------------------------------------+------------------------------------
Reporter: jtiai | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: GIS | Version: 1.6

Severity: Normal | Resolution:
Keywords: gis database testing | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by claudep):

One more thing, we should follow the work recently done to abstract the
backend name and concentrate on backend capabilities instead. See
c70a61eb49e4ed8f3b2a5011a7a5e6cda43c8598 and commits around it.

--
Ticket URL: <https://code.djangoproject.com/ticket/22632#comment:2>

Django

unread,
Aug 17, 2014, 2:23:25 PM8/17/14
to django-...@googlegroups.com
#22632: Spatial backend tests uses hardcoded set of backends
--------------------------------------+------------------------------------
Reporter: jtiai | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: gis database testing | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by claudep):

* has_patch: 0 => 1
* version: 1.6 => master


Comment:

In that pull request (https://github.com/django/django/pull/3080), I set
the base to use `connection.features` to test for various GIS features. As
a start and proof of concept, I got rid of `HAS_SPATIAL_DB`. Reviews
welcome.

--
Ticket URL: <https://code.djangoproject.com/ticket/22632#comment:3>

Django

unread,
Aug 19, 2014, 3:54:49 PM8/19/14
to django-...@googlegroups.com
#22632: Spatial backend tests uses hardcoded set of backends
--------------------------------------+------------------------------------
Reporter: jtiai | Owner: nobody

Type: Cleanup/optimization | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: gis database testing | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Claude Paroz <claude@…>):

In [changeset:"6295ea0027d808dcc309aa42cc58f6fdf172c3fc"]:
{{{
#!CommitTicketReference repository=""
revision="6295ea0027d808dcc309aa42cc58f6fdf172c3fc"
Replaced HAS_SPATIAL_DB by testing database feature

Refs #22632. This should be the base for using more database
features to exclude specific backends in GIS tests.
Thanks Tim Graham for the review.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/22632#comment:4>

Django

unread,
Aug 19, 2014, 3:55:56 PM8/19/14
to django-...@googlegroups.com
#22632: Spatial backend tests uses hardcoded set of backends
--------------------------------------+------------------------------------
Reporter: jtiai | Owner: nobody

Type: Cleanup/optimization | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: gis database testing | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by claudep):

Here's the next step: https://github.com/django/django/pull/3089

--
Ticket URL: <https://code.djangoproject.com/ticket/22632#comment:5>

Django

unread,
Aug 23, 2014, 9:45:50 AM8/23/14
to django-...@googlegroups.com
#22632: Spatial backend tests uses hardcoded set of backends
--------------------------------------+------------------------------------
Reporter: jtiai | Owner: nobody

Type: Cleanup/optimization | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: gis database testing | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Claude Paroz <claude@…>):

In [changeset:"a7d964ab87ad7352af3e33b8f3c12e4643a80f02"]:
{{{
#!CommitTicketReference repository=""
revision="a7d964ab87ad7352af3e33b8f3c12e4643a80f02"
Replaced no_spatialite by connection features

Refs #22632. Thanks Tim Graham for the review.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/22632#comment:6>

Django

unread,
Aug 23, 2014, 9:45:50 AM8/23/14
to django-...@googlegroups.com
#22632: Spatial backend tests uses hardcoded set of backends
--------------------------------------+------------------------------------
Reporter: jtiai | Owner: nobody

Type: Cleanup/optimization | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: gis database testing | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Claude Paroz <claude@…>):

In [changeset:"ba1d707b0f5666809b09bb8234f2df64bf0d7490"]:
{{{
#!CommitTicketReference repository=""
revision="ba1d707b0f5666809b09bb8234f2df64bf0d7490"
Replaced no_mysql by connection features

Refs #22632. Thanks Tim Graham for the review.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/22632#comment:7>

Django

unread,
Aug 23, 2014, 9:59:49 AM8/23/14
to django-...@googlegroups.com
#22632: Spatial backend tests uses hardcoded set of backends
--------------------------------------+------------------------------------
Reporter: jtiai | Owner: nobody

Type: Cleanup/optimization | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: gis database testing | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by claudep):

A few more here: https://github.com/django/django/pull/3109

Note that I'm not able to test those changes on Oracle GIS. If anyone has
this ability and some time to spent, feel free to help! I also won't able
to tackle the remaining `no_oracle` flags.

--
Ticket URL: <https://code.djangoproject.com/ticket/22632#comment:8>

Django

unread,
Aug 26, 2014, 2:10:49 PM8/26/14
to django-...@googlegroups.com
#22632: Spatial backend tests uses hardcoded set of backends
--------------------------------------+------------------------------------
Reporter: jtiai | Owner: nobody

Type: Cleanup/optimization | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: gis database testing | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Claude Paroz <claude@…>):

In [changeset:"60428ed5db76f509f4a0eb737d96b4f0ae6b0ad5"]:
{{{
#!CommitTicketReference repository=""
revision="60428ed5db76f509f4a0eb737d96b4f0ae6b0ad5"
Removed some more hardcoded backends in GIS tests

Refs #22632. Thanks Tim Graham for the review.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/22632#comment:9>

Django

unread,
Aug 26, 2014, 2:16:29 PM8/26/14
to django-...@googlegroups.com
#22632: Spatial backend tests uses hardcoded set of backends
--------------------------------------+------------------------------------
Reporter: jtiai | Owner: nobody
Type: Cleanup/optimization | Status: closed
Component: GIS | Version: master
Severity: Normal | Resolution: fixed

Keywords: gis database testing | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by claudep):

* status: new => closed
* resolution: => fixed


Comment:

I think that now about 90% of hardcoded references to backends have been
replaced by database features, which should allow custom backends to run
GIS tests. There is probably some work remaining, but I suggest now to
open individual tickets for such issues.

--
Ticket URL: <https://code.djangoproject.com/ticket/22632#comment:10>

Django

unread,
Sep 18, 2014, 7:30:35 AM9/18/14
to django-...@googlegroups.com
#22632: Spatial backend tests uses hardcoded set of backends
--------------------------------------+------------------------------------
Reporter: jtiai | Owner: nobody

Type: Cleanup/optimization | Status: closed
Component: GIS | Version: master
Severity: Normal | Resolution: fixed
Keywords: gis database testing | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"6c1a0581abd9cf21fa37c6c9e9937986da45005c"]:
{{{
#!CommitTicketReference repository=""
revision="6c1a0581abd9cf21fa37c6c9e9937986da45005c"
Added a feature flag for add_srs_entry support; refs #22632 and #23504.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/22632#comment:11>

Django

unread,
Sep 18, 2014, 7:35:54 AM9/18/14
to django-...@googlegroups.com
#22632: Spatial backend tests uses hardcoded set of backends
--------------------------------------+------------------------------------
Reporter: jtiai | Owner: nobody

Type: Cleanup/optimization | Status: closed
Component: GIS | Version: master
Severity: Normal | Resolution: fixed
Keywords: gis database testing | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"33e817a6d8b163aa6e8a2fb15d7269d1ecbbcf59"]:
{{{
#!CommitTicketReference repository=""
revision="33e817a6d8b163aa6e8a2fb15d7269d1ecbbcf59"
Added feature flag for geometry_field_introspection; refs #22632 and
#23504.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/22632#comment:12>

Reply all
Reply to author
Forward
0 new messages