[Python-modules-commits] [djangorestframework-gis] 01/02: Import djangorestframework-gis_0.11.2.orig.tar.gz

Michael Fladischer fladi at moszumanska.debian.org
Fri Nov 24 09:56:53 UTC 2017


This is an automated email from the git hooks/post-receive script.

fladi pushed a commit to branch upstream
in repository djangorestframework-gis.

commit 47e049e3ca8514bc2d5e1b20e98f6c74b1915c48
Author: Michael Fladischer <FladischerMichael at fladi.at>
Date:   Sun May 28 11:29:45 2017 +0200

    Import djangorestframework-gis_0.11.2.orig.tar.gz
---
 CHANGES.rst                                   |  6 +++
 PKG-INFO                                      |  2 +-
 README.rst                                    | 53 ++++++++++++++++++++++-----
 djangorestframework_gis.egg-info/PKG-INFO     |  2 +-
 djangorestframework_gis.egg-info/SOURCES.txt  |  1 -
 rest_framework_gis/__init__.py                |  2 +-
 rest_framework_gis/filters.py                 |  4 ++
 setup.cfg                                     |  1 +
 setup.py                                      |  2 +-
 tests/__init__.py                             |  0
 tests/django_restframework_gis_tests/tests.py | 12 ++++--
 11 files changed, 66 insertions(+), 19 deletions(-)

diff --git a/CHANGES.rst b/CHANGES.rst
index bac9d78..9517527 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -1,6 +1,12 @@
 Changelog
 =========
 
+Version 0.11.2 [2017-05-22]
+---------------------------
+
+- `eb54fc0 <https://github.com/djangonauts/django-rest-framework-gis/commit/eb54fc0>`_: ``GeometryFilter`` now use ``BaseGeometryWidget``
+- `33a6418 <https://github.com/djangonauts/django-rest-framework-gis/commit/33a6418>`_: fixed tests for Django 1.11: ``Point`` comparison uses ``srid``
+
 Version 0.11.1 [2017-05-05]
 ---------------------------
 
diff --git a/PKG-INFO b/PKG-INFO
index 0446e21..499a111 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: djangorestframework-gis
-Version: 0.11.1
+Version: 0.11.2
 Summary: Geographic add-ons for Django Rest Framework
 Home-page: https://github.com/djangonauts/django-rest-framework-gis
 Author: Douglas Meehan
diff --git a/README.rst b/README.rst
index 1df495d..71010cd 100644
--- a/README.rst
+++ b/README.rst
@@ -39,7 +39,7 @@ Compatibility with DRF, Django and Python
 
 ===============  ============================ ==================== ==================================
 DRF-gis version  DRF version                  Django version       Python version
-**0.11.x**       **3.1** to **3.6**           **1.7** to **1.10**  **2.7** to **3.5**
+**0.11.x**       **3.1** to **3.6**           **1.7** to **1.11**  **2.7** to **3.6**
 **0.10.x**       **3.1** to **3.3**           **1.7** to **1.9**   **2.7** to **3.5**
 **0.9.6**        **3.1** to **3.2**           **1.5** to **1.8**   **2.6** to **3.5**
 **0.9.5**        **3.1** to **3.2**           **1.5** to **1.8**   **2.6** to **3.4**
@@ -574,25 +574,29 @@ Projects using this package
 Running the tests
 -----------------
 
-Assuming one has the dependencies installed (restframework and
-restframework\_gis), and one of the `Spatial Database server supported
-by
-GeoDjango <https://docs.djangoproject.com/en/dev/ref/contrib/gis/db-api/#module-django.contrib.gis.db.backends>`__
-is up and running:
+Required setup
+==============
+
+You need one of the `Spatial Database servers supported by
+GeoDjango <https://docs.djangoproject.com/en/dev/ref/contrib/gis/db-api/#module-django.contrib.gis.db.backends>`__,
+and create a database for the tests.
+
+The following can be used with PostgreSQL:
 
 .. code-block:: bash
 
-    ./runtests.py
+  createdb django_restframework_gis
+  psql -U postgres -d django_restframework_gis -c "CREATE EXTENSION postgis"
 
 You might need to tweak the DB settings according to your DB
 configuration. You can copy the file ``local_settings.example.py`` to
 ``local_settings.py`` and change the ``DATABASES`` and/or
 ``INSTALLED_APPS`` directives there.
 
-If you want to contribute you need to install the test app in a proper
-development environment.
+This should allow you to run the tests already.
 
-These steps should do the trick:
+For reference, the following steps will setup a development environment for
+contributing to the project:
 
 -  create a spatial database named "django\_restframework\_gis"
 -  create ``local_settings.py``, eg:
@@ -606,6 +610,35 @@ These steps should do the trick:
 -  run ``python manage.py collectstatic``
 -  run ``python manage.py runserver``
 
+Using tox
+=========
+
+The recommended way to run the tests is by using
+`tox <https://tox.readthedocs.io/en/latest/>`__, which can be installed using
+`pip install tox`.
+
+You can use ``tox -l`` to list the available environments, and then e.g. use
+the following to run all tests with Python 3.6 and Django 1.11:
+
+.. code-block:: bash
+
+    tox -e py36-django111
+
+By default Django's test runner is used, but there is a variation of tox's
+envlist to use pytest (using the ``-pytest`` suffix).
+
+You can pass optional arguments to the test runner like this:
+
+.. code-block:: bash
+
+    tox -e py36-django111-pytest -- -k test_foo
+
+Running tests manually
+======================
+
+Please refer to the ``tox.ini`` file for reference/help in case you want to run
+tests manually / without tox.
+
 Contributing
 ------------
 
diff --git a/djangorestframework_gis.egg-info/PKG-INFO b/djangorestframework_gis.egg-info/PKG-INFO
index 0446e21..499a111 100644
--- a/djangorestframework_gis.egg-info/PKG-INFO
+++ b/djangorestframework_gis.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: djangorestframework-gis
-Version: 0.11.1
+Version: 0.11.2
 Summary: Geographic add-ons for Django Rest Framework
 Home-page: https://github.com/djangonauts/django-rest-framework-gis
 Author: Douglas Meehan
diff --git a/djangorestframework_gis.egg-info/SOURCES.txt b/djangorestframework_gis.egg-info/SOURCES.txt
index a7b2981..dcb4748 100644
--- a/djangorestframework_gis.egg-info/SOURCES.txt
+++ b/djangorestframework_gis.egg-info/SOURCES.txt
@@ -20,7 +20,6 @@ rest_framework_gis/filterset.py
 rest_framework_gis/pagination.py
 rest_framework_gis/serializers.py
 rest_framework_gis/tilenames.py
-tests/__init__.py
 tests/local_settings.example.py
 tests/local_settings.py
 tests/manage.py
diff --git a/rest_framework_gis/__init__.py b/rest_framework_gis/__init__.py
index e3672e9..8040329 100644
--- a/rest_framework_gis/__init__.py
+++ b/rest_framework_gis/__init__.py
@@ -1,4 +1,4 @@
-VERSION = (0, 11, 1, 'final')
+VERSION = (0, 11, 2, 'final')
 __version__ = VERSION  # alias
 
 
diff --git a/rest_framework_gis/filters.py b/rest_framework_gis/filters.py
index a20a363..8b27d38 100644
--- a/rest_framework_gis/filters.py
+++ b/rest_framework_gis/filters.py
@@ -75,6 +75,10 @@ InBBOXFilter = InBBoxFilter
 class GeometryFilter(django_filters.Filter):
     field_class = forms.GeometryField
 
+    def __init__(self, *args, **kwargs):
+        kwargs.setdefault('widget', forms.BaseGeometryWidget)
+        super(GeometryFilter, self).__init__(*args, **kwargs)
+
 
 class GeoFilterSet(django_filters.FilterSet):
     GEOFILTER_FOR_DBFIELD_DEFAULTS = {
diff --git a/setup.cfg b/setup.cfg
index adf5ed7..2b08435 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -3,5 +3,6 @@ universal = 1
 
 [egg_info]
 tag_build = 
+tag_svn_revision = 0
 tag_date = 0
 
diff --git a/setup.py b/setup.py
index 9bf5f76..1b127a0 100644
--- a/setup.py
+++ b/setup.py
@@ -22,7 +22,7 @@ def get_install_requires():
 if sys.argv[-1] == 'publish':
     os.system("python setup.py sdist bdist_wheel")
     os.system("twine upload -s dist/*")
-    os.system("rm -rf dist")
+    os.system("rm -rf dist build")
     args = {'version': get_version()}
     print("You probably want to also tag the version now:")
     print("  git tag -a %(version)s -m 'version %(version)s'" % args)
diff --git a/tests/__init__.py b/tests/__init__.py
deleted file mode 100644
index e69de29..0000000
diff --git a/tests/django_restframework_gis_tests/tests.py b/tests/django_restframework_gis_tests/tests.py
index 4708071..fdf6076 100644
--- a/tests/django_restframework_gis_tests/tests.py
+++ b/tests/django_restframework_gis_tests/tests.py
@@ -487,7 +487,8 @@ class TestRestFrameworkGis(TestCase):
         self.assertEqual(response.status_code, 200)
         location_reloaded = Location.objects.get(pk=location.id)
         self.assertEquals(location_reloaded.name, 'geojson successful patch test')
-        self.assertEquals(location_reloaded.geometry, Point(10.1, 10.1))
+        self.assertEquals(location_reloaded.geometry,
+                          Point(10.1, 10.1, srid=location.geometry.srid))
 
     def test_patch_geojson_location_wo_changing_geometry(self):
         location = Location.objects.create(name='geojson patch test', geometry='POINT (135.0 45.0)')
@@ -501,13 +502,15 @@ class TestRestFrameworkGis(TestCase):
         self.assertEqual(response.status_code, 200)
         location_reloaded = Location.objects.get(pk=location.id)
         self.assertEquals(location_reloaded.name, 'geojson successful patch test')
-        self.assertEquals(location_reloaded.geometry, Point(135.0, 45.0))
+        self.assertEquals(location_reloaded.geometry,
+                          Point(135.0, 45.0, srid=location.geometry.srid))
 
     def test_geometry_serializer_method_field(self):
         location = Location.objects.create(name='geometry serializer method test', geometry='POINT (135.0 45.0)')
         location_loaded = Location.objects.get(pk=location.id)
         self.assertEqual(location_loaded.name, 'geometry serializer method test')
-        self.assertEqual(location_loaded.geometry, Point(135.0, 45.0))
+        self.assertEqual(location_loaded.geometry,
+                         Point(135.0, 45.0, srid=location.geometry.srid))
         url = reverse('api_geojson_location_details_hidden', args=[location.id])
         data = {
             "properties": {
@@ -523,7 +526,8 @@ class TestRestFrameworkGis(TestCase):
     def test_geometry_serializer_method_field_none(self):
         location = Location.objects.create(name='None value', geometry='POINT (135.0 45.0)')
         location_loaded = Location.objects.get(pk=location.id)
-        self.assertEqual(location_loaded.geometry, Point(135.0, 45.0))
+        self.assertEqual(location_loaded.geometry,
+                         Point(135.0, 45.0, srid=location.geometry.srid))
         url = reverse('api_geojson_location_details_none', args=[location.id])
         response = self.client.generic('GET', url, content_type='application/json')
         self.assertEqual(response.status_code, 200)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/djangorestframework-gis.git



More information about the Python-modules-commits mailing list