-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chg: dev: make new_csv_hdrs a list again, add ID column
* save chk script and update default oscal.yaml Signed-off-by: Steve Arnold <sarnold@vctlabs.com>
- Loading branch information
Showing
3 changed files
with
27 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
""" | ||
Simple consumer test. | ||
""" | ||
|
||
from natsort import os_sorted | ||
|
||
from ymltoxml.templates import xform_id | ||
from ymltoxml.utils import text_file_reader | ||
|
||
OPTS = { | ||
'file_encoding': 'utf-8', | ||
'output_format': 'raw', | ||
'default_csv_hdr': None, | ||
} | ||
|
||
# read in some json "column data" | ||
data = text_file_reader('tests/data/OE-expanded-profile-all-ids.txt', OPTS) | ||
if data[0].isupper(): | ||
lc_ids = [xform_id(x) for x in data] | ||
|
||
# spit out lowercase id format | ||
for ctl in os_sorted(lc_ids): | ||
print(ctl) |
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