~qeef/damn-server

ref: 4506336eac532c83cf2bd3328fc9207b8bcdb924 damn-server/CHANGELOG.rst -rw-r--r-- 10.7 KiB
4506336eJiri Vlasak Update area priority documentation 1 year, 2 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
Changelog
=========

All notable changes to this project will be documented in this file.

The format is based on `Keep a Changelog`_ and this project adheres to
`Semantic Versioning`_.

.. _Keep a Changelog: http://keepachangelog.com/
.. _Semantic Versioning: http://semver.org/


Unreleased
==========

Added
-----

- ``author`` to ``GET`` area(s) endpoints.
- ``map oldest`` and ``review oldest`` commit types for area commit ``POST``
  endpoint.

Changed
-------

- Store author of an area.
- Improve SQL queries.


0.14.2 - 2021-05-04
===================

Added
-----

- Load testing: locust.io file.
- Isolation of database transactions.


0.14.1 - 2021-03-28
===================

Added
-----

- Wall brick area grid shape.


0.14.0 - 2021-03-07
===================

Added
-----

- Diamond, flat hexagon, and pointy hexagon area grid shapes.

Changed
-------

- Use ``st_divide`` pgsql function of the damn deploy.


0.13.4 - 2021-03-07
===================

Changed
-------

- Refactor merging squares.
- Refactor get area commits todo -- do not limit for commit type, return only
  the square's last commit.


0.13.3 - 2021-03-07
===================

Changed
-------

- Get area commits todo replaces get area commits that are distinct. Moreover,
  only commits with squares to map, to review, locked, or done are returned.


0.13.2 - 2021-03-07
===================

Fixed
-----

- Reset shape, ssw, ssh when area already divided.


0.13.1 - 2021-03-07
===================

Added
-----

- ``that_area_distinct`` for GET list of areas commits.

Fixed
-----

- Non-returning exception for merging of squeres of different areas.


0.13.0 - 2021-02-28
===================

Added
-----

- `CreateArea`, `UpdateArea`, `Area`, `ThinArea`, and `User` pydantic models.
- `Token` and `Good` pydantic model.
- Squares of the area endpoint.
- Areas' geometries endpoint.
- `Square` pydantic model.

Changed
-------

- Check for argument types for (some of) area/user procedures.
- List of thin areas refactored.
- User refactored.
- Authorization refactored.
- Load, create, and update area refactored.
- Area/user commits refactored.
- New commit to an area refactored. These changes are NOT backward compatible
  so the update of clients is necessary. See `API docs`_ for more information.
- The version of the API.

.. _API docs: https://server.damn-project.org/docs

Fixed
-----

- Unit and integration tests. (Because of backward incompatibility of API.)

Removed
-------

- ``GET /area/{aid}/stats`` endpoint and related procedures.
- ``POST /area/{aid}/square/{sid}/commits`` endpoint, related procedures and
  model (`SquareCommit`.)


0.12.0 - 2021-01-13
===================

Changed
-------

- Update requirements.

Deprecated
----------

- ``GET /area/{aid}/stats`` endpoint.
- ``POST /area/{aid}/square/{sid}/commits`` endpoint.
- `MapOrReviewArea` model (used for ``POST /area/{aid}/commits`` endpoint.)


0.11.5 - 2021-01-11
===================

Fixed
-----

- Unlock user's locked squares.


0.11.4 - 2020-12-18
===================

Changed
-------

- Get language from the settings of the OpenStreetMap server.


0.11.3 - 2020-12-13
===================

Changed
-------

- If GeoJSON FeatureCollection for creating new area has *name* member
  or if the first Feature of the collection has *property* member with
  *name* member, it is presumed there are squares already and the
  FeatureCollection will not be divided to multiple squares.


0.11.2 - 2020-12-12
===================

Fixed
-----

- Use message for splitted square if exists


0.11.1 - 2020-12-12
===================

Fixed
-----

- Manually lock square twice.


0.11.0 - 2020-12-12
===================

Added
-----

- Map and review the nearest square (to recent mine) locking policy.
- Review newbie's square locking policy.


0.10.2 - 2020-12-09
===================

Fixed
-----

- Allow feature collections with different geometry than *Polygon* for creating
  areas.


0.10.1 - 2020-12-08
===================

Fixed
-----

- Gitlab CI/CD.


0.10.0 - 2020-12-08
===================

Added
-----

- Custom square size when creating area.


0.9.3 - 2020-12-05
==================

Fixed
-----

- Integration test. (API for *splitted* square changed returning *square*
  instead of list of commits.)


0.9.2 - 2020-12-05
==================

Fixed
-----

- Split square endpoint return the splitted square, not the list of commits.


0.9.1 - 2020-12-01
==================

Fixed
-----

- Area stats.


0.9.0 - 2020-12-01
==================

Added
-----

- Merge locked squares.

Fixed
-----

- The `/area/AID/stats` endpoint currently returns `aid`, `stats`, and
  `squares` where `squares` is a list of objects containing `sid` and `border`.

  **NOTE:** This fix introduces incompatibily with the previous version where
  `aid` was returned for each square, too.


0.8.0 - 2020-11-29
==================

Added
-----

- Lock square manually. (Receive commit with ``locked`` type.) Return square
  (``aid``, ``sid``, and ``border``) when locked manually.


0.7.3 - 2020-11-29
==================

Fixed
-----

- SQL quaries to use [Prepared Statements][].

[Prepared Statements]: https://magicstack.github.io/asyncpg/devel/api/index.html#prepared-statements


0.7.2 - 2020-11-21
==================

Fixed
-----

- Multi-process issue when authenticating.


0.7.1 - 2020-11-14
==================

Fixed
-----

- ``DAMN_SERVER`` config constant. (Now it must be created from the
  ``SERVER_SUB`` and ``DOMAIN_NAME`` environment variables.)


`0.7.0`_ - 2020-11-08
=====================

Added
-----

- ``distinct`` parameter to user commits.

Changed
-------

- ``user.locked_square`` changed to ``user.unlock_locked_square``. The function
  automatically unlock currently locked square of the user, if there is some.

Fixed
-----

- Return proper HTTP code when there is nothing to map or review. See #10.

Removed
-------

- Square commits. See #6.
- User's workingon. See #5.


`0.6.1`_ - 2020-10-16
=====================

Changed
-------

- Use ``splitted`` commit type.


`0.6.0`_ - 2020-10-01
=====================

Added
-----

- Database in docker password settings in readme.

- Maximum database connections based on ``MAX_WORKERS`` environment variable
  (see #7).

- Unit and integration tests to CI/CD (see #3).

Changed
-------

- Split square split to add new commits in different transaction.

- Database is changed. ``current_areas`` table now includes ``squares_to_map``,
  ``squares_to_review``, and ``squares_done`` statistics. These statistics are
  updated by the script from ``damn_upkeep`` docker images of the
  `damn_deploy`_. This lead to **backward incompatible changes in API** -- the
  format of *area* in ``GET /areas`` request is different (see ``thinlist``
  procedure of ``areas`` module.)

Removed
-------

- Database dump. Use the config files from the `damn_deploy`_ repository.

.. _damn_deploy: https://gitlab.com/damn-project/damn_deploy


`0.5.2`_ - 2020-06-16
=====================

Fixed
-----

- Add maximum database connections.


`0.5.1`_ - 2020-06-01
=====================

Fixed
-----

- Make map, review, and split procedures serializable when accessing database.


`0.5.0`_ - 2020-04-29
=====================

Added
-----

- User's commit messages endpoint.

Deprecated
----------

- User's workingon procedure. Will be removed in ``v0.6.0``.


`0.4.3`_ - 2020-02-06
=====================

Changed
-------

- Message in square's GPX border.


`0.4.2`_ - 2020-01-31
=====================

Fixed
-----

- ``DAMN_SERVER`` environment variable does'n contain ``https://``. It's due to
  changes in damn deploy repository.


`0.4.1`_ - 2020-01-31
=====================

Fixed
-----

- Swapped width and height in split area/square plpgsql procedures.


`0.4.0`_ - 2020-01-27
=====================

Added
-----

- Since query parameter for areas.

- Database uses utc now() for default timestamp.

Fixed
-----

- Return border in area stats as GeoJSON.


`0.3.0`_ - 2010-01-13
=====================

Added
-----

- Random square lock policy.


`0.2.1`_ - 2020-01-06
=====================

Fixed
-----

- Square size limit when creating new area squares. See #1.


`0.2.0`_ - 2020-01-01
=====================

Added
-----

- Use JWT for authorization.

- CORS middleware. By default, enable web browser client from
  ``http://localhost``.

- Since query parameter for area, square commits.

- Endpoint for GPX of square.

- Load environment variables when available.

Changed
-------

- Limit *working on* endpoint to last 14 days of user activity.

- Authorization procedure. It uses temporar identifiers generated by clients.
  See commit ``e0c769d`` for more info.

- Database dump -- the owner is ``damnuser``.


0.1.0 - 2019-10-27
==================

Added
-----

- Changelog, license, readme.

- ``damn_server`` package, config and database modules.

- ``tests`` subpackage including unit tests.

- Area ``save`` and ``load`` procedures.

- Area ``thinlist`` and ``workingon`` procedures.

- Areas procedures:

  - ``thinlist``.

- Area procedures:

  - ``commits``,
  - ``update``,
  - ``stats``,
  - ``map``,
  - ``review``.

- Square procedures:

  - ``commit``,
  - ``commits``,
  - ``last_commit``,
  - ``border``,
  - ``split``.

- User procedures:

  - ``locked_square``,
  - ``save``,
  - ``load``,
  - ``update``,
  - ``workingon``.

- Area geometry can be geojson file from `MapSwipe Analytics`_ or
  `geojson.io`_. When importing from `geojson.io`_, all the ``features`` of
  ``FeatureCollection`` **must** be ``Polygons``. There may be multiple polygon
  features and polygons may overlap.

- API endpoints.

- Session security.

- OAuth authentication to OpenStreetMap server.


.. _MapSwipe Analytics: https://mapswipe.heigit.org/analytics/
.. _geojson.io: http://geojson.io/

.. _Unreleased: https://gitlab.com/damn-project/damn_server/compare/v0.7.0...master
.. _0.7.0: https://gitlab.com/damn-project/damn_server/compare/v0.6.1...v0.7.0
.. _0.6.1: https://gitlab.com/damn-project/damn_server/compare/v0.6.0...v0.6.1
.. _0.6.0: https://gitlab.com/damn-project/damn_server/compare/v0.5.2...v0.6.0
.. _0.5.2: https://gitlab.com/damn-project/damn_server/compare/v0.5.1...v0.5.2
.. _0.5.1: https://gitlab.com/damn-project/damn_server/compare/v0.5.0...v0.5.1
.. _0.5.0: https://gitlab.com/damn-project/damn_server/compare/v0.4.3...v0.5.0
.. _0.4.3: https://gitlab.com/damn-project/damn_server/compare/v0.4.2...v0.4.3
.. _0.4.2: https://gitlab.com/damn-project/damn_server/compare/v0.4.1...v0.4.2
.. _0.4.1: https://gitlab.com/damn-project/damn_server/compare/v0.4.0...v0.4.1
.. _0.4.0: https://gitlab.com/damn-project/damn_server/compare/v0.3.0...v0.4.0
.. _0.3.0: https://gitlab.com/damn-project/damn_server/compare/v0.2.1...v0.3.0
.. _0.2.1: https://gitlab.com/damn-project/damn_server/compare/v0.2.0...v0.2.1
.. _0.2.0: https://gitlab.com/damn-project/damn_server/compare/v0.1.0...v0.2.0