Skip to content

Commit

Permalink
pull update to 'usnistgov/integration' (sha-delete fix) into rel/1.3.X
Browse files Browse the repository at this point in the history
  • Loading branch information
RayPlante committed May 5, 2020
2 parents 26af041 + d2ed297 commit 9d3dd88
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 1 deletion.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added angular/src/assets/images/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions angular/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,22 @@

<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="./assets/images/favicon.ico">
<!-- For iPhone 6 Plus with @3× display: -->
<link rel="apple-touch-icon-precomposed" sizes="180x180" href="./assets/images/apple-touch-icon-180x180.png">
<!-- For iPad with @2× display running iOS ≥ 7: -->
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="./assets/images/apple-touch-icon-152x152.png">
<!-- For iPad with @2× display running iOS ≤ 6: -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="./assets/images/apple-touch-icon-144x144.png">
<!-- For iPhone with @2× display running iOS ≥ 7: -->
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="./assets/images/apple-touch-icon-120x120.png">
<!-- For iPhone with @2× display running iOS ≤ 6: -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="./assets/images/apple-touch-icon-114x114.png">
<!-- For the iPad mini and the first- and second-generation iPad (@1× display) on iOS ≥ 7: -->
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="./assets/images/apple-touch-icon-76x76.png">
<!-- For the iPad mini and the first- and second-generation iPad (@1× display) on iOS ≤ 6: -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="./assets/images/apple-touch-icon-72x72.png">
<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
<link rel="apple-touch-icon-precomposed" href="./assets/images/apple-touch-icon.png"><!-- 57×57px -->
</head>

<body>
Expand Down
3 changes: 2 additions & 1 deletion python/nistoar/pdr/preserv/bagger/midas.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,8 @@ def has_cmp_with_path(comps, path):

resmd = self.bagbldr.bag.nerdm_record(False)
for cmp in resmd.get('components', []):
if any([':DataFile' in t for t in cmp.get('@type',[])]) and \
if any([(':DataFile' in t or ':ChecksumFile' in t)
for t in cmp.get('@type',[])]) and \
cmp.get('filepath') and \
not has_cmp_with_path(podnerd.get('components', []),
cmp['filepath']):
Expand Down
14 changes: 14 additions & 0 deletions python/tests/nistoar/pdr/preserv/bagger/test_midas.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,26 +233,40 @@ def test_ensure_res_metadata(self):
self.assertEqual(data['@context'][1]['@base'], data['@id'])

def test_ensure_res_metadata_wremove(self):
# don't use upload version of pod file
self.bagr = midas.MIDASMetadataBagger(self.midasid, self.bagparent,
self.revdir, None)

self.assertFalse(os.path.exists(self.bagdir))
self.assertIsNone(self.bagr.inpodfile)
self.bagr.ensure_res_metadata()

# make sure file components were registered
self.assertTrue(os.path.isfile(
self.bagr.bagbldr.bag.nerd_file_for("trial1.json")))
self.assertTrue(os.path.isfile(
self.bagr.bagbldr.bag.nerd_file_for("trial1.json.sha256")))

# add metadata for a data file that doesn't exist in the source dir
self.bagr.bagbldr.register_data_file(os.path.join("gold","trial5.json"),
os.path.join(self.revdir,
self.midasid[32:],
"trial1.json") )
self.bagr.bagbldr.register_data_file(os.path.join("gold","trial5.json.sha256"),
os.path.join(self.revdir,
self.midasid[32:],
"trial1.json.sha256") )
self.assertTrue(os.path.isfile(
self.bagr.bagbldr.bag.nerd_file_for("gold/trial5.json")))
self.assertTrue(os.path.isfile(
self.bagr.bagbldr.bag.nerd_file_for("gold/trial5.json.sha256")))

# now watch it get erased
self.bagr.ensure_res_metadata(force=True)
self.assertTrue(not os.path.exists(
self.bagr.bagbldr.bag.nerd_file_for("gold/trial5.json")))
self.assertTrue(not os.path.exists(
self.bagr.bagbldr.bag.nerd_file_for("gold/trial5.json.sha256")))
self.assertTrue(not os.path.exists(
self.bagr.bagbldr.bag.nerd_file_for("gold")))
self.assertTrue(not os.path.exists(
Expand Down

0 comments on commit 9d3dd88

Please sign in to comment.