1
0
Fork 0
Commit Graph

66 Commits (fc90760e7c72cce8f3109dc5319a05c6f6ae72fa)

Author SHA1 Message Date
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 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 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 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 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
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
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 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 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 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 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 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
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
Corey Shields b7ec119853 pylint C0103
Linting for Pylint C0103

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-12 12:41:21 +00: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
Poonam Mishra 9a0ef30e03 model: Replace __unicode__ by __str__
The special method __unicode__ is python2-only,
in python3 it's merged with __str__. In order to be py23-compatible
the python_2_unicode_decorator is used, see
https://docs.djangoproject.com/en/1.11/topics/python3/#str-and-unicode-methods

initial patch: Updated docstrings to show names
[kerel@mailbox.org: - reworded commit message,
                    - added similar change in demoddata
                    - added @python_2_unicode_compatible decorator]
Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2019-07-10 19:55:48 +02:00
Corey Shields 248390a760 flake / tox fixes
Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-10 19:55:48 +02:00
Corey Shields 8734748e50 2to3 changes for python3
Mostly list changes, from 2to3

Also missing __future__ needed for _version.py

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-10 19:55:48 +02: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 5e5296f154 fix dependencies for moving up to Django 2
this fixes for 2.0, will be one step toward 2.2

Fixes #278
2019-04-20 21:49:33 -04: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
Alfredos-Panagiotis Damkalis b24d292fc8 Add Blank=True for decayed date in satellite model 2019-01-21 15:34:02 +02: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
Alfredos-Panagiotis Damkalis 2b6be2a4b1 Ignore "File not found" error on frames extraction 2018-12-13 14:57:56 +02:00
Fabian P. Schmidt c405f781c4 Add additional TLE sources via python-satellitetle 2018-11-29 20:04:19 +00: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
Jacek Chmielewski d224e549a5 Fixes long loading times on satellite page by adding is_decoded boolean field with index on DemodData. 2018-03-05 17:30:23 +01:00
Nikos Roussos 7e8bfdd4e2
Save frames on date-based folders 2018-01-04 11:07:58 +02:00
Nikos Roussos da4372643d
Add description field on Satellites 2017-05-17 00:22:04 +03:00
Nikos Roussos 113884887d
Add display_decoced methond on DedodData model 2017-05-14 15:29:39 +03:00
Roboneet 9313ee8231
[Fixes #129] Track satellite status 2017-05-08 18:53:39 +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 d692a48ab3
Fetch and keep on TLE per Satellite 2017-03-25 16:50:27 +02:00
Pierros Papadeas 0ce757a54f Add payload statistics on stats page 2017-03-21 18:23:30 +02:00
Nikos Roussos 577013d262
Add observer field on DemodData 2017-03-14 21:21:17 +02:00
Nikos Roussos 223647445f
Model changes to support SiDS 2017-03-02 19:54:27 +02:00
Nikos Roussos cb2b6a43b9
Hide Telemetry block when Satellite has no relevent data 2017-01-28 22:56:03 +02:00
Nikos Roussos 6a2e68bc33 Add telemetry model and fields 2016-05-06 20:20:59 +03:00
Nikos Roussos 3fd0562c58 Change suggestion approval to skip deleting original object 2015-09-27 15:32:03 -04:00