gzip_files

atomate2.common.files.gzip_files(directory=None, host=None, include_files=None, exclude_files=None, allow_missing=False, force=False, file_client=None)[source]

Gzip files in a directory.

Parameters:
  • directory (str or Path or None) – Directory in which to gzip files. If None, the current directory will be used (or home folder if specifying a remote host).

  • host (str or None) – The hostname used to specify a remote filesystem. Can be given as either “username@host” or just “host” in which case the username will be inferred from the current user. If None, the local filesystem will be used.

  • include_files (None or list of (str or .Path)) – Filenames to include as a list of str or Path objects given relative to directory. Glob file paths are supported, e.g. “*.dat”. If None, all files in the directory will be gzipped.

  • exclude_files (None or list of (str or .Path)) – Filenames to exclude. Supports glob file matching, e.g., “*.dat”.

  • allow_missing (bool) – Whether to error if a file in include_files is not present in the directory.

  • force (bool) – Whether to overwrite files if they exist.

  • file_client (.FileClient) – A file client to use for performing file operations.

Return type:

None