Releases: Flowminder/FlowKit
Releases · Flowminder/FlowKit
0.6.0
Added
- Added new flowclient API entrypoint,
aggregate_network_objects, to access equivalent flowmachine query #601 - FlowAPI now exposes the API spec at the
spec/openapi.jsonendpoint, and an interactive version of the spec at thespec/redocendpoint - Added Makefile target
make up-no_build, to spin up all containers without building the images - Added
resync_redis_with_cachefunction to cache utils, to allow administrators to align redis with FlowDB #636 - Added new flowclient API entrypoint,
radius_of_gyration, to access (with simplified parameters) equivalent flowmachine queryRadiusOfGyration#602
Changed
- The
periodargument toTotalNetworkObjectsin FlowMachine has been renamedtotal_by - The
periodargument tototal_network_objectsin FlowClient has been renamedtotal_by - The
byargument toAggregateNetworkObjectsin FlowMachine has been renamed toaggregate_by - The
stop_dateargument to themodal_location_from_datesandmeaningful_locations_*functions in FlowClient has been renamedend_date#470 get_result_by_query_idnow accepts apoll_intervalargument, which allows polling frequency to be changedRadiusOfGyrationnow returns avaluecolumn instead of anrogcolumnTotalNetworkObjectsandAggregateNetworkObjectsnow return avaluecolumn, rather thanstatistic_name- All environment variables are now in a single
development_environmentfile in the project root, development environment setup has been simplified - Default FlowDB users for FlowMachine and FlowAPI have changed from "analyst" and "reporter" to "flowmachine" and "flowapi", respectively
- Docs and integration tests now use top level compose file
- The following environment variables have been renamed:
FLOWMACHINE_SERVER(FlowAPI) ->FLOWMACHINE_HOSTFM_PASSWORD(FlowDB),FLOWDB_PASS(FlowMachine) ->FLOWMACHINE_FLOWDB_PASSWORDAPI_PASSWORD(FlowDB),FLOWDB_PASS(FlowAPI) ->FLOWAPI_FLOWDB_PASSWORDFM_USER(FlowDB),FLOWDB_USER(FlowMachine) ->FLOWMACHINE_FLOWDB_USERAPI_USER(FlowDB),FLOWDB_USER(FlowAPI) ->FLOWAPI_FLOWDB_USERLOG_LEVEL(FlowMachine) ->FLOWMACHINE_LOG_LEVELLOG_LEVEL(FlowAPI) ->FLOWAPI_LOG_LEVELDEBUG(FlowDB) ->FLOWDB_DEBUGDEBUG(FlowMachine) ->FLOWMACHINE_SERVER_DEBUG_MODE
- The following Docker secrets have been renamed:
FLOWAPI_DB_USER->FLOWAPI_FLOWDB_USERFLOWAPI_DB_PASS->FLOWAPI_FLOWDB_PASSWORDFLOWMACHINE_DB_USER->FLOWMACHINE_FLOWDB_USERFLOWMACHINE_DB_PASS->FLOWMACHINE_FLOWDB_PASSWORDPOSTGRES_PASSWORD_FILE->POSTGRES_PASSWORDREDIS_PASSWORD_FILE->REDIS_PASSWORD
statusenum in FlowDB renamed toetl_statusreset_cachenow requires a redis client argument
Fixed
- Fixed being unable to add new users or servers when running FlowAuth with a Postgres database #622
- Resetting the cache using
reset_cachewill now reset the state of queries in redis as well #650 - Fixed
modestatistic forAggregateNetworkObjects#651
Removed
- Removed
docker-compose-dev.yml, and docker-compose files indocs/,flowdb/tests/andintegration_tests/. - Removed
Dockerfile-devDockerfiles - Removed
ENVdefaults from the FlowMachine Dockerfile - Removed
POSTGRES_DBenvironment variable from FlowDB Dockerfile, database name is now hardcoded asflowdb
0.5.3
Added
- Added new
spatial_aggregateAPI endpoint and FlowClient function #599 - Implemented new flowclient API entrypoint, total_network_objects(), to access (with simplified parameters) equivalent flowmachine query #581
- Implemented new flowclient API entrypoint, location_introversion(), to access (with simplified parameters) equivalent flowmachine query #577
- Implemented new flowclient API entrypoint, unique_subscriber_counts(), to access (with simplified parameters) equivalent flowmachine query #562
- New schema
aggregatesand tableaggregates.aggregateshave been created for maintaining a record of the process and completion of scheduled aggregates. - New
joined_spatial_aggregateAPI endpoint and FlowClient function #600
Changed
daily_locationandmodal_locationquery types are no longer accepted as top-level queries, and must be wrapped usingspatial_aggregateJoinedSpatialAggregateno longer accepts positional argumentsJoinedSpatialAggregatenow supports "avg", "max", "min", "median", "mode", "stddev" and "variance" stats
Fixed
total_network_objectsno longer returns results fromAggregateNetworkObjects#603
0.5.2
0.5.1
Added
- Added
HandsetStatsto FlowMachine. - Added new
ContactReferenceLocationStatsquery class to FlowMachine. - A new zmq message
get_available_dateswas added to the flowmachine server, along with the/available_dates
endpoint in flowapi and the functionget_available_dates()in flowclient. These allow to determine the dates
that are available in the database for the supported event types.
Changed
- FlowMachine's debugging logs are now from a single logger (
flowmachine.debug) and include the submodule in the submodule field instead of using it as the logger name - FlowMachine's query run logger now uses the logger name
flowmachine.query_run_log - FlowAPI's access, run and debug loggers are now named
flowapi.access,flowapi.queryandflowapi.debug - FlowAPI's access and run loggers, and FlowMachine's query run logger now log to stdout instead of stderr
- Passwords for Redis and FlowDB must now be explicitly provided to flowmachine via argument to
connect, env var, or secret
Removed
- FlowMachine and FlowAPI no longer support logging to a file
0.5.0
Added
- The flowmachine python library is now pip installable (
pip install flowmachine) - The flowmachine server now supports additional actions:
get_available_queries,get_query_schemas,ping. - Flowdb now contains a new
dfsschema and associated tables to process mobile money transactions.
In addition,flowdb_testdatacontains sample data for DFS transactions. - The docs now include three worked examples of CDR analysis using FlowKit.
- Flowmachine now supports calculating the total amount of various DFS metrics (transaction amount,
commission, fee, discount) per aggregation unit during a given date range. These metrics are also
exposed in FlowAPI via the query kinddfs_metric_total_amount.
Changed
- The JSON structure when setting queries running via flowapi or the flowmachine server has changed:
query parameters are now "inlined" alongside thequery_kindkey, rather than nested using a separateparamskey.
Example:- previously:
{"query_kind": "daily_location", "params": {"date": "2016-01-01", "aggregation_unit": "admin3", "method": "last"}}, - now:
{"query_kind": "daily_location", "date": "2016-01-01", "aggregation_unit": "admin3", "method": "last"}
- previously:
- The JSON structure of zmq reply messages from the flowmachine server was changed.
Replies now have the form:{"status": "[success|error]", "msg": "...", "payload": {...}. - The flowmachine server action
get_sqlwas renamed toget_sql_for_query_result. - The parameter
daily_location_methodwas renamed tomethod.
0.4.3
Added
- When running integration tests locally, normally pytest will automatically spin up servers for flowmachine and flowapi as part of the test setup.
This can now be disabled by setting the environment variableFLOWKIT_INTEGRATION_TESTS_DISABLE_AUTOSTART_SERVERS=TRUE. - The integration tests now use the environment variables
FLOWAPI_HOST,FLOWAPI_PORTto determine how to connect to the flowapi server. - A new data generator has been added to the synthetic data container which supports more data types, simple disaster simulation, and more plausible behaviours as well as increased performance
Changed
- FlowAPI now reports queued/running status for queries instead of just accepted
- The following environment variables have been renamed:
DB_USER->FLOWDB_USERDB_USER->FLOWDB_HOSTDB_PASS->FLOWDB_PASSDB_PW->FLOWDB_PASSAPI_DB_USER->FLOWAPI_DB_USERAPI_DB_PASS->FLOWAPI_DB_PASSFM_DB_USER->FLOWMACHINE_DB_USERFM_DB_PASS->FLOWMACHINE_DB_PASS
- Added
numerator_directiontoProportionEventTypeto allow for proportion of directed events.
Fixed
- Server no longer loses track of queries under heavy load
TopUpBalancesno longer always uses entire topups table
Removed
- The environment variable
DB_NAMEhas been removed.
0.4.2
0.4.1
0.4.0
Added
- Dockerised development setup, with support for live reload of
flowmachineandflowapiafter source code changes. - Pre-commit hook for Python formatting with black.
- Added new
IntereventPeriod,ContactReciprocal,ProportionContactReciprocal,ProportionEventReciprocal,ProportionEventType,MDSVolumequery classes to FlowMachine.
Changed
CustomQuerynow requires column names to be specified- Query classes are now required to declare the column names they return via the
column_namesproperty - FlowDB test data and synthetic data images are now available from their own Docker repos (Flowminder/flowdb-testdata, Flowminder/flowdb-synthetic-data)
- Changed query class name from
NocturnalCallstoNocturnalEvents.
Removed
- Arbitrary
Flowmaths EdgeListquery type- Removes query class
ProportionOutgoingas it becomes redundant with the the introduction ofProportionEventType.
0.3.0
Added
-
API route for retrieving geography data from FlowDB
-
Aggregated meaningful locations are now available via FlowAPI
-
Origin-destination matrices between meaningful locations are now available via FlowAPI
-
Added new
MeaningfulLocations,MeaningfulLocationsAggregateandMeaningfulLocationsODquery classes to FlowMachine
Changed
- Constructors for
HartiganCluster,LabelEventScore,EventScoreandCallDaysnow have different signatures - Restructured and extended documentation; added high-level overview and more targeted information for different types of users