1
0
Fork 0
Commit Graph

595 Commits (1513e998bb5f0f029a35c4ccfb41f7968890e2dc)

Author SHA1 Message Date
Alfredos-Panagiotis Damkalis 1513e998bb Fix modal submit button functionality
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2021-06-23 14:58:49 +03:00
Corey Shields 79ca1834c9 More improved unit testing
Additional pytests, including tests for a fully populated DB

Also:

- simplify a conditional statement in the home page view

- fix broken robots.txt url parsing

- fix case in cached stats generation where new satellite id association could
trip a comparison against a NoneType by adding a default

- removed a print statement leftover from satellite id development

Signed-off-by: Corey Shields <cshields@gmail.com>
2021-05-25 16:38:02 -04:00
Alfredos-Panagiotis Damkalis f046863123 Fix export frames functionality
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2021-05-24 05:43:11 +03:00
Corey Shields 37b83bfa66 Improved unit testing around API calls
also adds some known-bad tests for tlm submission to ensure we handle correctly

Signed-off-by: Corey Shields <cshields@gmail.com>
2021-05-22 09:55:32 -04:00
Alfredos-Panagiotis Damkalis d25436d594 Add JSON-LD post API endpoint for Satellite suggestions
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2021-05-20 16:59:14 +03:00
Alfredos-Panagiotis Damkalis 804b69e442 Add JSON-LD post API endpoint for Transmitter suggestions
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2021-05-20 16:59:14 +03:00
Corey Shields 4141e275cc Improve testing and handling of telemetry upload API
Improved handling of input data for the telemetry API and added tests for such

ensure that we return a 400 on an empty frame, station, timestamp

return 400 when lat/lng value conversion fails or when the resulting lat/lng is
out of range.

Fixes #463

Signed-off-by: Corey Shields <cshields@gmail.com>
2021-05-16 18:54:48 -04:00
Alfredos-Panagiotis Damkalis 286c744141 Fix decode_all_data Satellite query
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2021-05-16 00:36:45 +03:00
Corey Shields 292f1978db Remove old unused auth0login app
Back in d153ece we switched to the upstream backend social_core.backends.auth0.Auth0OAuth2

this commit removes the custom app we had to use for Auth0

Signed-off-by: Corey Shields <cshields@gmail.com>
2021-05-14 20:40:03 -04:00
Corey Shields cbb169e5de package and dependency updates
Upgrade to Django 3.2 LTS

add DEFAULT_AUTO_FIELD = 'django.db.models.AutoField' for Django 3.2

un-pin urllib3 and requests as the newer releases work with auth0 now

Signed-off-by: Corey Shields <cshields@gmail.com>
2021-05-14 20:24:23 -04:00
Corey Shields c217f66b2d better error handling around latest_data
In satellite_card.html we assume if telemetry_data_count returns a value then latest_data will also run fine. This adds some better handling in the off chance that it does not (like in an odd cache state)

Signed-off-by: Corey Shields <cshields@gmail.com>
2021-05-14 16:11:52 -04:00
Corey Shields 33dd436cc1 do not require a norad id on new satellites 2021-05-14 14:26:36 -04:00
Alfredos-Panagiotis Damkalis 3b05184d14 Add review functionality for satellite suggestions
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2021-05-11 20:27:05 +03:00
Alfredos-Panagiotis Damkalis 2f11e6b8e8 Separate aprrove permission for satellite and transmitter
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2021-05-11 20:27:05 +03:00
Alfredos-Panagiotis Damkalis 418fe5ab3d Support suggestions for creating/editing satellite
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2021-05-11 20:27:05 +03:00
Alfredos-Panagiotis Damkalis c75b491b9b Replace SatelliteEntry with Satellite in models
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2021-05-11 20:27:05 +03:00
Alfredos-Panagiotis Damkalis f4ea975e0c Remove dead code
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2021-05-11 20:27:05 +03:00
Alfredos-Panagiotis Damkalis af2d04a33f Use Satellite model for satellite API endpoint
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2021-05-11 20:26:52 +03:00
Alfredos-Panagiotis Damkalis d1eab762fa Update satellite models introducing Satellite Identifier
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2021-04-29 08:35:49 +03:00
Alfredos-Panagiotis Damkalis 0d81ecbe77 Rename Satellite model to SatelliteEntry
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2021-04-29 08:35:49 +03:00
Alfredos-Panagiotis Damkalis cc073daf45 Fix TypeError for norad_id
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2021-03-11 23:47:45 +02:00
Alfredos-Panagiotis Damkalis 29c0d3654b Make TransmitterEntry and its proxies readonly in admin
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2021-03-11 12:14:54 +02:00
Alfredos-Panagiotis Damkalis 4ea55fa1cc Fix error when there are no TLE for new satellite
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2021-03-11 08:29:38 +02:00
Alfredos-Panagiotis Damkalis f6fd93f53e Replace print with logging
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2021-03-11 08:29:38 +02:00
Alfredos-Panagiotis Damkalis 5426167d5b Remove is_reviewed field from TransmitterEntry
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2021-03-11 08:29:38 +02:00
Alfredos-Panagiotis Damkalis a97f9666db Add reviewer and reviewed fields in TransmitterEntry
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2021-03-11 08:29:38 +02:00
Alfredos-Panagiotis Damkalis 2805acde27 Rename field reviewed on transmitterentry to is_reviewed
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2021-03-07 19:33:59 +02:00
Alfredos-Panagiotis Damkalis 00a91ba947 Rename field user on transmitterentry to created_by
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2021-03-07 19:01:34 +02:00
Alfredos-Panagiotis Damkalis efd5dd1a96 Add setting for enabling ZeroMQ feature
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2021-02-18 18:04:07 +02:00
Corey Shields 2b17d32a67 Replace gpredict.js with satellite.js
package.json: Add satellite.js dependency

Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>

Move to satellite.js in map, drop satellite footprint

Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>

Remove gpredict.js dependency

Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>

Replace gpredict.js with satellite.js

Builds on the work of kerel-fs in !596 and #440, implements satellite.js for core TLE and SGP4 handling, deprecating and removing gpredict.js

fixes #440
does NOT fix #204
 
Signed-off-by: Corey Shields <cshields@gmail.com>
2021-02-13 14:56:14 -05:00
Alfredos-Panagiotis Damkalis 8adda93204 Add station_id field to published DemodData
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2021-02-04 12:55:35 +02:00
Alfredos-Panagiotis Damkalis afda478ccc Add station_id in DemodData model
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2021-02-04 12:16:16 +02:00
Alfredos-Panagiotis Damkalis 443668b90c Add observation_id field for published DemodData
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2021-01-30 19:51:11 +02:00
Alfredos-Panagiotis Damkalis 2b3282792d Add observation_id in DemodData model
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2021-01-30 19:38:53 +02:00
Alfredos-Panagiotis Damkalis 8ca9004fc9 Change ZEROMQ_SOCKET_URI to 127.0.0.1
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2021-01-20 13:40:50 +02:00
Alfredos-Panagiotis Damkalis 4aed383ed0 Add observer field to ZeroMQ sent data
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2021-01-20 13:06:29 +02:00
Alfredos-Panagiotis Damkalis 87ac2f9dc9 Remove post_save signal for Telemetry object
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2021-01-20 13:06:29 +02:00
Alfredos-Panagiotis Damkalis 4b8239739a Publish new SiDS frames by using a ZeroMQ socket
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2021-01-20 13:06:29 +02:00
Corey Shields 131831a811 Add version field for demoddata entries
Adds an optional 'version' field which will store version details for clients that are sending it (such as some SiDS clients, even though version is not clearly indicated in the protocol pdf)

I set this as a 45 length CharField, anticipating that there may be some application names, versions, and possible git hashes included as well.

Adds a db migration for this field, blank by default.
 
also removed an unnecessary setting which was default (see !628)

Relates to #456

Signed-off-by: Corey Shields <cshields@gmail.com>
2021-01-19 19:38:54 -05:00
Corey Shields bb24e771d6 minor updates to satnogs-db-api-client
With the new drf-spectacular generated schema, need to add nulltype to the list of requirements to install

update copyright dates

Improve examples and client generated docs via drf-spectacular

Signed-off-by: Corey Shields <cshields@gmail.com>
2021-01-17 11:45:52 -05:00
Vasilis Tsiligiannis 79382a5c2f tox: Bump 'pylint' and 'pylint-django' versions
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2021-01-14 15:28:20 +02:00
Vasilis Tsiligiannis d92e655cb5 Use Python 3 style 'super()'
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2021-01-14 15:28:20 +02:00
Vasilis Tsiligiannis 648db98037 tox: Bump 'yapf' version
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2021-01-14 15:28:15 +02:00
Vasilis Tsiligiannis a114826f80 tox: Bump 'isort' version
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2021-01-14 14:45:25 +02:00
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 e5ddc38e96 add https back to callback url on auto0
Signed-off-by: Corey Shields <cshields@gmail.com>
2020-12-30 17:53:30 -05:00
Corey Shields d153ece5ef Trying upstream auth0 backend in social_core
Trying the upstream backend against the ssl recursion issue we are seeing in dev.  May back out.

Signed-off-by: Corey Shields <cshields@gmail.com>
2020-12-30 17:16:21 -05:00
Corey Shields a1aafce76b Offer a dynamic API schema view
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>
2020-12-29 15:00:08 -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