I've decided to change things up in API schema and doc generation.
Work is not quite complete but its enough for testing in dev and feedback.
Major changes:
* Renaming of api.view classes to match ViewSet inheritance (minor annoyance)
* Introduce drf-spectacular for schema generation and doc UI via swagger-ui
* lots of doc changes for the API to provide a good experience with the above.
New schema generation should work seamlessly in gitlab ci, as well as via /api/schema dynamically.
The new swagger ui view is available via /api/schema/docs/
Signed-off-by: Corey Shields <cshields@gmail.com>
There are a slew of issues related to eventlet monkeypatching ssl.py which leads to the issues we've seen in the updates I pushed to dev this week. The gunicorn update to 20 seems to be the culprit here, and wasn't caught locally because "develop" in djangoctl.sh uses the django runserver, not gunicorn.
Hopefully this fixes our issues, and I'll slowly update eventlet, requests, and urllib3 back up
Signed-off-by: Corey Shields <cshields@gmail.com>
The RecursionError we keep hitting is happening in requests+urllib3, and I can't see why quite yet but there are enough changes there to try rolling them back, if the problem goes away then we've found an upstream bug.
Signed-off-by: Corey Shields <cshields@gmail.com>
Start using JWT from auth0, along with updated social-auth-app plugin and newer jose. Tested locally but only with a http redirect, will test ssl in dev
Signed-off-by: Corey Shields <cshields@gmail.com>
We seemed to hit a regression in celery with db-dev that should have been fixed in https://github.com/celery/celery/issues/6445 but is causing us issues.
Also pulling the social-auth package back with a weird ssl recursion issue.
Signed-off-by: Corey Shields <cshields@gmail.com>
adds the /api-schema URL which will provide the current API schema in OpenAPI format, both in rendered and downloadable formats.
Signed-off-by: Corey Shields <cshields@gmail.com>
Removed most of the bare Exception catches and put proper errors to catch in their place.
Reworked a bit of the gridsquare calculation, any exceptions raised should now be handled within the function.
I am purposefully leaving the 2 W0703's we have for data demodulation alone for now, as that will be quite a rabbit hole. Otherwise,
fixes#316
Signed-off-by: Corey Shields <cshields@gmail.com>
Update to Django Rest Framework 3.12.2 with improved schema generation.
However, it is still not quite complete for what we need (and what we currently postprocess for). Instead of postprocessing, this commit introduces our own extended generator to add the missing fields.
Once this is vetted good, we can remove contrib/postprocess-openapi-schema.py
Also added better comments to api/views.py which will end up in schema docs
Signed-off-by: Corey Shields <cshields@gmail.com>
DAG was not set correctly and collected assets were not passed to
subsequent jobs that needed them.
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
Kaitai Struct exceptions inherit from 'BaseException' instead of
'Exception' class. This issue is fixed upstream but did not make it
to the release of Kaitai Struct (see PR #53).
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
This should fix failing 'Read the Docs' documentation generation since
presence of 'mysql' executable is not a checked when installing a wheel
package.
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
Changes CASCADE to SET_NULL when upstream satellite object is deleted, preserving the TLE history in DB.
Tested locally with a deletion
Fixes#435
Signed-off-by: Corey Shields <cshields@gmail.com>
Adds the ability to sort on the 'status' column (which today does nothing) by setting the field by which datatables will sort on to sat.status
This also has the benefit of filtering on sat.status as well, though one would need to know the backend statuses to use (ie: 'alive' vs 'dead'). Not sure that is ideal but this is a quick fix.
Fixes#428
Signed-off-by: Corey Shields <cshields@gmail.com>
As reported in #433 there was a bug causing export requests for the last week to be treated as a last month export.
Fixes#433 by treating the period variable as the int that it is. Also makes the preceding check a little easier to understand by being explicit against the None case.
Signed-off-by: Corey Shields <cshields@gmail.com>