Skip to content

Expose option to set custom base temporary directory for archive export #6938

@GeigerJ2

Description

@GeigerJ2

This allows specifying other filesystems during archive export, e.g., mounted ones. These filesystems might be larger than what's available on /tmp/ which is currently used as the default location for the temporary directory while the archive is being created. Thus, especially for large AiiDA projects, this change can make archive creation possible which otherwise would fail due to space limitations.

The relevant change can be implemented here:

with tempfile.TemporaryDirectory() as tmpdir:
tmp_filename = Path(tmpdir) / 'export.zip'

The TemporaryDirectory class actually takes a dir argument that serves as the base path for the temporary directory. Exposing this to the user, and possibly adding some validation can probably solve this issue.

Would this fix the problems you were encountering, @abmazitov?

Ping @mbercx

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Todo

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions