Skip to content

Commit f743b1c

Browse files
committed
1.0.0 release
1 parent f2dc812 commit f743b1c

File tree

9 files changed

+42
-19
lines changed

9 files changed

+42
-19
lines changed

.github/workflows/ci.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ jobs:
9090
run: |
9191
pip install -U pip wheel setuptools
9292
pip install -U -r requirements-test.txt
93-
pip install tox docutils pygments
93+
pip install tox docutils pygments twine
9494
9595
- name: QA checks
9696
run: |
@@ -99,7 +99,6 @@ jobs:
9999
- name: Tests
100100
run: |
101101
tox -e ${{ matrix.env.TOXENV }}
102-
python setup.py check -r -s
103102
env:
104103
POSTGRES_HOST: localhost
105104

CHANGES.rst

+15
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
11
Changelog
22
=========
33

4+
Version 1.0.0 [2022-05-09]
5+
--------------------------
6+
7+
Features
8+
~~~~~~~~
9+
10+
- Added support Bounding Box to ``GeometryField`` via the ``auto_bbox``
11+
initialization argument
12+
13+
Bugfixes
14+
~~~~~~~~
15+
16+
- Avoid ``default_app_config`` Deprecation Warning in Django >= 3.2
17+
- Fixed deserialization of the ``id_field``
18+
419
Version 0.18.0 [2022-01-07]
520
---------------------------
621

README.rst

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ Compatibility with DRF, Django and Python
3939

4040
======================== ============================ ==================== ==================================
4141
DRF-gis version DRF version Django version Python version
42+
**1.0.x** **3.10** up to **3.13** **2.2 to 4.0** **3.6** to **3.9**
4243
**0.18.x** **3.10** up to **3.13** **2.2 to 4.0** **3.6** to **3.9**
4344
**0.17.x** **3.10** up to **3.12** **2.2 to 3.1** **3.6** to **3.8**
4445
**0.16.x** **3.10** **2.2 to 3.1** **3.6** to **3.8**

requirements-test.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ psycopg2~=2.8.0
22
django-filter>=2.0
33
contexttimer
44
# QA checks
5-
openwisp-utils[qa]~=0.7.0
5+
openwisp-utils[qa]~=1.0.0
66
packaging~=20.4

rest_framework_gis/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION = (0, 18, 0, 'final')
1+
VERSION = (1, 0, 0, 'final')
22
__version__ = VERSION # alias
33

44

setup.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@
5555
],
5656
project_urls={
5757
'Bug Reports': 'https://github.com/openwisp/django-rest-framework-gis/issues',
58-
'Continuous Integration': 'https://travis-ci.org/openwisp/django-rest-framework-gis',
58+
'Continuous Integration': (
59+
'https://github.com/openwisp/django-rest-framework-gis/actions?'
60+
'query=workflow%3A%22Django+Rest+Framework+Gis+CI+Build%22'
61+
),
5962
'Mailing List': 'https://groups.google.com/forum/#!forum/django-rest-framework-gis',
6063
'Code Coverage': 'https://coveralls.io/github/openwisp/django-rest-framework-gis',
6164
'Source Code': 'https://github.com/openwisp/django-rest-framework-gis',

tests/django_restframework_gis_tests/serializers.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343

4444

4545
class LocationGeoSerializer(serializers.ModelSerializer):
46-
""" location geo serializer """
46+
"""location geo serializer"""
4747

4848
details = serializers.HyperlinkedIdentityField(view_name='api_location_details')
4949

@@ -59,7 +59,7 @@ class PaginatedLocationGeoSerializer(pagination.PageNumberPagination):
5959

6060

6161
class LocationGeoFeatureSerializer(gis_serializers.GeoFeatureModelSerializer):
62-
""" location geo serializer """
62+
"""location geo serializer"""
6363

6464
details = serializers.HyperlinkedIdentityField(
6565
view_name='api_geojson_location_details'
@@ -76,7 +76,7 @@ class Meta:
7676

7777

7878
class LocationGeoFeatureSlugSerializer(LocationGeoFeatureSerializer):
79-
""" use slug as id attribute """
79+
"""use slug as id attribute"""
8080

8181
class Meta:
8282
model = Location
@@ -86,7 +86,7 @@ class Meta:
8686

8787

8888
class LocationGeoFeatureFalseIdSerializer(LocationGeoFeatureSerializer):
89-
""" id attribute set as False """
89+
"""id attribute set as False"""
9090

9191
class Meta:
9292
model = Location
@@ -108,7 +108,7 @@ class Meta:
108108

109109

110110
class LocationGeoFeatureWritableIdSerializer(LocationGeoFeatureSerializer):
111-
""" default id attribute """
111+
"""default id attribute"""
112112

113113
class Meta:
114114
model = Location
@@ -119,7 +119,7 @@ class Meta:
119119

120120

121121
class LocatedFileGeoFeatureSerializer(gis_serializers.GeoFeatureModelSerializer):
122-
""" located file geo serializer """
122+
"""located file geo serializer"""
123123

124124
details = serializers.HyperlinkedIdentityField(
125125
view_name='api_geojson_located_file_details'
@@ -137,7 +137,7 @@ class Meta:
137137

138138

139139
class BoxedLocationGeoFeatureSerializer(gis_serializers.GeoFeatureModelSerializer):
140-
""" location geo serializer """
140+
"""location geo serializer"""
141141

142142
details = serializers.HyperlinkedIdentityField(
143143
view_name='api_geojson_boxedlocation_details'

tests/django_restframework_gis_tests/test_performance.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class TestRestFrameworkGisPerformance(TestCase):
2222
NUMBER_OF_LOCATIONS = 10000
2323

2424
def _create_data(self):
25-
""" creates a bunch of gis models instances """
25+
"""creates a bunch of gis models instances"""
2626
locations = []
2727
name = 'l{0}'
2828
slug = 'l{0}'

tests/django_restframework_gis_tests/tests.py

+11-6
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def test_post_location_list_geojson(self):
106106
self.assertEqual(Location.objects.count(), 2)
107107

108108
def test_post_location_list_geojson_as_multipartformdata(self):
109-
""" emulate sending geojson string in webform """
109+
"""emulate sending geojson string in webform"""
110110
self.assertEqual(Location.objects.count(), 0)
111111
data = {
112112
"name": "geojson input test",
@@ -278,7 +278,7 @@ def test_post_location_list_invalid_geojson(self):
278278
self.assertEqual(response.data['geometry'][0], self.gdal_error_message)
279279

280280
def test_geojson_format(self):
281-
""" test geojson format """
281+
"""test geojson format"""
282282
location = Location.objects.create(
283283
name='geojson test', geometry='POINT (135.0 45.0)'
284284
)
@@ -339,7 +339,9 @@ def test_post_geojson_id_attribute(self):
339339
}
340340
url = reverse('api_geojson_location_writable_id_list')
341341
response = self.client.post(
342-
url, data=json.dumps(data), content_type='application/json',
342+
url,
343+
data=json.dumps(data),
344+
content_type='application/json',
343345
)
344346
self.assertEqual(response.status_code, 201)
345347
self.assertEqual(Location.objects.count(), 1)
@@ -489,7 +491,7 @@ def test_geofeatured_model_serializer_compatible_with_geomodel_serializer(self):
489491
self.assertEqual(Location.objects.count(), 1)
490492

491493
def test_geofeatured_model_post_as_multipartformdata(self):
492-
""" emulate sending geojson string in webform """
494+
"""emulate sending geojson string in webform"""
493495
self.assertEqual(Location.objects.count(), 0)
494496
data = {
495497
"name": "geojson input test",
@@ -716,14 +718,17 @@ def test_geojson_pagination(self):
716718
def test_pickle(self):
717719
geometry = GEOSGeometry('POINT (30 10)')
718720
geojsondict = GeoJsonDict(
719-
(('type', geometry.geom_type), ('coordinates', geometry.coords),)
721+
(
722+
('type', geometry.geom_type),
723+
('coordinates', geometry.coords),
724+
)
720725
)
721726
pickled = pickle.dumps(geojsondict)
722727
restored = pickle.loads(pickled)
723728
self.assertEqual(restored, geojsondict)
724729

725730
def test_geometrycollection_geojson(self):
726-
""" test geometry collection geojson behaviour """
731+
"""test geometry collection geojson behaviour"""
727732
location = Location.objects.create(
728733
name='geometry collection geojson test',
729734
geometry='GEOMETRYCOLLECTION ('

0 commit comments

Comments
 (0)