PR suggestions

This commit is contained in:
zandercymatics 2024-04-11 09:13:56 -06:00
parent 8714c1c4d6
commit c9e3948b04
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
2 changed files with 70 additions and 25 deletions

View file

@ -589,13 +589,22 @@ Example: `cf ssh getgov-za`
## Populate Organization type
This section outlines how to run the `populate_organization_type` script.
This section outlines how to run the `populate_organization_type` script.
The script is used to update the organization_type field on DomainRequest and DomainInformation when it is None.
That data are synthesized from the generic_org_type field and the is_election_board field
### Running on sandboxes
#### Step 1: Login to CloudFoundry
```cf login -a api.fr.cloud.gov --sso```
#### Step 2: Get the domain_election_board file
The latest domain_election_board csv can be found [here](https://drive.google.com/file/d/1aDeCqwHmBnXBl2arvoFCN0INoZmsEGsQ/view).
After downloading this file, place it in `src/migrationdata`
#### Step 2: Upload the domain_election_board file to your sandbox
Follow [Step 1: Transfer data to sandboxes](#step-1-transfer-data-to-sandboxes) and [Step 2: Transfer uploaded files to the getgov directory](#step-2-transfer-uploaded-files-to-the-getgov-directory) from the [Set Up Migrations on Sandbox](#set-up-migrations-on-sandbox) portion of this doc.
#### Step 2: SSH into your environment
```cf ssh getgov-{space}```
@ -605,9 +614,9 @@ Example: `cf ssh getgov-za`
```/tmp/lifecycle/shell```
#### Step 4: Running the script
```./manage.py populate_organization_type {domain_election_office_filename} --debug```
```./manage.py populate_organization_type {domain_election_board_filename} --debug```
- The domain_election_office_filename file must adhere to this format:
- The domain_election_board_filename file must adhere to this format:
- example.gov\
example2.gov\
example3.gov
@ -616,17 +625,25 @@ Example:
`./manage.py populate_organization_type migrationdata/election-domains.csv --debug`
### Running locally
```docker-compose exec app ./manage.py populate_organization_type {domain_election_office_filename} --debug```
#### Step 1: Get the domain_election_board file
The latest domain_election_board csv can be found [here](https://drive.google.com/file/d/1aDeCqwHmBnXBl2arvoFCN0INoZmsEGsQ/view).
After downloading this file, place it in `src/migrationdata`
#### Step 2: Running the script
```docker-compose exec app ./manage.py populate_organization_type {domain_election_board_filename} --debug```
Example (assuming that this is being ran from src/):
`docker-compose exec app ./manage.py populate_organization_type migrationdata/election-domains.csv --debug`
##### Required parameters
### Required parameters
| | Parameter | Description |
|:-:|:------------------------------------|:-------------------------------------------------------------------|
| 1 | **domain_election_office_filename** | A file containing every domain that is an election office.
| 1 | **domain_election_board_filename** | A file containing every domain that is an election office.
##### Optional parameters
### Optional parameters
| | Parameter | Description |
|:-:|:-------------------------- |:----------------------------------------------------------------------------|
| 1 | **debug** | Increases logging detail. Defaults to False.