Add documentation

This commit is contained in:
zandercymatics 2024-04-10 09:13:48 -06:00
parent d1b85e9ca9
commit 7250e6587c
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
2 changed files with 45 additions and 1 deletions

View file

@ -586,3 +586,47 @@ Example: `cf ssh getgov-za`
| | Parameter | Description |
|:-:|:-------------------------- |:----------------------------------------------------------------------------|
| 1 | **debug** | Increases logging detail. Defaults to False. |
## Populate First Ready
This section outlines how to run the `populate_organization_type` script.
### Running on sandboxes
#### Step 1: Login to CloudFoundry
```cf login -a api.fr.cloud.gov --sso```
#### Step 2: SSH into your environment
```cf ssh getgov-{space}```
Example: `cf ssh getgov-za`
#### Step 3: Create a shell instance
```/tmp/lifecycle/shell```
#### Step 4: Running the script
```./manage.py populate_organization_type {domain_election_office_filename} --debug```
- The domain_election_office_filename file must adhere to this format:
- example.gov\
example2.gov\
example3.gov
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```
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
| | Parameter | Description |
|:-:|:------------------------------------|:-------------------------------------------------------------------|
| 1 | **domain_election_office_filename** | A file containing every domain that is an election office.
##### Optional parameters
| | Parameter | Description |
|:-:|:-------------------------- |:----------------------------------------------------------------------------|
| 1 | **debug** | Increases logging detail. Defaults to False.

View file

@ -33,7 +33,7 @@ class Command(BaseCommand):
parser.add_argument("--debug", action=argparse.BooleanOptionalAction)
parser.add_argument(
"domain_election_office_filename",
help=("A JSON file that holds the location and filenames" "of all the data files used for migrations"),
help=("A file that contains" " all the domains that are election offices."),
)
def handle(self, domain_election_office_filename, **kwargs):