Skip to content

Releases: JGreenlee/e-mission-common

0.5.0

22 May 03:39
Compare
Choose a tag to compare
  • overhaul of metrics_summaries: e-mission/e-mission-server#966 (comment)

    • generate_summaries now needs app config as argument
    • metric_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, and survey
  • patch to use either primary_ble_sensed_mode or confirmedMode when evaluating config's showsIf conditions

Full Changelog: 0.4.4...0.5.0

0.4.4

07 May 18:14
Compare
Choose a tag to compare
  • 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

02 May 20:29
Compare
Choose a tag to compare

bugfixes and cleanup in ble_matching.py

Full Changelog: 0.4.2...0.4.3

0.4.2

01 May 19:01
Compare
Choose a tag to compare

add `init.py`` to 'bluetooth'

Without an __init__.py, it is not recognized as a python module and cannot be used by e-mission-server

0.4.1

30 Apr 15:36
Compare
Choose a tag to compare

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

17 Apr 03:33
Compare
Choose a tag to compare

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

12 Apr 05:13
Compare
Choose a tag to compare
  • 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

09 Apr 18:51
Compare
Choose a tag to compare

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

02 Apr 20:59
Compare
Choose a tag to compare

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.

0.1.2

01 Apr 19:26
Compare
Choose a tag to compare
release: 0.1.2

- regenerated all JS
- bumped version