Wykres commitów

97 Commity (91ec97015fb9974308722b6f0873e6c57a78cb12)

Autor SHA1 Wiadomość Data
Konstantin Gründger 9b4a0124e8 flake8 fixes 2016-02-11 08:08:11 +01:00
Konstantin Gründger f3da85576c Fix: receiver sometimes not added 2016-02-11 07:40:36 +01:00
Konstantin Gründger eb772bdc92 Fix: "" is not "null()" (sqlalchemy) or "None" (python) 2016-02-05 07:20:58 +01:00
Fabian P. Schmidt 65aefc39a4 collect/receiver: Improve formatting 2016-02-04 23:12:16 +01:00
Konstantin Gründger 23a364761f fixed flake8 2016-02-04 19:14:31 +01:00
Konstantin Gründger 0cd46d2be2 Moved receiver update from ogn.collect.database to ogn.collect.receiver 2016-02-04 18:31:58 +01:00
Konstantin Gründger 528bcd8e91 Removed obsolete string formatting operations 2016-02-03 23:22:04 +01:00
Konstantin Gründger 018ea8c549 Changed obsolete string formatting operations 2016-02-03 23:19:25 +01:00
Konstantin Gründger b135a9dfd0 Update receivers 2016-02-03 23:09:11 +01:00
Fabian P. Schmidt d8046043ae CLI: Add command db.upgrade
This command is a shortcut for "alembic upgrade head".
2016-01-31 02:25:21 +01:00
Fabian P. Schmidt 81f05c2102 celery: Add missing ogn.collect.heatmap 2016-01-29 08:12:28 +01:00
Fabian P. Schmidt 31b2aaddda celery: Add scheduled task update_beacon_receiver_distance
Celery beat is used to call update_beacon_receiver_distance_all
every five minutes.
The time interval is configurable by adjusting the configuration file.
2016-01-29 06:42:56 +01:00
Fabian P. Schmidt ae3788764d celery: Add task update_beacon_receiver_distance
Replaces ogn.commands.dbutils.update_receiver_childs
2016-01-29 06:42:56 +01:00
Fabian P. Schmidt d3c38924e2 ogn/utils.py: Rename wgs84_to_sphere to haversine_distance 2016-01-29 06:42:56 +01:00
Konstantin Gründger 6cc6378496 Add (slow) [radius, theta, phi] calculation 2016-01-29 03:47:58 +01:00
Fabian P. Schmidt e22e6a619e gateway: Add logging of dropped packets 2016-01-29 03:44:21 +01:00
Fabian P. Schmidt 794ab5748f CLI: Move alembic imports inside the calling function
Reduces execution time of "manage.py" a bit.

An import of alembic.config takes a relatively long time and
"manage.py" by itself is slow.
2016-01-29 03:44:21 +01:00
Fabian P. Schmidt 6aec9ee35d Add central configuration by python modules
Configuration module is loaded from environment variable
OGN_CONFIG_MODULE, defaults to "config/defaults.py".
2016-01-29 03:44:20 +01:00
Konstantin Gründger 539630ea91 persist relevant receiver_beacon data 2016-01-21 23:18:02 +01:00
Fabian P. Schmidt d5dfbc6ea1 logbook.py: Add missing keyword "return"
Bug introduced in 15bcbc2971.
2016-01-12 22:33:37 +01:00
Fabian P. Schmidt 15bcbc2971 logbook.py: Fix PEP8
"Always use a def statement instead of an assignment statement  that
binds a lambda expression directly to a name."
2016-01-12 22:27:23 +01:00
Fabian P. Schmidt 07bde91c59 Add "NOT IMPLEMENTED" to show.receiver.list_all
In fact, the command is correctly implemented
but the receiver table is always empty.
2016-01-12 19:28:03 +01:00
Fabian P. Schmidt 0d30b141c6 CLI: Add command db.drop 2016-01-12 18:36:08 +01:00
Fabian P. Schmidt 6222e13225 Stamp alembic version at db.init 2016-01-12 18:35:33 +01:00
Fabian P. Schmidt 3a0a91527f Add setup.py to create a package
Fixes glidernet/ogn-python#16.
2016-01-12 13:56:18 +01:00
Fabian P. Schmidt 2febeb11f4 ogn/model: suppress 'unused import' warnings
Ignore 'unused import' warnings from flake8 for ogn/model/__init__.py
2016-01-06 00:37:54 +01:00
Fabian P. Schmidt aaa75e2fdc ogn/collect/database: Fix imports 2016-01-06 00:36:38 +01:00
Fabian P. Schmidt 4baeb83516 Cleanup 2016-01-06 00:23:45 +01:00
Fabian P. Schmidt d5dc94903d utils: Remove unused wgs84_to_sphere
Use an external package[1] instead.

[1]: eg. https://pypi.python.org/pypi/haversine
2016-01-06 00:06:27 +01:00
Konstantin Gründger 7fb4763422 Forgotten debug statement 2015-12-16 19:58:05 +01:00
Konstantin Gründger 15d12d0d82 Fix test 2015-12-16 18:29:08 +01:00
Fabian P. Schmidt 757e9143a8 aprs_utils: Raise AmbigousTimeError for outdated packets
The aprs string only contains time information, no date.
Manual date correction is applied +-one hour around midnight.
Thus, packets older than one hour are dropped.
2015-12-10 17:44:13 +01:00
Fabian P. Schmidt 2e224a16b5 Add user-defined exception AmbigousTimeError 2015-12-10 17:40:23 +01:00
Konstantin Gründger 60745fb6f3 Bugfixed createTimestamp 2015-12-10 07:43:18 +01:00
Fabian P. Schmidt b3e1f7b0a7 CLI: Remove celery dependency for simple tasks
Only `logbook.compute` still requires a running celery backend.

The celery tasks 'update_ddb_from_*' were renamed to
'database.import_ddb' and 'database.import_file'.
2015-12-09 12:07:55 +01:00
Fabian P. Schmidt 27db22d8c8 CLI: Rename 'db.stats' to 'show.devices.stats' 2015-12-09 12:07:55 +01:00
Fabian P. Schmidt 5e01e235cb Remove duplicated example file 'custom_ddb.txt'
The other example file remains at './tests/custom_ddb.txt'.
2015-12-09 12:07:55 +01:00
Fabian P. Schmidt 8313ac180c Model: Fix hyphenation of keyword 'user_defined' 2015-12-09 12:07:47 +01:00
Fabian P. Schmidt cb3ebf4988 Model: Change type of AddressOrigin again.
Fixes db.update_ddb_ogn by removing the type Enum of AddressOrigin.

Partly reverts commit 04137acaf6 since
this commit broke db.update_ddb_ogn.
2015-12-09 02:50:27 +01:00
Konstantin Gründger 93ac44e574 Devices stats 2015-12-02 12:52:16 +01:00
Fabian P. Schmidt 04137acaf6 Model: Change type of AddressOrigin to Enumeration. 2015-12-02 12:51:08 +01:00
Fabian P. Schmidt bebf11edf3 ogn.utils: Add get_trackable. 2015-12-01 20:41:29 +01:00
Fabian P. Schmidt ff02699f7c gateway: Use the correct aprs port.
For client-defined filters, use port 14580;
for full-feed, use port 10152.
2015-11-30 15:26:20 +01:00
Fabian P. Schmidt 81fccc154e gateway: Add callback 'process_beacon'
This change enables us to define a custom callback which is
called when the gateway receives a packet
(e.g. save the incoming beacon in a database and generate
some statistics/aggregate data).
2015-11-30 15:11:10 +01:00
Fabian P. Schmidt 851559aced Logging: Enable custom logfile location. 2015-11-30 15:03:38 +01:00
Fabian P. Schmidt 6af31fe7a7 Move ogn client (gateway) to a separate file.
The documentation[1] says:
> In the simplest case, __init__.py can just be an empty file,
> but it can also execute initialization code for the package or
> set the __all__ variable, described later.

A class like 'ognGateway' can't be considered 'initialization code'.

[1]: https://docs.python.org/3/tutorial/modules.html#packages
2015-11-29 21:59:34 +01:00
Fabian P. Schmidt 57f51ec111 Fix pep8 again. 2015-11-29 21:52:21 +01:00
Fabian P. Schmidt 316f71c8e4 Fix pep8. 2015-11-29 21:37:41 +01:00
Fabian P. Schmidt b391fca45b Fix show.receiver statistics.
Use current time for calculations,
not the start-time of celery.
2015-11-29 21:23:25 +01:00
Konstantin Gründger c5693ba00e IDs to address 2015-11-27 21:29:00 +01:00