Closed praveenphatate closed 1 year ago
FYI, we've merged a branch that refactored the code base significantly in order to support automated deployments. This mostly involved moving app-related files into an app
directory. You will need to reconcile your changes here with the new folder structure before you can merge.
This PR added a union type (GEOSGeometry | str
) which is written in a manner only available in Python 3.10+. This is fine as we are using Python 3.11 in prod: https://github.com/NASA-IMPACT/admg-backend/blob/d4441c0b583cc6dd59ed392f16143645858522c8/app/Dockerfile.prod#L2
However, a number of our CI steps were using older version of Python. I went through the painful process of updating those versions, which caused a number of odd issues. See https://github.com/actions/setup-python/issues/556 & https://github.com/actions/setup-python/issues/719. Nonetheless, I finally got this working by having the tests CI steps install into the user environment.
The
GEOSGeometry
error was not actually being thrown in our code. Instead, it was called when trying to deserialize our uniqueN, S, E, W
bounding box format when callingsuper().get_context(...)
.https://github.com/django/django/blob/eba81c83906fd966204b9853aaa793f0516ccd4b/django/contrib/gis/forms/widgets.py#L40-L50
The solution is to ensure that
value
is cast to aGEOSGeometry
before callingsuper().get_context(...)
.Closes #432