Commit 86747f38 authored by Clément Haëck's avatar Clément Haëck
Browse files

Up doc

parent be87ccf7
......@@ -38,7 +38,7 @@ def main():
ofile =['fixes'])
lib.check_output_dir(ofile, file=True)
lib.setup_meta_attrs(sep, args)
lib.setup_metadata(sep, args)
return sep
......@@ -68,5 +68,19 @@ To setup such a function, special arguments in the dictionnary can be used:
~preprocess_finder~ should be a callable that takes in the dataset to process, the corresponding filename, and the finder object, and it should return a dataset.
The ~preprocess_finder_args~ and ~preprocess_finder_kwargs~ members are passed as additionnal arguments to this callable.
* Metadata on creation
It is useful to know when and how the datafiles originated.
To this end, the function ~lib.setup_metadata~ can be used.
It adds to a dataset various global attributes:
- ~"created_with"~: The name of the script, and the machine hostname
- ~"created_with_args"~: The args dictionnary as a string
- ~"created_on"~: The date and time of file creation
- ~"created_on_commit"~: The hash of the current commit/HEAD
#+begin_src python
lib.setup_metadata(ds, args)
ds.to_netcdf(ofile, ds)
* Zones
We define some static 'zones', this dataset is quite special and have its own doc [[][here]].
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment