-
Notifications
You must be signed in to change notification settings - Fork 11
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
Polishing Changes to the Config Automation #49
Changes from all commits
459637f
e0fc996
85822c3
75b8236
d39aa9a
b3e217f
12a1f54
5456c9f
4d55809
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# this action is based on the action by zachleat on github (github-issue-to-json-file) | ||
# https://github.com/zachleat/github-issue-to-json-file/blob/main/action.yml | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Abby-Wheelis in general, we cannot use copy that does not explicity have a LICENSE. We can "adapt" based on it if the changes are sufficiently large. You might want to check with legal on whether this meets that threshold. |
||
|
||
name: New Config Issue to JSON | ||
description: Convert GitHub issues for new configs to JSON data files. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,253 @@ | ||
<?xml version="1.0"?> | ||
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:odk="http://www.opendatakit.org/xforms" xmlns:orx="http://openrosa.org/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
<h:head> | ||
<h:title>Trip confirm survey</h:title> | ||
<model odk:xforms-version="1.0.0"> | ||
<instance> | ||
<data id="snapshot_xml"> | ||
<start/> | ||
<end/> | ||
<destination_purpose/> | ||
<travel_mode/> | ||
<Total_people_in_trip_party>1</Total_people_in_trip_party> | ||
<Non_household_member_s_on_trip>0</Non_household_member_s_on_trip> | ||
<Vehicle_trip_Parking_location>1</Vehicle_trip_Parking_location> | ||
<Parking_cost>0</Parking_cost> | ||
<Total_toll_charges_p_uring_the_trip_AUD>0</Total_toll_charges_p_uring_the_trip_AUD> | ||
<Taxi_fees/> | ||
<n_modes/> | ||
<n_purposes/> | ||
<main_label/> | ||
<meta> | ||
<instanceID/> | ||
</meta> | ||
</data> | ||
</instance> | ||
<bind jr:preload="timestamp" jr:preloadParams="start" nodeset="/data/start" type="dateTime"/> | ||
<bind jr:preload="timestamp" jr:preloadParams="end" nodeset="/data/end" type="dateTime"/> | ||
<bind constraint="if(count-selected( /data/destination_purpose )!=1, if(selected( /data/destination_purpose , 'trip_not_valid'), 0, 1), 1)" jr:constraintMsg="A trip can either be valid or not valid, it cannot be both." nodeset="/data/destination_purpose" required="true()" type="string"/> | ||
<bind nodeset="/data/travel_mode" relevant="not(selected( /data/destination_purpose , 'Trip_not_valid'))" required="true()" type="string"/> | ||
<bind nodeset="/data/Total_people_in_trip_party" relevant="not(selected( /data/destination_purpose , 'Trip_not_valid'))" required="true()" type="string"/> | ||
<bind nodeset="/data/Non_household_member_s_on_trip" relevant="not(selected( /data/destination_purpose , 'Trip_not_valid'))" required="true()" type="string"/> | ||
<bind nodeset="/data/Vehicle_trip_Parking_location" relevant="selected( /data/travel_mode , 'Driver') and not(selected( /data/destination_purpose , 'Trip_not_valid'))" required="true()" type="string"/> | ||
<bind nodeset="/data/Parking_cost" relevant="( /data/Vehicle_trip_Parking_location = '4' or /data/Vehicle_trip_Parking_location = '3' or /data/Vehicle_trip_Parking_location = '5' or /data/Vehicle_trip_Parking_location = '997') and /data/destination_purpose != 'trip_not_valid'" required="true()" type="decimal"/> | ||
<bind nodeset="/data/Total_toll_charges_p_uring_the_trip_AUD" relevant="selected( /data/travel_mode , 'Driver') and not(selected( /data/destination_purpose , 'Trip_not_valid'))" required="true()" type="decimal"/> | ||
<bind nodeset="/data/Taxi_fees" relevant="selected( /data/travel_mode , 'Taxi') and not(selected( /data/destination_purpose , 'Trip_not_valid'))" required="true()" type="decimal"/> | ||
<bind calculate="count-selected( /data/travel_mode )" nodeset="/data/n_modes" required="false()" type="string"/> | ||
<bind calculate="count-selected( /data/destination_purpose )" nodeset="/data/n_purposes" required="false()" type="string"/> | ||
<bind calculate="concat("P: ", translate(translate( /data/destination_purpose , " ", ", "), "_", " "), "\nM: ", translate(translate( /data/travel_mode , " ", ", "), "_", " "))" nodeset="/data/main_label" required="false()" type="string"/> | ||
<bind jr:preload="uid" nodeset="/data/meta/instanceID" readonly="true()" type="string"/> | ||
</model> | ||
</h:head> | ||
<h:body class="pages"> | ||
<select ref="/data/destination_purpose"> | ||
<label>What were the purposes of this trip?</label> | ||
<hint>More than one purpose can be selected.</hint> | ||
<item> | ||
<label>Go Home</label> | ||
<value>Go_home</value> | ||
</item> | ||
<item> | ||
<label>Work Related</label> | ||
<value>Work_related</value> | ||
</item> | ||
<item> | ||
<label>Pick-up or Drop-off Someone</label> | ||
<value>Pick-up_or_drop-off_someone</value> | ||
</item> | ||
<item> | ||
<label>Buy Something</label> | ||
<value>Buy_something</value> | ||
</item> | ||
<item> | ||
<label>Education</label> | ||
<value>Education</value> | ||
</item> | ||
<item> | ||
<label>Social (eg. dine out, visit someone)</label> | ||
<value>Social</value> | ||
</item> | ||
<item> | ||
<label>Recreational (eg. exercise)</label> | ||
<value>Recreational</value> | ||
</item> | ||
<item> | ||
<label>Personal Business</label> | ||
<value>Personal_business</value> | ||
</item> | ||
<item> | ||
<label>Accompany Someone</label> | ||
<value>Accompany_someone</value> | ||
</item> | ||
<item> | ||
<label>Pick-up or Deliver Something</label> | ||
<value>Pick-up_or_deliver_something</value> | ||
</item> | ||
<item> | ||
<label>Change Mode</label> | ||
<value>Change_mode</value> | ||
</item> | ||
<item> | ||
<label>Other Purpose</label> | ||
<value>Other_purpose</value> | ||
</item> | ||
<item> | ||
<label>Trip not valid</label> | ||
<value>Trip_not_valid</value> | ||
</item> | ||
</select> | ||
<select ref="/data/travel_mode"> | ||
<label>What were the modes of transport used in this trip?</label> | ||
<hint>More than one transport mode can be selected.</hint> | ||
<item> | ||
<label>Vehicle driver</label> | ||
<value>Driver</value> | ||
</item> | ||
<item> | ||
<label>Vehicle passenger</label> | ||
<value>Passenger</value> | ||
</item> | ||
<item> | ||
<label>Walk</label> | ||
<value>Walk</value> | ||
</item> | ||
<item> | ||
<label>Bus</label> | ||
<value>Bus</value> | ||
</item> | ||
<item> | ||
<label>Train</label> | ||
<value>Train</value> | ||
</item> | ||
<item> | ||
<label>Ferry</label> | ||
<value>Ferry</value> | ||
</item> | ||
<item> | ||
<label>Tram</label> | ||
<value>Tram</value> | ||
</item> | ||
<item> | ||
<label>Taxi and ride-sharing (e.g. Uber)</label> | ||
<value>Taxi</value> | ||
</item> | ||
<item> | ||
<label>Bicycle</label> | ||
<value>Bike</value> | ||
</item> | ||
<item> | ||
<label>Motorcycle</label> | ||
<value>Motorbike</value> | ||
</item> | ||
<item> | ||
<label>Other</label> | ||
<value>Other</value> | ||
</item> | ||
</select> | ||
<select1 ref="/data/Total_people_in_trip_party"> | ||
<label>Total people in trip party</label> | ||
<hint>Including yourself</hint> | ||
<item> | ||
<label>Just me</label> | ||
<value>1</value> | ||
</item> | ||
<item> | ||
<label>2 Travelers</label> | ||
<value>2</value> | ||
</item> | ||
<item> | ||
<label>3 Travelers</label> | ||
<value>3</value> | ||
</item> | ||
<item> | ||
<label>4 Travelers</label> | ||
<value>4</value> | ||
</item> | ||
<item> | ||
<label>5 Travelers</label> | ||
<value>5</value> | ||
</item> | ||
<item> | ||
<label>6 Travelers</label> | ||
<value>6</value> | ||
</item> | ||
<item> | ||
<label>7 Travelers</label> | ||
<value>7</value> | ||
</item> | ||
<item> | ||
<label>8+ Travelers</label> | ||
<value>8</value> | ||
</item> | ||
</select1> | ||
<select1 ref="/data/Non_household_member_s_on_trip"> | ||
<label>Non-household member(s) on trip</label> | ||
<item> | ||
<label>Nobody (0 people)</label> | ||
<value>0</value> | ||
</item> | ||
<item> | ||
<label>1 person</label> | ||
<value>1</value> | ||
</item> | ||
<item> | ||
<label>2 people</label> | ||
<value>2</value> | ||
</item> | ||
<item> | ||
<label>3 people</label> | ||
<value>3</value> | ||
</item> | ||
<item> | ||
<label>4 people</label> | ||
<value>4</value> | ||
</item> | ||
<item> | ||
<label>5 or more people</label> | ||
<value>5</value> | ||
</item> | ||
</select1> | ||
<select1 ref="/data/Vehicle_trip_Parking_location"> | ||
<label>Vehicle trip: Parking location</label> | ||
<item> | ||
<label>Own driveway/garage</label> | ||
<value>1</value> | ||
</item> | ||
<item> | ||
<label>Someone else's driveway</label> | ||
<value>2</value> | ||
</item> | ||
<item> | ||
<label>Parking lot/garage</label> | ||
<value>3</value> | ||
</item> | ||
<item> | ||
<label>On street parking</label> | ||
<value>4</value> | ||
</item> | ||
<item> | ||
<label>Park & ride lot</label> | ||
<value>5</value> | ||
</item> | ||
<item> | ||
<label>Didn't park (waited, drop-off, drive-thru)</label> | ||
<value>6</value> | ||
</item> | ||
<item> | ||
<label>Other</label> | ||
<value>997</value> | ||
</item> | ||
</select1> | ||
<input ref="/data/Parking_cost"> | ||
<label>Parking cost ($AUD)</label> | ||
<hint>(If none, put 0 )</hint> | ||
</input> | ||
<input ref="/data/Total_toll_charges_p_uring_the_trip_AUD"> | ||
<label>Total toll charges paid during the trip? ($AUD)</label> | ||
<hint>(If none, put 0)</hint> | ||
</input> | ||
<input ref="/data/Taxi_fees"> | ||
<label>Taxi fees ($AUD)</label> | ||
</input> | ||
</h:body> | ||
</h:html> |
Large diffs are not rendered by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We used to have a limit of 3 users in the appendix. Maybe we can add a check for this number in the validation and limit it to less than 5?