Skip to content

Commit

Permalink
Merge pull request #94 from e-mission/main
Browse files Browse the repository at this point in the history
Merging changes from main
  • Loading branch information
nataliejschultz authored Apr 18, 2024
2 parents a0ccaf7 + 57eddc1 commit 38bd88e
Show file tree
Hide file tree
Showing 43 changed files with 4,403 additions and 688 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/add-new-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ body:
attributes:
label: Custom Labels
description: If you chose false above, and want drowdown style labeling, please provide the file name for your custom labels. You will need to submit a PR to add it to our repo - https://github.com/e-mission/nrel-openpath-deploy-configs/tree/main/label_options
placeholder: https://raw.githubusercontent.com/e-mission/nrel-openpath-deploy-configs/main/label_options/example-program-label-options.json
placeholder: example-program-label-options.json

- type: markdown
attributes:
Expand Down Expand Up @@ -510,7 +510,7 @@ body:
id: admin_access
attributes:
label: Admin Access Emails
description: Please enter a comman separated list of emails to which we will grant access to the admin dashboard. This will usually be a relatively short list.
description: Please enter a comma separated list of emails to which we will grant access to the admin dashboard. [MAX 5]
validations:
required: true
# - type: dropdown
Expand Down
1 change: 1 addition & 0 deletions .github/actions/convertIssue/issue-to-json.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export async function issueToJson() {
await mkdir(outputDir, { recursive: true });

let abbrevKey = getInput("hash-property-name");
abbrevKey = abbrevKey.toLowerCase();
let fileName = getFileName(configData[ abbrevKey ]);
await writeFile(path.join(outputDir, fileName), JSON.stringify(configData, null, 2));
} catch (error) {
Expand Down
22 changes: 18 additions & 4 deletions .github/actions/convertIssue/parse-issue-body.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ function getSurveyInfo(dataObject) {
UserProfileSurvey: {
formPath:
"https://raw.githubusercontent.com/e-mission/nrel-openpath-deploy-configs/main/survey_resources/" +
dataObject.url_abbreviation +
dataObject.url_abbreviation+
"/" +
dataObject.custom_dem_survey_path,
version: 1,
Expand Down Expand Up @@ -265,6 +265,9 @@ export async function parseIssueBody(githubIssueTemplateFile, body) {
let bodyData = parseBodyData(body);
let combinedObject = parseCombined(fields, bodyData);

// must be lower case
combinedObject.url_abbreviation = combinedObject.url_abbreviation.toLowerCase();

//then compose the config object
let configObject = {};
try {
Expand All @@ -275,11 +278,14 @@ export async function parseIssueBody(githubIssueTemplateFile, body) {
let connect_url =
"https://" + combinedObject.url_abbreviation + "-openpath.nrel.gov/api/";
configObject["server"] = {
connectURL: connect_url,
connectUrl: connect_url,
aggregate_call_auth: "user_only",
}; //TODO check options for call + add to form?

let subgroups = combinedObject.subgroups.split(",");
let subgroups = combinedObject.subgroups.split(",").map(item => item.trim());
if (subgroups.length == 1 && subgroups[0] == "") {
subgroups = ["default", "test"];
}
configObject["opcode"] = {
autogen: cleanBoolean(combinedObject.autogen),
subgroups: subgroups,
Expand Down Expand Up @@ -353,7 +359,15 @@ export async function parseIssueBody(githubIssueTemplateFile, body) {
}

//list of administrator emails
configObject['admin_dashboard'].admin_access = combinedObject.admin_access.split(',');
let email_list = combinedObject.admin_access.split(',');
if (email_list.length > 5){
setFailed("sorry, admin access is limited to a maximum of 5 emails, please shorten your list of emails");
}
// leading/trailing whitespace will lead to errors
for (let i = 0; i < email_list.length; i++) {
email_list[i] = email_list[i].trim();
}
configObject['admin_dashboard'].admin_access = email_list;

//TODO: add handling for custom reminder schemes

Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/issue-to-json.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,13 @@ jobs:
id: cpr
uses: peter-evans/create-pull-request@v5
with:
add-paths: |
configs/
commit-message: Create or update a new config file
signoff: false
branch: new-config
branch: new-config-#${{ env.IssueNumber }}
delete-branch: false
title: '[Config] create new file'
title: '[Config #${{ env.IssueNumber }}] create new file'
body: |
Adding a new config file
- Initialized by creating or updating the coressponding issue
Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@ Automation has been introduced for creating new config files. New deployers can
Info for parthers: [in the docs](https://github.com/e-mission/e-mission-docs/tree/master/docs/use/start_a_project.md)
Info for developers: [in the docs](https://github.com/e-mission/e-mission-docs/tree/master/docs/dev/future/more_custom_auto_config.md)

Config file submission will begin the process of creating an admin dashboard and associated user pool for the project. In order to log in, users will need to generate an account. This process will be automated, but may occasionally need to be run manually if there are errors in the initial config submission. To generate an account, users will need to install boto3. Please install boto3 in your virtualenv, conda env, or local machine per your preferences:

#Run the following command in terminal:

`pip install boto3`

#Run the email-config.py script, and pass the path to the config file in as an argument:

`python email-config.py -l /path/to/configfile.nrel-op.json`

An email with instructions + admin dashboard link will be sent to all emails listed in the admin access section.

### Reviewing and testing
- contact us by email at [email protected] for access to staging apps (Android or IOS)
- also reach out to recieve an OPcode for stage study or stage program
Expand Down
101 changes: 101 additions & 0 deletions configs/cosa-ebike-project.nrel-op.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
{
"url_abbreviation": "cosa-ebike-project",
"version": 1,
"ts": 1710526862150,
"server": {
"connectUrl": "https://cosa-ebike-project-openpath.nrel.gov/api/",
"aggregate_call_auth": "user_only"
},
"opcode": {
"autogen": true,
"subgroups": [
"default",
"test"
]
},
"intro": {
"program_or_study": "program",
"start_month": "02",
"start_year": "2024",
"mode_studied": "e-bike",
"program_admin_contact": "Ricardo Ambriz, [email protected], 210-207-6888",
"deployment_partner_name": "City of San Antonio",
"translated_text": {
"en": {
"deployment_partner_name": "City of San Antonio",
"deployment_name": "Low-Income E-bike Rebate Pilot Program",
"summary_line_1": "The City of San Antonio's Office of Sustainability (OS) is interested in promoting sustainable transportation choices for San Antonio residents, including e-bikes to reduce greenhouse gas emissions.",
"summary_line_2": "The City of San Antonio’s Low-Income E-bike Rebate Pilot Program will promote sustainable transportation in San Antonio and help achieve the goal of decreasing greenhouse gas emissions in the transportation sector while increasing community resiliency, prioritizing disadvantaged communities, consistent with the Justice40 Initiative, which seeks to build a clean and equitable energy economy.",
"summary_line_3": "The Low-Income E-bike Rebate Pilot Program will increase access to reliable transportation for residents of disadvantaged communities in San Antonio by subsidizing the cost of an electric bicycle, or e-bike. Lowering the barrier to access reliable transportation will help these new e-bike owners to use the transportation system to access economically, socially, and environmentally valuable locations.",
"short_textual_description": "The City of San Antonio is interested in gathering data on e-bike usage from participants in its Low-Income E-bike Rebate Pilot Program which offers incentives for San Antonio residents to affordably purchase e-bikes.",
"why_we_collect": "The City of San Antonio hopes to use this information to better understand how e-bikes are used including distance traveled, trips made, the associated emissions reduction and potential equity impacts.",
"research_questions": [
"How will these e-bikes be used by the study participants?",
"What trips (mode of transportation, length of trip) will be replaced with the e-bike by the participant?",
"Will participant be able to utilize the e-bike for trips that otherwise would not be taken?"
]
},
"es": {
"deployment_partner_name": "Ciudad de San Antonio",
"deployment_name": "Programa piloto de reembolso de bicicletas eléctricas para personas de bajos ingresos",
"summary_line_1": "La Oficina de Sostenibilidad (OS) de la ciudad de San Antonio está interesada en promover opciones de transporte sostenible para los residentes de San Antonio, incluidas bicicletas eléctricas para reducir las emisiones de gases de efecto invernadero.",
"summary_line_2": "El Programa Piloto de Reembolso de Bicicletas Eléctricas para Personas de Bajos Ingresos de la Ciudad de San Antonio promoverá el transporte sostenible en San Antonio y ayudará a lograr el objetivo de disminuir las emisiones de gases de efecto invernadero en el sector del transporte mientras aumenta la resiliencia de la comunidad, dando prioridad a las comunidades desfavorecidas, en consonancia con la Iniciativa Justice40. que busca construir una economía energética limpia y equitativa.",
"summary_line_3": "El Programa Piloto de Reembolso de Bicicletas Eléctricas para Personas de Bajos Ingresos aumentará el acceso a transporte confiable para los residentes de comunidades desfavorecidas en San Antonio al subsidiar el costo de una bicicleta eléctrica o bicicleta eléctrica. Reducir la barrera para acceder a un transporte confiable ayudará a estos nuevos propietarios de bicicletas eléctricas a utilizar el sistema de transporte para acceder a lugares valiosos desde el punto de vista económico, social y ambiental.",
"short_textual_description": "La ciudad de San Antonio está interesada en recopilar datos sobre el uso de bicicletas eléctricas de los participantes en su Programa piloto de reembolso de bicicletas eléctricas para personas de bajos ingresos, que ofrece incentivos para que los residentes de San Antonio compren bicicletas eléctricas a precios asequibles.",
"why_we_collect": "La ciudad de San Antonio espera utilizar esta información para comprender mejor cómo se utilizan las bicicletas eléctricas, incluida la distancia recorrida, los viajes realizados, la reducción de emisiones asociada y los posibles impactos en la equidad.",
"research_questions": [
"¿Cómo utilizarán estas bicicletas eléctricas los participantes del estudio?",
"¿Qué viajes (modo de transporte, duración del viaje) sustituirá el participante por la bicicleta eléctrica?",
"¿Podrá el participante utilizar la bicicleta eléctrica para viajes que de otro modo no se realizarían?"
]
}
}
},
"survey_info": {
"surveys": {
"UserProfileSurvey": {
"formPath": "json/demo-survey-v2.json",
"version": 1,
"compatibleWith": 1,
"dataKey": "manual/demographic_survey",
"labelTemplate": {
"en": "Answered",
"es": "Contestada"
}
}
},
"trip-labels": "MULTILABEL"
},
"display_config": {
"use_imperial": true
},
"metrics": {
"include_test_users": true
},
"profile_controls": {
"support_upload": false,
"trip_end_notification": false
},
"admin_dashboard": {
"data_trips_columns_exclude": [],
"additional_trip_columns": [],
"data_uuids_columns_exclude": [],
"token_prefix": "nrelop",
"toekn_generate": "true",
"overview_users": true,
"overview_active_users": true,
"overview_trips": true,
"overview_signup_trends": true,
"overview_trips_trend": true,
"data_uuids": true,
"data_trips": true,
"map_heatmap": true,
"map_bubble": true,
"map_trip_lines": false,
"options_uuids": true,
"options_emails": true,
"admin_access": [
"[email protected]"
]
}
}
88 changes: 88 additions & 0 deletions configs/dcebike.nrel-op.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
{
"version": 1,
"ts": 1655143472,
"server": {
"connectUrl": "https://dcebike-openpath.nrel.gov/api/",
"aggregate_call_auth": "user_only"
},
"opcode": {
"autogen": true,
"subgroups": ["test", "default", "control"]
},
"intro": {
"program_or_study": "program",
"start_month": "01",
"start_year": "2024",
"mode_studied": "e-bike",
"program_admin_contact": "Katy Lang at the District Department of Transportation (email: [email protected], phone: 202-590-8349)",
"deployment_partner_name": "District Department of Transportation (DDOT)",
"translated_text": {
"en": {
"deployment_partner_name": "District Department of Transportation (DDOT)",
"deployment_name": "District Electric Bicycle Incentive Program",
"summary_line_1": "The District Department of Transportation (DDOT) and the Council of the District of Columbia aim to equitably increase e-bike ownership in the District and reduce carbon emissions from transportation.",
"summary_line_2": "The District Electric Bicycle Incentive Program provides vouchers and rebates to District residents for the purchase of an electric bicycle or electric cargo bicycle (“e- bike”).",
"summary_line_3": "If you are a program recipient, this app can help you log your trips and provide valuable information to the District on how e-bikes are being used.",
"short_textual_description": "As DDOT and the Council aim to equitably increase e-bike ownership in the District and empower residents with sustainable, affordable ways of getting around, DDOT would like to experiment with an automated (“passive”) trip tracking solution for understanding travel behavior. This program study can allow DDOT and its partner NREL to understand mode shifts and transportation patterns without complex, time-consuming surveys.",
"why_we_collect": "The data collected during the program will be used to understand how e-bikes are used by recipients, including when and how often as well as distance travelled. It will also help the District understand VMT and carbon reductions as a result of recipients' substituted travel.",
"research_questions": ["How much VMT is reduced from program recipients traveling by e-bike instead of driving?", "What is the number, frequency, and duration of rides from program recipients?", "How do e-bike recipients' travel patterns differ by demographics and/or location?"]
},
"es": {
"deployment_partner_name": "Departamento de Transporte del Distrito (DDOT)",
"deployment_name": "Programa distrital de incentivos para bicicletas eléctricas",
"summary_line_1": "El Departamento de Transporte del Distrito (DDOT) y el Consejo del Distrito de Columbia tienen como objetivo aumentar de manera equitativa la propiedad de bicicletas eléctricas en el Distrito y reducir las emisiones de carbono del transporte.",
"summary_line_2": "El Programa de incentivos para bicicletas eléctricas del distrito ofrece vales y reembolsos a los residentes del distrito por la compra de una bicicleta eléctrica o una bicicleta de carga eléctrica (“e-bike”).",
"summary_line_3": "Si es beneficiario del programa, esta aplicación puede ayudarlo a registrar sus viajes y brindar información valiosa al Distrito sobre cómo se utilizan las bicicletas eléctricas.",
"short_textual_description": "Mientras el DDOT y el Consejo apuntan a aumentar equitativamente la propiedad de bicicletas eléctricas en el Distrito y capacitar a los residentes con formas sostenibles y asequibles de desplazarse, al DDOT le gustaría experimentar con una solución de seguimiento de viajes automatizada (“pasiva”) para comprender el comportamiento de los viajes. Este estudio del programa puede permitir que el DDOT y su socio NREL comprendan los cambios de modo y los patrones de transporte sin realizar encuestas complejas y que requieran mucho tiempo.",
"why_we_collect" : "Los datos recopilados durante el programa se utilizarán para comprender cómo los destinatarios utilizan las bicicletas eléctricas, incluido cuándo y con qué frecuencia, así como la distancia recorrida. También ayudará al Distrito a comprender el VMT y las reducciones de carbono como resultado de los viajes sustituidos de los destinatarios.",
"research_questions": ["¿Cuánto se reduce el VMT a los beneficiarios del programa que viajan en bicicleta eléctrica en lugar de conducir?", "¿Cuál es el número, la frecuencia y la duración de los viajes de los beneficiarios del programa?", "¿En qué se diferencian los patrones de viaje de los destinatarios de bicicletas eléctricas según la demografía y/o la ubicación?"]
}

}
},
"survey_info": {
"surveys": {
"UserProfileSurvey": {
"formPath": "https://raw.githubusercontent.com/e-mission/nrel-openpath-deploy-configs/main/survey_resources/dcebike/dcebike-onboarding-v2.xml",
"version": 1,
"compatibleWith": 1,
"dataKey": "manual/demographic_survey",
"labelTemplate": {
"en": "Answered",
"es": "Contestada"
}
}
},
"trip-labels": "MULTILABEL"
},
"display_config": {
"use_imperial": true
},
"metrics": {
"include_test_users": true
},
"profile_controls": {
"support_upload": false,
"trip_end_notification": false
},
"admin_dashboard": {
"overview_users": true,
"overview_active_users": true,
"overview_trips": true,
"overview_signup_trends": true,
"overview_trips_trend": true,
"data_uuids": true,
"data_trips": true,
"data_trips_columns_exclude": ["data.start_loc.coordinates", "data.end_loc.coordinates"],
"additional_trip_columns": [],
"data_uuids_columns_exclude": [],
"token_generate": false,
"token_prefix": "nrelop",
"map_heatmap": true,
"map_bubble": true,
"map_trip_lines": false,
"push_send": false,
"options_uuids": true,
"options_emails": true
}
}
1 change: 1 addition & 0 deletions configs/denver-casr.nrel-op.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
"trip_end_notification": false
},
"admin_dashboard": {
"admin_access": ["[email protected]", "[email protected]", "[email protected]"],
"overview_users": true,
"overview_active_users": true,
"overview_trips": true,
Expand Down
Loading

0 comments on commit 38bd88e

Please sign in to comment.