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>
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>
We were missing a call to return the login page from a BaseAuth abstract function.
Once this is in dev (an auth0 environment) I suspect it might fix librespacefoundation/satnogs/satnogs-db#309
Signed-off-by: Corey Shields <cshields@gmail.com>
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>
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>
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>
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>
Found while documenting for C0111, this was old code for the initial "decode" functionality that was replaced by decode_data in utils.py
Signed-off-by: Corey Shields <cshields@gmail.com>
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>
Remove all bytestring references from existing migrations
Future migrations should avoid bytestrings with the future import we set.
Signed-off-by: Corey Shields <cshields@gmail.com>
In the 0.6.0 release the main CelesTrak source was changed from
'Satellites (active)' to the new 'SatNOGS' list. This list is
composed by CelesTrak by fetching the list of satellites
from satnogs-db.
This doesn't introduce a circular dependency:
As before, if a TLE is not available from the main collections
(which beside the previously discussed CelesTrak list includes
another from AMSAT and CalPoly), the CelesTrak SATCAT API is
questioned for each missing satellite separately.
Signed-off-by: Fabian P. Schmidt <kerel-fs@gmx.de>
With the introduction of 'satnogs-decoders' version saved within the
decoded data structure, there is no need to reset any data prior to
triggering a 'decode all' task. The newly decoded data can happily live
alongside old data until the administator of the data warehouse decides
to remove them, part of data janitor tasks. An additional advantage is
that if the decoder structure changes drastically, existing dashboards
can still be used to visualize the old data as long as they are
filtered by version and until new dashboards are prepared.
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>