Releases: JGreenlee/e-mission-common
0.5.0
-
overhaul of
metrics_summaries
: e-mission/e-mission-server#966 (comment)generate_summaries
now needs app config as argumentmetric_list
is now a mapping of metric names to grouping fields instead of just a list of metric names- the response can have metrics grouped by any or all of:
mode_confirm
,purpose_confirm
,replaced_mode_confirm
,primary_ble_sensed_mode
, andsurvey
-
patch to use either
primary_ble_sensed_mode
orconfirmedMode
when evaluating config'sshowsIf
conditions
Full Changelog: 0.4.4...0.5.0
0.4.4
- new function in ble_matching.py: primary_ble_sensed_mode_for_trip
- in package.json, marked this package as ES modules (otherwise, it causes issues with Jest tests on e-mission-phone)
Full Changelog: 0.4.3...0.4.4
0.4.3
bugfixes and cleanup in ble_matching.py
Full Changelog: 0.4.2...0.4.3
0.4.2
0.4.1
add "ble_matching" module
implements functions to determine ble_sensed_mode for a section by looking at BLE entries, finding the beacon that was most often scanned, and looking up the vehicle to which that beacon is assigned by the beacon's major:minor in hexadecimal.
Full Changelog: 0.4.0...0.4.1
0.4.0
- Changed repo structure again. Converted from a "flat layout" project to "src layout" project. https://packaging.python.org/en/latest/discussions/src-layout-vs-flat-layout/
index.py
now sits outside of "emcommon" (but inside "src"), which allows imports to use the full module name (fixing e-mission/em-public-dashboard#124 (comment))- Fixed issue with type annotations that Python 3.9 only partially supported
This release can actually be used in Python projects now, still as a pip
dependency:
dependencies:
- pip:
- git+https://github.com/JGreenlee/[email protected]
0.3.2
-
New and improved directory structure for the repo
-
It works as a
pip
package now and can be used as a dependency in a conda project's yml file like this:dependencies: - pip: - git+https://github.com/JGreenlee/[email protected]
-
It now exposes as an
npm
package from the root level instead of from a subdirectory -
Added a lot to the README, explaining usage
0.1.4
implement "SurveysSummary' module
This module allows us to create a 'summary' of how many survey responses have been completed vs. prompted, given a list of trips.
get_surveys_summary returns a dict in the form of:
{
'SurveyNameA': {
'answered': 4,
'unanswered': 3,
'mismatched': 0
},
'SuveryNameB': {
...
...
}
}
These totals represent the number of trips for which a survey was answered / unanswered / mismatched. "Mismatched" means the prompted survey and answered survey are not the same (this could happen if the config was updated causing a different survey to be assigned to the trip).
Calculating this requires us to determine which surveys are prompted for which trips, using the 'showsIf' expressions in the app config. This is handled in conditional_surveys.py, which is basically a Python implementation of conditionalSurveys.ts (added in e-mission/e-mission-phone#1129)
Additional discussion around evaluating the expressions in Python: e-mission/e-mission-docs#1051 (comment)
0.1.3
patch: 0.1.3
Commented out all uses of the @memoize
decorator.
I thought this decorator would improve performance, but it is actually causing significant slowness when memoized functions are called in JS. Maybe something to do with how **kwargs is handled when converting to JS.
May reinstate later with a JS-specific implementation.