-
-
Notifications
You must be signed in to change notification settings - Fork 847
Description
Dependency
- Migrate Wins Data: Migrating from AF to KVF data structure #2146
- Add latest version of Google Apps Scripts to GitHub #3641
- Create wiki page "Hfla Google Apps Script Development/Review Process" #4134
Overview
As a developer, to turn the wins card into a reusable component, we must first be able to generate a wins-data.json file of a more specific format. This issue is part of a series that aims to migrate us to the more specific format. The file _wins-data.json now implements the new data format, and so the file wins-data.json can be removed.
Action Items
- Follow sections 1-3 in the Wins Apps Script Development Process1. Note that in this issue you will be modifying both Apps Scripts
wins-form-responsesandgh-requestsso setup will be required in both/google-apps-script/wins-form-responsesand/google-apps-script/gh-requests - As described in section 3a and 3b, you will provide a dev lead with the google account you wish to use for testing, and request the dev lead to:
- Continue following instructions in 3c and d. As described in 3d, you will have to make modifications to certain documents in the test folder.
- It will not be necessary to restore any triggers, because you can execute
main()in debug mode. - Since you will be running
main()for testing, you must follow instructions in Testing WINS in a test repository
- It will not be necessary to restore any triggers, because you can execute
- Continue following instructions through section 6 "Editing". As described in this section, editing can be done locally in an IDE or in the Google Drive cloud editor, and the
clasputility can be used to transfer code back and forth between the local worksation and the Google Drive as needed. - Go to the Google Apps Script which generates both the KVF and AF file.
- Change any settings or code such that the AF version is no longer generated.
- Refer to Section 7 "Testing" in the Hfla Google Apps Script Development Process Guide[^4] , Test the code by running main() in debug mode. A new pull request "Update wins-data.json via Google Apps Script" should be appear in your test repository. Examine the json data and if it looks good, merge into your repository test branch, bring that branch down to your local workstation and and use Docker to examine the resulting Wins page, which should remain unchanged.
- Refer to Section 8 "Completing an Issue" in the Hfla Google Apps Script Development Process Guide[^4] , for information about commiting
Code.jsand creating a pull request. - In the pull request, provide links to the "Update wins-data.json via Google Apps Script" Pull Request and also the Wins page (both in your repository), for the convenience of reviewers.
- Release dependency on Google Apps Script: Migrate Wins Data - Delete AF file #2148
Resources/Instructions
KVF = is an array of objects
AF = is an array of arrays
Currently we have two json files for wins: _wins-data.json and wins-data.json. The former will henceforth be called KVF (for key-value file) and AF (for array file). AF is generated daily from a script on google while KVF appears to be an older, dysfunc version. The format in the KVF version, however, is much friendlier to formatting in liquid syntax. Therefore, we need to incrementally port our codebase to use the KVF version of the data and remove the AF version we currently use. This will be done in multiple steps:
- Have the apps script generate both AF and KVF version.
- Migrate all uses of AF to KVF.
- Have the apps script stop generating the AF version.
- Delete the AF version from our repo since it is now unused.
For this issue, we are doing step 3.
Footnotes
Metadata
Metadata
Assignees
Labels
Type
Projects
Status