Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merging changes from main #94

Merged
merged 111 commits into from
Apr 18, 2024
Merged

Merging changes from main #94

merged 111 commits into from
Apr 18, 2024

Conversation

nataliejschultz
Copy link
Contributor

Merging changes from main so I can update email-config.py properly in my current PR

nataliejschultz and others added 30 commits November 7, 2023 23:25
Committing email-config.py.
Just pass the name of the file into terminal as an argument. Script should do the rest.
Push addresses the clean-up changes requested.

Adds a main function for code that should not be run outside of the file.

Adds authentication for sts client.

Simplifies get_userpool_name and user_already_exists functions

Updates format_email function to add further customization of welcome email based on admindash_prefs section of config
Removing an unnecessary print
- Added section to README emphasizing the need to install boto3 + other instructions on manually running script.

- Updated welcome email template's admindash link, as well as modified sentences per Shankari's suggestions.

- email-config.py: Removed comment, updated how email addresses are accessed in the config based on Abby's changes, and updated more welcome email language based on Shankari's suggestions.
main.yml will work with our IAM role in AWS to connect Cognito and SES with GitHub Actions
This workflow should run when a new file is added to the config directory. The dependency (Get config name) should get the name of the newly added file, which is passed in during Run email-config.py.
Updating the url to the admin dashboard in the welcome email.
Adding a line about installing boto3 in a venv or conda env as opposed to implying that it must be installed on the user's local machine.
 * email-config.py:

1. Adds support for -l vs -g args Modified client setup + get_verified_art function to be compatible with the specified arg.

2. Fixes issue with link to admin dashboard. It works now :)

3. Removed a section of the update_user_pool function per Jianli's request, since it was unnecessary.

4. Modified to allow full path to config file as input

* Updated README to reflect the local run `-l` arg, as well as the path to the config file.

* Removed the two workflow files, since they will be part of a different PR.
Updates to the script due to the work going on to automate the script.

Mainly updates working around the file path issues I've encountered in GitHub Actions.
using filepath_raw instead of relpath
removed print!
Path to the welcome template file needs to use maindir variable for both -l and -g runs.
Fixing the parsing issue for emails that we encountered during demo!
on a recent test, all the depedencies got committed, again

We ONLY want changes in the config folder, so we must specify the add-paths parameter
updating naming conditions to prevent duplication and keep track of the issue number
strip off the leading and trailing whitespace so the emails are valid

set a failure when the list is too long
rename to email_list (admin_list was duplicated) and actually instantiate the variable so the process works
based on review comment - #49 (comment)
comman -> comma
actions-user and others added 29 commits March 18, 2024 19:44
updating the survey from the default to a custom survey
…hanged

- COSA: remove blank user
- Denver CASR: add users
- DOEE bike: add Sooin
- Ride2own: add users
- Smart Commute: add users
This will allow us to test:
- conditional surveys (e-mission/e-mission-phone#1129, merged)
- configurable dashboard (e-mission/e-mission-docs#1055, still in progress)
Update `dfc-fermata` so we can test new UI features
We should use bracket notation for these expressions because it works with both JS objects and Python dicts
e-mission/e-mission-docs#1051 (comment)
`dfc-fermata`: Update "showsIf" conditions to use bracket notation
Adds 2 fields to the dynamic config (as described in e-mission/e-mission-docs#1062)

For vehicle identities, I have only added 1 so far: my own car with the Accent beacon I have in my possession.
I will configure this beacon with the UUID described here e-mission/e-mission-data-collection#220 (comment); and with the major and minor values I put in the config ("dfc0:fff0")
Will add others' vehicles once I have that information.

Also sets "tracking" . "bluetooth_only" to true, to signify that we will not track trips unless one of these vehicles is recognized.
Based on meeting last night, this admin needs access to verify labeling for a user and award them the incentive if appropriate
Added Abby's Prius, the 2 GSA Leafs, and the GSA Pacifica minivan.
Some of this info is incomplete; we are awaiting detailed vehicle info from GSA.
Add vehicles + beacon fields to `dfc-fermata` for next week's demo
adding plate #s and colors from updates received this morning
Finally!

First, the coordinates change from NREL Building 16 (which we were using for the purpose of testing) to DFC Building 40 (which is the actual location of the Fermata chargers).

Second, instead of using the 'sensed_mode_str' (which we were also doing for the purpose of testing), we can actually use the vehicle detected by bluetooth to show surveys conditionally.

These "showsIf" expressions work with the changes in e-mission/e-mission-phone#1145.
It will not work in Python yet; I am planning a way to do that later.

"confirmedMode" is either a vehicle detected by bluetooth, or the label chosen by the user. In this instance it is the former; it is one of the vehicles defined under "vehicle_identities" (or, for a trip where there was no vehicle detected, detected it is undefined).

Updating config version to 3 so we can receive these updates using the in-app config refresh feature!
Got MPG values from fueleconomy.gov for the cars I could (Abby's Katie's, and mine). Then calculated `kgCo2PerKm` values using the `mpg_to_co2_per_km` function from `e-mission-common`

```python
mpgs = {
    'car_katie_solara': 21,
    'car_jack_mazda3': 33,
    'car_abbys_prius': 48,
}

for car, mpg in mpgs.items():
    print(f"{car} has MPG {mpg} and CO2 per km {mpg_to_co2_per_km(mpg):.5f}")
```

```
car_katie_solara has MPG 21 and CO2 per km 0.26364
car_jack_mazda3 has MPG 33 and CO2 per km 0.16777
car_abbys_prius has MPG 48 and CO2 per km 0.11534
```

For the GSA vehicles, we don't know the model years yet, so it will have to wait

Since Louis's backpack is a fake vehicle, I just gave it 100 MPGe (in the ballpark for plug-in hybrids)
dfc-fermata: add Katie's Solara and Louis's Backpack
@nataliejschultz nataliejschultz merged commit 38bd88e into test_userpool_creation Apr 18, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants