-
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.
Merge pull request #20 from UoA-eResearch/IDS-963-generate-zip-for-fi…
…nal-ro-crate Ids 963 generate zip for final ro crate
- Loading branch information
Showing
15 changed files
with
194 additions
and
32 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,25 @@ | ||
"""" | ||
Functions for faking a mounted research drive on the local home directory | ||
Only for demonstration purposes, | ||
please replace once service accounts can mount a research drive | ||
""" | ||
|
||
import shutil | ||
from pathlib import Path | ||
|
||
TEST_DATA_NAME = Path("tests/restst000000001-testing") | ||
|
||
|
||
def make_fake_resdrive(drive_path: Path) -> None: | ||
"TESTING/DEMONSTRATION FUNCTION TO POPULATE RESEARCH DRIVE PATHS" | ||
(drive_path / "Archive").mkdir(parents=True, exist_ok=True) | ||
data_path = drive_path / "Vault" | ||
if not data_path.exists(): | ||
data_path.mkdir(parents=True, exist_ok=False) | ||
populate_fake_resdrive(data_path) | ||
|
||
|
||
def populate_fake_resdrive(input_path: Path) -> None: | ||
"Populate the vault directory with fake data" | ||
shutil.copytree(TEST_DATA_NAME, input_path, dirs_exist_ok=True) |
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
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
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
Oops, something went wrong.