dapper.io package

Submodules

dapper.io.attrs module

dapper module: io.attrs.

dapper.io.attrs.apply_append_attrs(ds, append_attrs)[source]

Update xarray Dataset global attrs in a NetCDF-safe way.

Parameters:
  • ds (Any)

  • append_attrs (dict | None)

dapper.io.fs module

dapper module: io.fs.

dapper.io.fs.make_directory(path, delete_all_contents=False)[source]

Create a directory (optionally clearing its contents).

Return type:

Path

Parameters:
  • path (str | Path)

  • delete_all_contents (bool)

dapper.io.fs.remove_directory_contents(path, *, remove_directory=False)[source]

Remove all files/subdirs under path. Optionally remove the directory itself.

Return type:

None

Parameters:
  • path (str | Path)

  • remove_directory (bool)

dapper.io.provenance module

dapper module: io.provenance.

dapper.io.provenance.get_git_commit_hash()[source]

Return the current git commit hash if available, otherwise ‘unknown’.

Return type:

str

Module contents

dapper module: io.__init__.