generated from NASA-PDS/template-repo-python
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Al Niessner
authored and
Al Niessner
committed
Aug 1, 2023
1 parent
10cf278
commit 1a92b53
Showing
4 changed files
with
33 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
from pds.registrysweepers.repairkit import run | ||
from pds.registrysweepers.utils import parse_args | ||
|
||
args = parse_args(description='sweep through the registry documents and fix common errors') | ||
args = parse_args(description="sweep through the registry documents and fix common errors") | ||
|
||
run(base_url=args.base_URL, | ||
run( | ||
base_url=args.base_URL, | ||
username=args.username, | ||
password=args.password, | ||
verify_host_certs=not args.insecure, | ||
log_level=args.log_level, | ||
log_filepath=args.log_file) | ||
log_filepath=args.log_file, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
'''change single strings to array of strings''' | ||
"""change single strings to array of strings""" | ||
import logging | ||
from typing import Dict | ||
|
||
log = logging.getLogger(__name__) | ||
|
||
|
||
def repair(document: Dict, fieldname: str) -> Dict: | ||
log.debug(f'checking {fieldname}') | ||
log.debug(f"checking {fieldname}") | ||
if isinstance(document[fieldname], str): | ||
log.info(f'found string for {fieldname} where it should be an array') | ||
log.info(f"found string for {fieldname} where it should be an array") | ||
return {fieldname: [document[fieldname]]} | ||
return {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters