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>
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>
LatestTle model was a proxy model on Tle one, using it for API adds a
significant delay to respond on the API requests. For this reason
LatestTle model is removed and LatestTleSet model takes its place.
LatestTleSet is updated asynchronously and keeping references to
latest TLE sets of Tle model. This allows to retrieve the TLE sets
faster.
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
Adds 2 fields to transmitter model, coordination (fixed set of choices, defaulting to blank) and coordination_url. API, UI, and tests are included.
Also introduces a bad_transmitter property to transmitter that will return true if any 'Uncoordinated' or '..Rejected' status is selected.
Fixes#311
Signed-off-by: Corey Shields <cshields@gmail.com>
Signed-off-by: Flawinne Julien flawinne.julien at protonmail dot com
add uplink_mode field for transciever and transponder
Signed-off-by: Flawinne Julien flawinne.julien@protonmail.com
adapt unit test for transmitter model
Update migration for taking account of the invert value
update uplink_mode migration condition
Not request TLE with NORAD ID above 99000
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
rename mode transmitter field to downlink_mode
adapt unit test for transmitter model
update uplink_mode migration condition
add uplink_mode field for transciever and transponder transmitter type
Signed-off-by: Flawinne Julien flawinne.julien at protonmail dot com
keep mode id
add forgotten field mode id
add missing ,
fix yapf error
broad-except, I added explicit exceptions where I felt safe doing so - but we do have a lot of broad exceptions accepted.
Signed-off-by: Corey Shields <cshields@gmail.com>
cleaning up C0111 exposed that we have some helpers initially added when django cache was implemented, but have since been abandoned.
Removing them as they are unused and unneeded
Signed-off-by: Corey Shields <cshields@gmail.com>
We have a field in demoddata called "source" which stores the application source of the data (network, sids, manual). This causes a lot of confusion with the SiDS API format which has a "source" parameter (that we convert to "station")
As I'm working through documenting the API (and getting us ready for feature expansion), I'd like this field renamed to avoid future confusion.
Transmitter model has been refactored by changing the current schema
from Transmitter and Suggestion models to TransmitterEntry model and
two proxy models TransmitterSuggestion and Transmitter:
* TransmitterEntry model will hold all the entries and changes on
transmitter entries in db.
* TransmitterSuggestion model will be the proxy model of the unreviewed
transmitter entries.
* Transmitter model will be the proxy model of the latest approved and
reviewed transmitter entries.
There are also change on Transmitter model fields:
* alive field is now change to status field
* there are new fields: citation, user, reviewed and created
Upon fixing CI we now have a slew of PEP8 722 issues (bare excepts). This MR fixes all of those by excepting Exception, which should catch anything the program generates while allowing systemexit exceptions.