From f7bfc7d3acad5834d4e6e9df31b6a627bf87cfce Mon Sep 17 00:00:00 2001 From: Matthew Gidden Date: Tue, 2 May 2017 19:48:30 +0200 Subject: [PATCH 1/2] add script to make md5 sums and md5s --- air_temperature.md5 | 1 + make_check_sums.py | 17 +++++++++++++++++ rasm.md5 | 1 + tiny.md5 | 1 + 4 files changed, 20 insertions(+) create mode 100644 air_temperature.md5 create mode 100644 make_check_sums.py create mode 100644 rasm.md5 create mode 100644 tiny.md5 diff --git a/air_temperature.md5 b/air_temperature.md5 new file mode 100644 index 0000000..a356f91 --- /dev/null +++ b/air_temperature.md5 @@ -0,0 +1 @@ +de5b9d45db48cf6b7034de1a4a6d6c98 \ No newline at end of file diff --git a/make_check_sums.py b/make_check_sums.py new file mode 100644 index 0000000..6bc5703 --- /dev/null +++ b/make_check_sums.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python + +import glob + +from xarray.tutorial import _md5 + + +def main(): + files = glob.glob('*.nc') + for ncf in files: + prefix = ncf.split('.')[0] + outf = '{}.md5'.format(prefix) + with open(outf, 'w') as f: + f.write(_md5(ncf)) + +if __name__ == '__main__': + main() diff --git a/rasm.md5 b/rasm.md5 new file mode 100644 index 0000000..175d5ca --- /dev/null +++ b/rasm.md5 @@ -0,0 +1 @@ +12abf748b48e2ca22ca2d47d363d80c3 \ No newline at end of file diff --git a/tiny.md5 b/tiny.md5 new file mode 100644 index 0000000..1b9d2da --- /dev/null +++ b/tiny.md5 @@ -0,0 +1 @@ +1f0a4b6f768d49c226cfc2a8d0bbb8e3 \ No newline at end of file From aa83198a03c5eab7643f7a3704bd56f51f9eb9d6 Mon Sep 17 00:00:00 2001 From: Matthew Gidden Date: Wed, 3 May 2017 10:14:48 -0500 Subject: [PATCH 2/2] update md5 function name --- make_check_sums.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/make_check_sums.py b/make_check_sums.py index 6bc5703..c4aaf70 100644 --- a/make_check_sums.py +++ b/make_check_sums.py @@ -2,7 +2,7 @@ import glob -from xarray.tutorial import _md5 +from xarray.tutorial import file_md5_checksum def main(): @@ -11,7 +11,7 @@ def main(): prefix = ncf.split('.')[0] outf = '{}.md5'.format(prefix) with open(outf, 'w') as f: - f.write(_md5(ncf)) + f.write(file_md5_checksum(ncf)) if __name__ == '__main__': main()