Skip to content

Configurations for current OpenPATH deployments, published for transparency

License

Notifications You must be signed in to change notification settings

nataliejschultz/nrel-openpath-deploy-configs

 
 

Repository files navigation

Configuration files for current OpenPATH deployments

Publishing them on GitHub allows transparency around how they are configured. This may not be the long-term solution, but it allows us to make progress over the short/medium term.

Creating a new Config

Automation has been introduced for creating new config files. New deployers can now file a templated issue specifying their configuration, which will launch a GitHub Actions workflow with a pull request to add the new config to this repo. Additional steps may be required if they require additional customization of surveys or labels.

Info for parthers: in the docs Info for developers: in the docs

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

Programs vs studies

NREL OpenPATH supports both studies and programs. While most of the functionality is the same, studies and programs are subtly different - for example:

  • studies support autogenerated tokens, while programs require a token from the program admin
  • programs include a question for the mode that would have been used if the program intervention was not available

Stage study environment

If you are here to preview/review/beta test the app functionality, please use the stage study environment (see instructions above for requesting access)

Stage program environment

If you want to experiment with the stage environment for programs please use the stage program environment (see instructions above for requesting access)

If you are here to test out the app on your personal phone, please use the open-access environment (https://open-access-openpath.nrel.gov/join)

In general, if you are planning to keep the app installed for less than a day, please use stage so you don't pollute the real dataset.

Testing configs

As we test more config options, we sometimes need to be able to edit and load configs locally without pushing to github and waiting for a PR to be approved.

To accomplish this:

  • Change the download URL in www/js/config/dynamic_config.js to "http://localhost:9090/configs/"+label+".nrel-op.json"
  • Modify one of the existing configs OR create a new config and add it to docs/index.html
  • docker-compose -f docker-compose.dev.yml up -d
  • In the emulator, go to http://localhost:9090 and click on the appropriate link

File format

Config format (with default values) is:

{
    "version": 1,
    "server": {
        "url": "https://openpath-stage.nrel.gov/api/",
        "aggregate_call_auth": "user_only"
    },
    "intro": {
        "program_or_study": "study",
        "program_admin_contact": "K. Shankari",
        "deployment_partner_name": "National Renewable Energy Laboratory (NREL)",
        "translated_text": {
            "en": {
                "deployment_name": "Open Access Study",
                "summary_line_1": "enables people to track their travel modes and measure their associated energy use and emissions",
                "summary_line_2": "makes aggregated data on mode shares, trip frequencies, and carbon footprints available via a public dashboard",
                "summary_line_3": "serves as a control group while evaluating behavior change of programs.",
                "short_textual_description": "Transportation is the largest contributor to ...",
                "why_we_collect": "NREL can use this information to ....",
            },
            "es": {
....
            },
            "support_autogen_token": true,
        }
    }
    "display_config": {
        "use_imperial": false,
    },
    "profile_controls": {
        "support_upload": false,
        "trip_end_notification": false
    }
}

Development

This repo has some simple GitHub pages in the docs repo

If you want to experiment with them (e.g. by changing the format or the URL prefix), you can use the attached docker-compose.yml to serve the pages locally at http://localhost:9090

I found this useful while testing the QR code functionality on the devapp, which responds to the emission URL prefix, not nrelopenpath

About

Configurations for current OpenPATH deployments, published for transparency

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%