Skip to content

Instantly share code, notes, and snippets.

@ross-spencer
Last active February 23, 2018 15:16
Show Gist options
  • Save ross-spencer/0e680bd58d9bac34ff7e0e7b859ca061 to your computer and use it in GitHub Desktop.
Save ross-spencer/0e680bd58d9bac34ff7e0e7b859ca061 to your computer and use it in GitHub Desktop.
Create a complex directory layout

Creating a complex directory layout for QA

Unfortunatley, I haven't managed to complete the changes to the script below to submit it to code review. That being said I have set it up in such a way that it will create a structure suitable for testing. Using the default instructions below we can create a tree of:

  • 225 directories, 1001 files
  1. To QA issue: https://github.com/artefactual/archivematica/issues/821#issue-278984149
  2. Standup a vm with the latest AM 1.7 branch
  3. Clone the archivematica-sampledata repository: git clone https://github.com/artefactual/archivematica-sampledata
  4. Checkout branch dev/issue-25-create-deep-transfers, git checkout dev/issue-25-create-deep-transfers
  5. Navigate to: /archivematica-sampledata/createtransfers
  6. Run command: python createtransfers.py create-deep-transfers 10 10 NB: The values 10 10 are arbitrary and are only required when this is complete
  7. deep_transfer should be available here: archivematica-sampledata/TestTransfers/deep_transfer and available to be used in QA

The branch: https://github.com/artefactual/archivematica-sampledata/tree/dev/issue-25-create-deep-transfers

Is almost complete, but things needed to complete it:

  • handle subcommand values for directory depth and file no
  • flake8 compliance
  • code-review
  • readme update

I won't be able to complete that until next week.

If the defaults need to be upped, the lines are here: https://github.com/artefactual/archivematica-sampledata/blob/dev/issue-25-create-deep-transfers/createtransfers/createtransfers.py#L244

I suggest just doubling or tripling what's there. The script will still run in a few seconds. Archivematica processing will take considerably more time. (It crashed my laptop this evening).

@ross-spencer
Copy link
Author

I've created three locations on the VM:

	../TestTransfers/deep_transfer_12_deep_3961_files/
	../TestTransfers/deep_transfer_8_deep_1001_files/
	../TestTransfers/deep_transfer_8_deep_2002_files/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment