-
Notifications
You must be signed in to change notification settings - Fork 18
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
Ticket #2616: populate suborg and portfolio script #2670
Ticket #2616: populate suborg and portfolio script #2670
Conversation
🥳 Successfully deployed to developer sandbox ag. |
🥳 Successfully deployed to developer sandbox ag. |
🥳 Successfully deployed to developer sandbox ag. |
🥳 Successfully deployed to developer sandbox ag. |
🥳 Successfully deployed to developer sandbox ag. |
🥳 Successfully deployed to developer sandbox ag. |
🥳 Successfully deployed to developer sandbox ag. |
🥳 Successfully deployed to developer sandbox ag. |
🥳 Successfully deployed to developer sandbox ag. |
🥳 Successfully deployed to developer sandbox ag. |
🥳 Successfully deployed to developer sandbox ag. |
🥳 Successfully deployed to developer sandbox ag. |
parser.add_argument( | ||
"--parse_requests", | ||
action=argparse.BooleanOptionalAction, | ||
help="Adds portfolio to DomainRequests", | ||
) | ||
parser.add_argument( | ||
"--parse_domains", | ||
action=argparse.BooleanOptionalAction, | ||
help="Adds portfolio to DomainInformation", | ||
) |
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.
@abroddrick What do you think of this particular approach? This is related to this comment. It seemed simpler to check for in handle but the UX of the script is important too! Let me know
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.
I just saw you comment actually and replied. I prefer having "both" so I don't have to worry about missing a parameter it also makes running it a bit more straight forward in test envs when we don't really care what gets added.
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.
That makes sense!
@@ -838,3 +838,45 @@ Example: `cf ssh getgov-za` | |||
|
|||
### Running locally | |||
```docker-compose exec app ./manage.py populate_domain_request_dates``` | |||
|
|||
## Create federal portfolio | |||
This script takes the name of a `FederalAgency` (like 'AMTRAK') and does the following: |
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.
The additional context of when this may fail etc should probably be in here as well (in a summed up format).
Ah! So, this dialog never occurs when you are creating suborgs, so you won't need to confirm when running the script in that fashion. For our use case, this prompt only occurs if you rerun the script two or more times on the same organization. All of these Y/N dialog options only ever show in that particular scenario, they do not show when you run it for the first time. Basically, I wrote this script such that it knows if you rerun it on the same org twice. This is a low-cost add and it has a lot of benefits, imo. I feel that it makes sense here. This should be documented however. Thoughts? |
Agreed on showing the changes! This script does not delete suborgs whatsoever, would you want that?
I agree! Just wanted to flag that with our current stable db we may have a few of those so maybe I'll leave some additional info. Basically, we may see this on a few of them |
🥳 Successfully deployed to developer sandbox ag. |
🥳 Successfully deployed to developer sandbox ag. |
🥳 Successfully deployed to developer sandbox ag. |
🥳 Successfully deployed to developer sandbox ag. |
🥳 Successfully deployed to developer sandbox ag. |
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.
Great work.
🥳 Successfully deployed to developer sandbox ag. |
🥳 Successfully deployed to developer sandbox ag. |
🥳 Successfully deployed to developer sandbox ag. |
1 similar comment
🥳 Successfully deployed to developer sandbox ag. |
🥳 Successfully deployed to developer sandbox ag. |
Ticket
Resolves #2616
Changes
Context for reviewers
Background
This script automatically creates a portfolio for a given FederalAgency. A lot of information about these agencies are scattered throughout different tables, so this script synthesizes that.
As part of the AC, this script should be runnable more than once. This means that if you try to rerun this on a record that already exists, it will prompt the user where possible and update rather than attempt to recreate the record.
Other information
This is difficulty to accurately test without good data. I would suggest testing this PR on getgov-ag
As noted in the readme, the script has two params:
parse_domains
<= adds the created portfolio record to domains (specifically - the domain information object)parse_requests
<= adds the created portfolio record to domain requestsNote: this only applies to one agency at a time. To pick a record to populate, go to the FederalAgency table and copy the agency name. For example, "AMTRAK".
Then run the script as so:
./manage.py create_federal_agency "AMTRAK" --parse_domains --parse_requests
. Note that you can run the script as many times as you like, so you can also test this by just passing the parse_domains flag. You can also just pass in--both
.Given that no senior official data exists on ag, you will need to create a senior official record or use an existing one. When creating it, make sure to associate the senior official record to the given federal agency that you are testing.
Setup
You will need to test:
--parse_domains
is ran--parse_requests
is ranCode Review Verification Steps
As the original developer, I have
Satisfied acceptance criteria and met development standards
Ensured code standards are met (Original Developer)
Validated user-facing changes (if applicable)
As a code reviewer, I have
Reviewed, tested, and left feedback about the changes
Ensured code standards are met (Code reviewer)
Validated user-facing changes as a developer
New pages have been added to .pa11yci file so that they will be tested with our automated accessibility testing
Checked keyboard navigability
Meets all designs and user flows provided by design/product
Tested general usability, landmarks, page header structure, and links with a screen reader (such as Voiceover or ANDI)
Tested with multiple browsers, the suggestion is to use ones that the developer didn't (check off which ones were used)
(Rarely needed) Tested as both an analyst and applicant user
Note: Multiple code reviewers can share the checklists above, a second reviewers should not make a duplicate checklist
As a designer reviewer, I have
Verified that the changes match the design intention
Validated user-facing changes as a designer
Checked keyboard navigability
Tested general usability, landmarks, page header structure, and links with a screen reader (such as Voiceover or ANDI)
Tested with multiple browsers (check off which ones were used)
(Rarely needed) Tested as both an analyst and applicant user
Screenshots