website icon indicating copy to clipboard operation
website copied to clipboard

Google Apps Script: Migrate Wins Data - Stop generation of AF file

Open Aveline-art opened this issue 4 years ago • 11 comments

Dependency

  • [x] #2146
  • [x] #3641
  • [x] #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

  • [x] Follow sections 1-3 in the Wins Apps Script Development Process[^3]. Note that in this issue you will be modifying both Apps Scripts wins-form-responses and gh-requests so setup will be required in both /google-apps-script/wins-form-responses and /google-apps-script/gh-requests
  • [x] 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:
    • do not modify folder level access
    • share the Wins Form Admin Guide[^1] as VIEWER
    • share the Wins-form (Response)[^2] sheet as VIEWER
    • share the gh-requests doc as VIEWER
  • [x] Continue following instructions in 3c and d. As described in 3d, you will have to make modifications to certain documents in the test folder.
    • [x] It will not be necessary to restore any triggers, because you can execute main() in debug mode.
    • [x] Since you will be running main() for testing, you must follow instructions in Testing WINS in a test repository
  • [x] 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 clasp utility can be used to transfer code back and forth between the local worksation and the Google Drive as needed.
  • [x] Go to the Google Apps Script which generates both the KVF and AF file.
  • [x] 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.js and 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 #2148

Resources/Instructions

wins-page

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:

  1. Have the apps script generate both AF and KVF version.
  2. Migrate all uses of AF to KVF.
  3. Have the apps script stop generating the AF version.
  4. Delete the AF version from our repo since it is now unused.

For this issue, we are doing step 3.

[^1]:Wins Form Admin Guide [^2]:Wins-form (Response) Sheet [^3]:Wins Apps Script Development Process

Aveline-art avatar Aug 20 '21 17:08 Aveline-art

Hi @roslynwythe, thank you for taking up this issue! Hfla appreciates you :)

Do let fellow developers know about your:- i. Availability: (When are you available to work on the issue/answer questions other programmers might have about your issue?) ii. ETA: (When do you expect this issue to be completed?)

You're awesome!

P.S. - You may not take up another issue until this issue gets merged (or closed). Thanks again :)

github-actions[bot] avatar Nov 03 '22 01:11 github-actions[bot]

i. Availability - 6 to midnight 11/2, 10 am - 2 pm and 4-7 pm on 11/3 ii. ETA EOD 11/3 (assuming I am granted access to the Google Apps Scripts on 11/2)

roslynwythe avatar Nov 03 '22 01:11 roslynwythe

  • I was advised by Aric that issue #3641 should be completed before this one.

roslynwythe avatar Nov 04 '22 17:11 roslynwythe

This issue should be rewritten with instructions regarding the new development strategy, similar to #4035. The code change is simple but the setup and testing process is much more complex so I advise this should be Complexity: Medium

roslynwythe avatar Dec 14 '23 03:12 roslynwythe

Hi @roslynwythe, thank you for taking up this issue! Hfla appreciates you :)

Do let fellow developers know about your:- i. Availability: (When are you available to work on the issue/answer questions other programmers might have about your issue?) ii. ETA: (When do you expect this issue to be completed?)

You're awesome!

P.S. - You may not take up another issue until this issue gets merged (or closed). Thanks again :)

HackforLABot avatar Sep 17 '24 01:09 HackforLABot

@dcotelessa I have asked @roslynwythe to connect with you on this issue. We are having a little trouble with the instructions. That is keeping us from being able to release wins issues. I would like you to try to do this issue and write down (and possibly add screenshots) wherever you get stuck. Then you and @roslynwythe can get on a Zoom call, with you recording the session, so she can help you. Then, when you are done, you would rewatch the video and update the instructions on a new issue, which you also would create.

Please pick up this issue when you are done with the issue you are on now.

ExperimentsInHonesty avatar Sep 17 '24 01:09 ExperimentsInHonesty

Hi @dcotelessa, thank you for taking up this issue! Hfla appreciates you :)

Do let fellow developers know about your:- i. Availability: (When are you available to work on the issue/answer questions other programmers might have about your issue?) ii. ETA: (When do you expect this issue to be completed?)

You're awesome!

P.S. - You may not take up another issue until this issue gets merged (or closed). Thanks again :)

HackforLABot avatar Sep 17 '24 01:09 HackforLABot

  • This also might be related https://github.com/hackforla/website-wiki/pull/17#discussion_r1762086731

ExperimentsInHonesty avatar Sep 17 '24 01:09 ExperimentsInHonesty

@dcotelessa I understand that you have have been writing to @roslynwythe on Slack with the issues you are experiencing and providing suggestions on how she can update the documentation. That is not what I asked for. RW is working on so many different major initiatives here as our most senior dev. So my instructions were intended for you to take responsiblity for rewriting the instructions. Please re-read my original comment from 2024-09-16 https://github.com/hackforla/website/issues/2147#issuecomment-2354291697

@dcotelessa I have asked @roslynwythe to connect with you on this issue. We are having a little trouble with the instructions. That is keeping us from being able to release wins issues. I would like you to try to do this issue and write down (and possibly add screenshots) wherever you get stuck. Then you and @roslynwythe can get on a Zoom call, with you recording the session, so she can help you. Then, when you are done, you would rewatch the video and update the instructions on a new issue, which you also would create.

ExperimentsInHonesty avatar Oct 15 '24 17:10 ExperimentsInHonesty

@dcotelessa Please take the instructions from this comment on your PR https://github.com/hackforla/website/pull/7615#issuecomment-2425762934 and add it to a comment on the new issue you are going to create to update the documentation

ExperimentsInHonesty avatar Oct 22 '24 01:10 ExperimentsInHonesty

  • When you create the new issue, please put a link to it on @daras-cu 's wins ssue so that she can review it https://github.com/hackforla/website/issues/2385

ExperimentsInHonesty avatar Oct 22 '24 01:10 ExperimentsInHonesty

@dcotelessa I realized this issue was closed because of the PR that was submitted, not because all the tasks are completed. See comments https://github.com/hackforla/website/issues/2147#issuecomment-2428006202 and https://github.com/hackforla/website/issues/2147#issuecomment-2428013217 which have not been done.

@dcotelessa Please take the instructions from this comment on your PR https://github.com/hackforla/website/pull/7615#issuecomment-2425762934 and add it to a comment on the new issue you are going to create to update the documentation

When you create the new issue, please put a link to it on @daras-cu 's wins ssue so that she can review it https://github.com/hackforla/website/issues/2385

ExperimentsInHonesty avatar Nov 06 '24 19:11 ExperimentsInHonesty

Closed as required issue was created.

daras-cu avatar May 13 '25 01:05 daras-cu