Skip to main content

A package designed to generate low-level metadata in a specified/supported format (i.e. gmout) for a file or set of files.

Project description

granulemeta

This code was originally created as a file-level metadata extraction tool for use by the ORNL DAAC. The update to version 3 represents a complete refactoring in the approach taken by the prior version of ORNL DAAC's file level metadata extraction tool. The refactoring of the code put an emphasis on making the codebase more maintainable and extensible while making the code's execution more consistently stable and yet more flexible in how the code could be utilized by the end-user.

The default output for granulemeta-v3 is a csv in gmout format (as is necessary for ORNL DAAC's ingest process), however the code can easily be extended to accomodate other output formats.

install

pip install granulemeta

usage

Run from the command line:

granulemeta.py -o [OUTPUT_FILE].csv [PATH: directory or file or glob]

Run from docker container for local development:

./run-docker-dev.sh [PATH TO DATA DIRECTORY] [PATH TO GRANULEMETA CODE DIRECTORY]

This will give you a command line environment to run granulemeta in. The first path argument provided will be mounted as /data and the second path argument as /code. Within the dev container, granulemeta can be run using the following syntax:

granulemeta -o [OUTPUT_FILE].csv [PATH: directory or file or glob]

requirements

This script was developed on Python 3. It relies on five packages not in Python's standard library:

requirements.txt was last generated on 2022-06-09.

notes

Notable features added since the creation of version 3:

  • Lines are written to the output file as it processes each granule instead of waiting until all granules have been processed to write the output file.
  • Unless the --overwrite option is given, the script will skip granules already present in the output file. This (coupled with the feature directly above) will allow the script to pick up where it left off if it crashes partway through processing a dataset.
  • There is a --nfiles (or -n) option that allows the script to automatically stop execution after processing a specified number of granules.
  • Glob syntax can now be used for the input path argument to allow a user to restrict the files that a given execution of the script processes (i.e. using /path/*.nc as your input path would only process granules with the .nc file extension).
  • Behind the scenes, the code is better organized to better facilitate redability, maintainability, and extensibility. This has been accomplished by breaking the code up into several modules.

authorship

The following authors have contributed to the granulemeta development process:

Kent Campbell, Jack McNelis, Vinny Palandro, Yaxing Wei, Tammy Walker, Matt Donovan, Jessica Welch, Daine Wright, Bruce Wilson, Chris Lindsley, Ketan Patel, Scott Pearson, Rupesh Shrestha, Tom Ruggles

contacts

author: campbellkb@ornl.gov

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

granulemeta-3.3.2.tar.gz (52.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

granulemeta-3.3.2-py3-none-any.whl (62.8 kB view details)

Uploaded Python 3

File details

Details for the file granulemeta-3.3.2.tar.gz.

File metadata

  • Download URL: granulemeta-3.3.2.tar.gz
  • Upload date:
  • Size: 52.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.16 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.8

File hashes

Hashes for granulemeta-3.3.2.tar.gz
Algorithm Hash digest
SHA256 d42c41c301b3171e4e152a151f19e5c6e1e143b3ef345b6b911686e8b7c1b0a4
MD5 6308f33fd55ba68426cb76938d1a6411
BLAKE2b-256 9ae202b3887d5ad0877ec41a858fd5d8ea8ff40c7b17e37dfa2c1445d55dc9cf

See more details on using hashes here.

File details

Details for the file granulemeta-3.3.2-py3-none-any.whl.

File metadata

  • Download URL: granulemeta-3.3.2-py3-none-any.whl
  • Upload date:
  • Size: 62.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.16 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.8

File hashes

Hashes for granulemeta-3.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cb6beb858a189c5d447b9d62af1ff4312e07bc2f0e59d1290e435c5bf071f15f
MD5 8af548ff1faad6fc381f754c4751a4d3
BLAKE2b-256 a28e5df85df4e69f7923d66bd22f30db76233fd43b716460d62d7f8d5956a224

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page