1
0
Fork 0
Commit Graph

397 Commits (master)

Author SHA1 Message Date
Vasilis Tsiligiannis 4a4f96f352 Update fixtures after model changes
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-12-17 12:26:27 +02:00
Vasilis Tsiligiannis 5c8c9fb663 Add support for setting InfluxDB client SSL verification
This patch fixes a warning of 'urllib3' when SSL is enabled.

Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-12-16 22:16:25 +02:00
Fabian P. Schmidt 4278c6caa0 Add latest TLE to UI if possible
Fixes #264.

[v2:- Added docstrings]
Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2019-12-07 22:33:25 +01: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
Alfredos-Panagiotis Damkalis 34f2641bef Not request TLE with NORAD ID above 99000
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2019-11-18 02:55:10 +02:00
deckbsd fbd0fbf34e change transmitter panel color regarding sat
Signed-off-by: Flawinne Julien flawinne.julien@protonmail.com
2019-10-18 11:41:59 -07:00
Corey Shields 72e5d728a2 Django 2.2(.6) upgrade
This change bumps DB up to django 2.2.6 and resolves dependencies.  No migrations are necessary.  I've tested in my own environment, time to test in db-dev!

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-10-14 02:59:52 -04:00
Corey Shields e7e400e49a Revert "Django 2.2(.6) upgrade"
This reverts commit 8cae425ac9
2019-10-12 14:55:37 +00:00
Corey Shields 8cae425ac9 Django 2.2(.6) upgrade
This change bumps DB up to django 2.2.6 and resolves dependencies.  No migrations are necessary.  I've tested in my own environment, time to test in db-dev!

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-10-10 19:17:23 -04:00
Vasilis Tsiligiannis 8710a2df3b Install and enable Django Debug Toolbar when in debug mode
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-10-07 23:35:42 +03:00
Alfredos-Panagiotis Damkalis 494351e2e7 Remove custom views of 404 and 500 errors
According to Django 1.11 documentation if there are 404.html and 500.html
pages in templates root directory then it loads them in case of 404 or
500 errors without any extra code needed. More details in:
https://docs.djangoproject.com/en/1.11/ref/views/#error-views

Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2019-10-03 11:39:30 +03:00
Alfredos-Panagiotis Damkalis ef40817f61 Update javascript libraries
Updates:
* gulp to 4.0.2
* gulp-eslint to 6.0.0
* stylelint to 4.3.1
* bootstrap to 3.4.1
* chart.js to 2.8.0
* jquery to 3.4.1
* mapbox-gl to 1.3.1
* moment to 2.24.0

Removals:
* bootstrap-daterangepicker
* backbonejs(code parts that weren't removed)
* d3
* underscore

Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2019-09-24 22:46:25 +03:00
Alfredos-Panagiotis Damkalis e691ddb79e Fix docs url
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2019-09-24 18:46:47 +03:00
Vasilis Tsiligiannis 7ebc04e534 Fix filter argument of model field name
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-09-22 21:53:50 +03:00
Corey Shields 3e24773476 fix reverted mode_label and mode_data
when linting db code I unintentionally swapped the return of mode_data with mode_label, causing NaN in stats.js when trying to calculate the mode doughnut.

Reverts this bug.  Fixes #325

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-09-01 19:53:03 -04:00
Vasilis Tsiligiannis fc90760e7c pylint: Remove W0603 warning on 'args' and 'kwargs', remove unused Python 2 configuration
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-09-02 01:49:51 +03:00
Corey Shields 61f9137aae Fix celery cyclical dependency
Fixes the cyclical dependency between celery.py and tasks.py when update_all_tle is called outside of celery by switching to autodiscovered tasks

Signed-off-by: Corey Shields <cshields@gmail.com>
[acinonyx@openwrt.gr: use @shared_task decorator and wrapper tasks to workaround celery bug]
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-08-19 01:13:28 +03:00
Corey Shields 6920bbab03 move py2 lint exceptions to .pylintrc
Ignore py2-specific linting errors in .pylintrc while testing them in .pylintrc3

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-08-10 15:53:00 -04:00
Corey Shields f80f207c78 Flake and isort fixes
Fix some spacing issues and import syntax introduced by my linting changes.

The inline pylint disable for C0412 clashes with isort, there is no combination there that works for both.

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-27 15:55:20 -04:00
Corey Shields f1420d3e9e Linting W0511
part of W0511

Filed #321 and moved code comments to #265

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-27 15:38:02 -04:00
Corey Shields d71114130a Rename transmitter properties
Fixing these as part of W0511

There were some transmitter properties labeled "has_" (which implies a boolean) while returning a count. Renamed them and their instances to "_count" along with cleaning up some variables

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-27 15:24:42 -04: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 fc8f9a8c35 Linting for C0412
There are clashes between the positioning and ordering of our imports between pylint and isort, just ignoring them on the pylint side for now..

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-27 14:45:19 -04:00
Corey Shields 9359532df9 Linting for E1101
Pylint throws 2 false positives for E1101 under Python2 (but runs cleanly in Python3). Disabling these.

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-27 14:29:24 -04:00
Corey Shields f9336eb0b4 Linting for R0401
Fixes a cyclical dependency between calling the celery app through an import in tasks.py (which then imports tasks.py) by retrieving celery through the class.

Tested in local dev

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-27 14:17:16 -04:00
Corey Shields 8271351729 Linting for R0901
Ignoring cases of too many ancestors in API views.py as these are upstream, not much we can do about it.

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-27 12:22:41 -04:00
Corey Shields 91d8ba20bd Linting for R0903
Ignoring R0903 for tests.py where we do not need to care about public methods, and for django managers in models.py

This negates the need for MR !396

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-27 12:13:56 -04:00
Corey Shields b704454486 Linting for R0914
A couple of functions in tasks and utils were refactored with new helper functions to reduce the number of local variables per function.

In addition, fetch_data.py was flagged with R0914 but this is a relic of the original attempt at decoding data into DB, and is unused - so I am removing rather than fixing it.

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-27 12:10:47 -04:00
deckbsd 965a4f3658 add filters on satnogs db telemetry api
remove unset schema filter

fix flake8 remark

Signed-off-by: flawinne julien  <deckbsd@protonmail.com>
2019-07-20 07:31:24 -07:00
Vasilis Tsiligiannis 70ffe07f22 Reduce number of statements, resolve pylint 'R0915'
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-07-17 17:52:35 +03:00
Vasilis Tsiligiannis 5abb3553f9 Do not call return in 'if' and 'else'
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-07-17 17:52:10 +03:00
Vasilis Tsiligiannis 26662074e5 isort: Declare 'factory' as a third-party import
* Apply changes based on new configuration
* Enable 'C0411' pylint checking

Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-07-17 17:51:53 +03:00
Vasilis Tsiligiannis 3404db012c Move form validation function out of class, fix 'E0213' pylint error
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-07-17 17:51:48 +03: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 3596ebfb9f flake / lint fixes
Signed-off-by: Corey Shields <cshields@gmail.com>

Fix some spacing issues brought up in a full tox run (that were not identified in my prior linting flows)
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 3ce647e374 linting R0101
too-many-nested-blocks - pulled a break point out for utils.py/decode_data to get rid of a nested block

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-13 18:49:18 -04:00
Corey Shields 389194b076 linting W5104
using field excludes is an antipattern and a possible security risk down the road. Replaced with explicit fields list.
2019-07-13 18:42:11 -04:00
Corey Shields c376e08826 linting W5102, W5103
Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-13 18:33:03 -04:00
Corey Shields adfc08bb79 linting W1201, W1202
fix logging strings to %s format

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-13 18:15:13 -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 fe1f989d7b linting for W0621
resolving name conflicts between variables and functions

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-13 17:38:04 -04:00
Corey Shields 0d4701b100 linting W0612, W0613
Mostly disabling the alerts on django signals and filter attributes that go unused.

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-13 16:24:43 -04:00
Corey Shields f7c4df84f1 Fix broken API filter view
Linting W0613 led to the discovery that we filter on status entries that do not exist. Changing "functional" to "active" will fix https://db.satnogs.org/api/transmitters/?alive=true

fixes satnogs-db#298

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-13 16:14:40 -04:00
Corey Shields 0da7589c1d fix spacing (flake)
Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-13 16:02:48 -04:00
Corey Shields 678de105dd linting W0201 and W0221
we are going to ignore W0201 and W0221 around the TransmitterEntry save function. Reasons are in the code comments.

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-13 15:32:04 -04:00
Corey Shields ec07c59263 linting for W0150
the check_celery function returns in a finally, which is unnecessary and is an antipattern. This works just the same dropping the finally statement and returning in the end.

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-13 14:46:16 -04:00
Corey Shields a8a0dc4aa6 linting W0107
check_celery had an invalid pass, replaced that with a log entry.
 
Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-13 14:38:20 -04:00
Corey Shields 8b6410ba2c W0105 linting - remove display_decoded
display_decoded is an unused relic of the original decode method, and throws a W0105 warning.

removing this function completely

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-13 14:28:04 -04:00