mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-29 08:50:01 +02:00
Updated hand-off for JSON parsing
This commit is contained in:
parent
bf374725cb
commit
cb9b135178
2 changed files with 33 additions and 23 deletions
|
@ -41,14 +41,11 @@ class Command(BaseCommand):
|
|||
for testing purposes, but USE WITH CAUTION
|
||||
"""
|
||||
parser.add_argument(
|
||||
"domain_contacts_filename", help="Data file with domain contact information"
|
||||
)
|
||||
parser.add_argument(
|
||||
"contacts_filename",
|
||||
help="Data file with contact information",
|
||||
)
|
||||
parser.add_argument(
|
||||
"domain_statuses_filename", help="Data file with domain status information"
|
||||
"migration_Json_filename",
|
||||
help=(
|
||||
"A JSON file that holds the location and filenames"
|
||||
"of all the data files used for migrations"
|
||||
),
|
||||
)
|
||||
|
||||
parser.add_argument("--sep", default="|", help="Delimiter character")
|
||||
|
@ -71,6 +68,19 @@ class Command(BaseCommand):
|
|||
parser.add_argument(
|
||||
"--directory", default="migrationdata", help="Desired directory"
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--domain_contacts_filename",
|
||||
help="Data file with domain contact information"
|
||||
)
|
||||
parser.add_argument(
|
||||
"--contacts_filename",
|
||||
help="Data file with contact information",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--domain_statuses_filename",
|
||||
help="Data file with domain status information"
|
||||
)
|
||||
parser.add_argument(
|
||||
"--infer_filenames",
|
||||
action=argparse.BooleanOptionalAction,
|
||||
|
@ -309,9 +319,7 @@ class Command(BaseCommand):
|
|||
|
||||
def handle( # noqa: C901
|
||||
self,
|
||||
domain_contacts_filename,
|
||||
contacts_filename,
|
||||
domain_statuses_filename,
|
||||
migration_Json_filename,
|
||||
**options,
|
||||
):
|
||||
"""Parse the data files and create TransitionDomains."""
|
||||
|
@ -336,6 +344,12 @@ class Command(BaseCommand):
|
|||
# (In the event they are stored seperately)
|
||||
directory = options.get("directory")
|
||||
|
||||
# Main script filenames
|
||||
# TODO: @ZANDER to replace this with new TransitionDomainArgument object
|
||||
domain_contacts_filename = directory+ options.get("domain_contacts_filename")
|
||||
contacts_filename = directory+ options.get("contacts_filename")
|
||||
domain_statuses_filename = directory+ options.get("domain_statuses_filename")
|
||||
|
||||
# Agency information
|
||||
agency_adhoc_filename = options.get("agency_adhoc_filename")
|
||||
# Federal agency / organization type information
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue