1
0
Fork 0
Commit Graph

47 Commits (3d96fe1e41acbffa615bd64c5b3676172e7c9ff3)

Author SHA1 Message Date
Vasilis Tsiligiannis 3d96fe1e41 Fix YAPF dict formatting
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2021-01-13 20:21:55 +02:00
Corey Shields 5e03f7c759 Epic API (doc) changes for SatNOGS DB
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>
2021-01-09 20:44:19 -05:00
Corey Shields 0fc7107172 Tighter exception handling
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>
2020-12-29 14:13:12 -05:00
Vasilis Tsiligiannis f85273a592 isort: Fix line length configuration
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2020-09-29 00:19:55 +03:00
Alfredos-Panagiotis Damkalis f53d240f5b Generate observer in DemodData object in api/view
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-09-28 12:08:21 +03:00
Alfredos-Panagiotis Damkalis 8e2f52a59f Fix datetime format in Tle API endpoint
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-09-25 04:59:18 +03:00
Alfredos-Panagiotis Damkalis 6a12f76a26 Remove LatestTle model and introduce LatestTleSet model
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>
2020-09-22 17:37:55 +03:00
Corey Shields 402ec942ab Add frequency coordination status to transmitters
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>
2020-09-06 11:32:15 -04:00
Alfredos-Panagiotis Damkalis e1b859887f Add API endpoint for TLE
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-08-11 15:11:51 +03:00
deckbsd 999bab50c6 add the new sat fields trough the sat api endpoint
Signed-off-by: Julien Flawinne <jf.satnogs at protonmail dot com>
2020-07-26 16:28:49 +02:00
deckbsd ef1c4313aa Remove python3 migration remnants
Signed-off-by: Julien Flawinne <jf.satnogs at protonmail dot com>
2020-05-27 20:54:39 +02:00
Pierros Papadeas d8aef58025 Add artifact model and API endpoint for new waterfall artifacts
Signed-off-by: Pierros Papadeas <pierros@papadeas.gr>
2020-05-20 19:42:31 +03:00
Vasilis Tsiligiannis e9334d89e1 tox: Bump environment dependencies version
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2020-03-28 22:43:08 +02:00
deckbsd 2967e608c3 Populate decoder attribute in API
Signed-off-by: Flawinne Julien flawinne.julien@protonmail.com
2019-12-07 15:49:22 +00:00
deckbsd 062152aeec add uplink_mode field for transciever and transponder transmitter type
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
2019-12-01 09:43:44 +00:00
Corey Shields 40460c47bb Linting for W0511
Moved these placeholders to issues #319 and #320

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-27 15:23:26 -04:00
Corey Shields f6e61f158f review fixes for !393
per acinonyx review, fix comment spacing, add missing citation to TransmitterEntryForm, and standardize pylint disable messages

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-17 09:26:13 -04:00
Corey Shields 9989efb453 linting for R0201
Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-13 19:12:54 -04:00
Corey Shields 6bc64e9217 linting for W0703
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>
2019-07-13 18:08:55 -04:00
Corey Shields f90fe277d5 remove unused helpers
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>
2019-07-12 22:53:23 -04:00
Corey Shields 2ec2fd2a4d pylint C0111 docstrings
phew, fixed all of the missing-docstring and found some other things along the way (for future changes)
2019-07-12 22:36:18 -04:00
Pierros Papadeas 48ea435093
Add transmitter service field
Fix issue 310

Signed-off-by: Pierros Papadeas <pierros@papadeas.gr>
2019-07-11 14:10:47 +03:00
Corey Shields d4fb5189d1 future imports and remove unicode strings
adds from __future__ import unicode_literals, absolute_import, division, print_function to all files, removes unicode strings from RTD conf.py (none other were found in our codebase)

See also https://docs.djangoproject.com/en/1.11/topics/python3/#unicode-literals

fixes #290

tested locally in docker
2019-06-30 19:23:55 -04:00
Vasilis Tsiligiannis 4bb87e2e6a isort: Do not skip install in order to correctly detect third-party imports
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-05-09 20:49:10 +03:00
Vasilis Tsiligiannis 655f98f39c Use 'isort' to fix order of imports
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-04-27 14:08:11 +03:00
Vasilis Tsiligiannis 140180b6b3 Reformat code with 'yapf', check format using 'tox'
Use configration based on Django coding style guidelines

Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-04-27 12:32:33 +03:00
Corey Shields ff21847b52 rename demoddata.source to demoddata.app_source
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.
2019-04-20 19:15:29 -04:00
Alfredos-Panagiotis Damkalis c2e378da4e Refactor transmitter model
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
2019-04-08 21:21:46 +03:00
Pierros Papadeas 6d5e1db09c
Add decayed field in Satellite model 2019-01-19 19:27:48 +02:00
Pierros Papadeas a1d8357763
Change model of transmitter to include drift and type 2018-12-25 21:15:18 +02:00
Corey Shields 9cc9c352f5 DB changes to allow for network-sourced sids submissions 2018-09-03 14:19:42 -04:00
Corey Shields 44fee695b5 fix bare excepts
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.
2018-07-14 14:50:07 -04:00
Nikos Roussos 41940a749b
Expose status on Sateliite endpoint 2017-08-12 22:45:13 +03:00
Nikos Roussos 7c7115f9be
Expose more fields to Telemetry API endpoint
* Rename decoded API fields for clarity
2017-03-28 22:00:05 +03:00
Nikos Roussos 74002958f2
API endpoint for SiDS submission 2017-03-02 19:56:42 +02:00
Nikos Roussos afcaf5493c Create API endpoint for decoded telemetry data 2016-05-08 18:44:22 +03:00
Nikos Roussos d38b5e60ed pep8 2015-09-17 16:01:41 +03:00
Nikos Roussos 79a5bcdc1c API minor fixes
* Expose mode_id instead of mode
* Expose satellite names and image
2015-08-14 16:57:39 +03:00
Nikos Roussos 473727e309 Add Modes to the API 2015-08-13 15:57:04 +03:00
Nikos Roussos b433bc6238 s/transponders/transmitters 2015-07-23 15:48:58 +03:00
Nikos Roussos 1424fd3a2b Use significant fields as API lookup detail fields 2015-07-20 21:21:45 +03:00
Nikos Roussos 1071e663eb Change norad API field to proper name 2015-05-09 12:52:24 +03:00
Nikos Roussos 814792c9df Add UUID field to Transponders 2015-05-09 11:38:39 +03:00
Nikos Roussos 3f300c4fed Expose norad_cat_id to API for Transponders 2015-05-07 11:28:03 +03:00
Nikos Roussos 0350e464e4 Expose Satellites on API 2015-05-03 23:23:07 +02:00
Nikos Roussos 1befe28bb1 Expose Transponders only to API 2015-04-25 18:17:59 +03:00
Nikos Roussos 6828eb315b Initial commit 2015-04-22 18:10:13 +03:00