1
0
Fork 0
Commit Graph

1409 Commits (538ea52c1a319242cc0d30ff2bfc6082cf130b5b)

Author SHA1 Message Date
Fabian P. Schmidt 538ea52c1a tasks/clean_observations: Fix premature task termination in 'stage' environment
Skip the archival of old observations which just got deleted instead
of terminating the whole task at this point.

Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2020-01-04 19:46:06 +01:00
Alfredos-Panagiotis Damkalis 1635a14640 Retry archive.org uploading on "SlowDown" error
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-01-04 18:22:17 +02:00
Fabian P. Schmidt e1ed302e64 utils/drifted_frq: Use python3 round builtin (W1633)
This changes the used rounding strategy.

See "Whats new in python3"[1] for more details:
> Exact halfway cases are now rounded to the nearest even result
> instead of away from zero.
> (For example, round(2.5) now returns 2 rather than 3.)

Fixes round-builtin (W1633) pylint error.

[1]: https://docs.python.org/3/whatsnew/3.0.html#builtins

Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2020-01-04 15:31:05 +01:00
Fabian P. Schmidt af9f9bf8e9 api/serializers: Use integer literal instead of pow
Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2020-01-04 15:30:49 +01:00
Fabian P. Schmidt 0203ab17a7 templatetags/tags: Use integer literal instead of pow
Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2020-01-04 15:30:49 +01:00
Fabian P. Schmidt 11df29ba1d views: Use str builtin instead of single-argument formatstring
Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2020-01-04 15:07:06 +01:00
Fabian P. Schmidt 1719473d70 Use str(error) instead of error.message (W1645)
Fixes exception-message-attribute (W1645) pylint error.

Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2020-01-04 15:07:06 +01:00
Fabian P. Schmidt 6ed02d4dd9 scheduling/create_new_observation: Add verbose docstring
Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2020-01-04 13:55:12 +00:00
Fabian P. Schmidt 642a0a2c61 Add from __future__ import division to all relevant files (W1619)
Fixes old-divison (W1619) pylint error.

Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2020-01-04 13:55:12 +00:00
Fabian P. Schmidt a7692b4627 base/scheduling: Make division operations "true division"-safe
Use explicit typecast to float to prevent ambiguous division operation
in the first two cases. In the last case (timdelta, int), the python2
timedelta doesn't support the division operator (this was intruduced
in python 3.2). Use old_div instead.

This change clarifies that true division is the desired behaviour
in these three code locations.

Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2020-01-04 13:55:12 +00:00
Fabian P. Schmidt f774025a6f utils/sync_demoddata_to_db: Raise RequestException if sync fails (W0703)
Let the caller handle the exception in case the sync fails.

Fixes a broad-except (W0703) pylint error.

Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2020-01-04 14:08:00 +01:00
Fabian P. Schmidt 426e3585f8 utils/sync_demoddata_to_db: Use requests instead of urllib2 (W1648, W1658)
Fixes the bad-python3-import (W1648) and deprecated-urllib-function (W1658) pylint errors.

Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2020-01-04 13:55:31 +01:00
Fabian P. Schmidt 575ecc739b settings: Add DB_API_TIMEOUT
Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2020-01-04 13:36:41 +01:00
Alfredos-Panagiotis Damkalis bd9a37dd50 Fix lint issues of the latest commits
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-01-03 19:01:57 +02:00
Alfredos-Panagiotis Damkalis ee8fe283cb Change tox to run py2-lint with and without --py3k flag
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-01-03 19:00:56 +02:00
Alfredos-Panagiotis Damkalis c9d4686f07 Revert "pylint: enable E1121, R0912, R0913, R0914, W0201 and W0703 checks"
This reverts commit 581fc7620c. pylint didn't
check the enabled checks as was run with --py3k parameter.

Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-01-03 16:03:46 +02:00
Alfredos-Panagiotis Damkalis 581fc7620c pylint: enable E1121, R0912, R0913, R0914, W0201 and W0703 checks
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-01-03 14:03:18 +02:00
Fabian P. Schmidt a026edd36a utils/sync_demoddata_to_db: Fix method rename from display_payload to display_payload_hex
Fixes #702 (regression introduced in 3609e46b).

Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2019-12-31 20:50:18 +01:00
Fabian P. Schmidt 834c7b67fe management/fetch_data: Re-use fetch_data task
Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2019-12-31 14:38:54 +00:00
Fabian P. Schmidt 8993d7e1b1 settings: Add comment on DB_API_ENDPOINT usage
This feature (disable DB data fetching by setting DB_API_ENDPOINT to '')
was added in b522d43, but never documented.

Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2019-12-31 14:38:53 +00:00
Fabian P. Schmidt bda0580dbe utils/community_get_discussion_details: Add a sane request timeout
Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2019-12-31 14:28:07 +00:00
Fabian P. Schmidt dd54caa4e4 utils/community_get_discussion_details: Fix response when commnuity is unreachable
Fixes #700 (regression introduced by 10b1292).

Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2019-12-31 14:28:07 +00:00
Fabian P. Schmidt 3609e46b78 Fix demod data display for utf-8 decodable non-CW observations (W1612)
Previously for unicode decode-able frames in observations where the transmitter
type was not CW, the hex dump was malformed and contained the unicode decoded
text instead.

Fixes the unicode-builtin (W1612) pylint errors as well.

Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2019-12-31 13:26:47 +01:00
Fabian P. Schmidt 65b379f6af utils/export_as_csv: Use str instead of unicode-builtin (W1612)
Fixes a unicode-builtin pylint error (W1612).

Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2019-12-31 13:26:47 +01:00
Fabian P. Schmidt 55e77896f3 Add 'future' in dependencies
Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2019-12-31 13:26:47 +01:00
Fabian P. Schmidt 88083664a6 views/observation_new_post: Reduce branches (R0912)
Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2019-12-31 09:15:06 +00:00
Fabian P. Schmidt 2cfe7561a5 views/observation_new_post: Refactor observations creation into a new function (R0912)
Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2019-12-31 09:15:06 +00:00
Fabian P. Schmidt 206053f80f views/observation_new_post: Combine identical error handlers
Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2019-12-31 09:15:06 +00:00
Fabian P. Schmidt 308cbe32d0 views/observation_new_post: Re-order conditionals
Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2019-12-31 09:15:06 +00:00
Fabian P. Schmidt c70bf410a0 settings: Use python3-compatible octal literals (E396)
Fixes old-octal-literal (E396) pylint error.

Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2019-12-31 09:02:52 +00:00
Fabian P. Schmidt bfc0fd639b Add absolute_import to all relevant files (W1618)
Fixes no-absolute-import (W1618) pylint error.
Similar commit in db: librespacefoundation/satnogs/satnogs-db@d4fb5189d19aa7fc12e1adcfbc7b3ca07452fed6

Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2019-12-31 08:51:04 +00:00
Fabian P. Schmidt 5fa1a47871 pylint: Annotate pylintrc
Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2019-12-30 22:46:24 +01:00
Kevin Pak 50673b5345 Add satnogs-network version number to footer. Placed function for version inside context_processors.py file.
Signed-off-by: Kevin Pak <kedpak10@gmail.com>
2019-12-30 11:05:08 +02:00
Fabian P. Schmidt 10b1292059 utils/community_discussion_details: Use requests instead of urllib2 (W1648)
Fixes a bad-python3-import pylint error (W1648) caused by using urllib2.

Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2019-12-30 08:46:37 +00:00
Fabian P. Schmidt b7a899c1f2 tests: Add test for community_get_discussion_details
Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2019-12-30 08:46:37 +00:00
Fabian P. Schmidt fbd4486081 views: Move community discussion details gathering to utils
Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2019-12-30 08:46:37 +00:00
Fabian P. Schmidt 4dc642da1c models/DemodData: Use python3-compatible codecs for hex encoding (W1646)
Fixes the invalid-str-codec pylint error (W1646).

Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2019-12-30 08:33:14 +00:00
Fabian P. Schmidt 1c3e0a01f4 docs: Add section on how-to run celery tasks manually
Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2019-12-30 08:23:59 +00:00
Fabian P. Schmidt 74137ce8d8 management/fetch_data: Add workaround for db API change
Fixes #698.

[patch v2: Added default 'None' to prevent KeyError when using an old
           DB API endpoint]
Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2019-12-30 08:14:03 +00:00
Fabian P. Schmidt 859653e004 views: Fix key in dictionary check (W1655)
Fixes dict-keys-not-iterating (W1655) pylint error.

Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2019-12-29 16:25:56 +01:00
Alfredos-Panagiotis Damkalis f839111661 Allow only POST method for transmitters request
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2019-12-28 18:50:13 +02:00
Alfredos-Panagiotis Damkalis 68e87e6d78 Run sync_to_db task from transmitter admin page
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2019-12-21 22:36:28 +02:00
Alfredos-Panagiotis Damkalis edfb25556f Sync demoddata to DB on upload
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2019-12-21 22:36:28 +02:00
Alfredos-Panagiotis Damkalis 991330fdb8 Remove time limit in sync_to_db task
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2019-12-21 22:36:28 +02:00
Alfredos-Panagiotis Damkalis 69b694b5df Remove periodic run of sync_to_db task
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2019-12-21 22:36:28 +02:00
Corey Shields 5948cc6442 Stop crawlers from traversing observations
The hits are a little much, and unnecessary.
 
Signed-off-by: Corey Shields <cshields@gmail.com>
2019-12-21 11:37:41 -05:00
Alfredos-Panagiotis Damkalis b43dd4cf4d Fix regression of end filter in observations page
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2019-12-20 17:27:43 +02:00
Vasilis Tsiligiannis c0bf3ac42d docker-compose: Preserve databases data in volumes
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-12-20 02:54:58 +02:00
Vasilis Tsiligiannis f76a4e19c6 docker-compose: Replace deprecated links with service dependencies
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-12-20 01:57:54 +02:00
Vasilis Tsiligiannis 3803d0e45b docker-compose: Bump 'redis' version
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-12-20 01:53:18 +02:00