{ "info": { "author": "Meteorological Service of Canada", "author_email": "tom.kralidis@canada.ca", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Scientific/Engineering :: GIS" ], "description": "[![Build Status](https://travis-ci.org/geopython/pygeometa.png)](https://travis-ci.org/geopython/pygeometa)\n\n# pygeometa\n\npygeometa is a Python package to generate metadata for geospatial datasets.\n\n## Table of Contents\n* [Overview](#overview)\n* [Features](#features)\n* [Quickstart](#quickstart)\n* [Installation](#installation)\n * [Requirements](#requirements)\n * [Dependencies](#dependencies)\n * [Installing the Package](#installing-the-package)\n* [Running](#running)\n * [From the command line](#from-the-command-line)\n * [Using the API from Python](#using-the-api-from-python)\n* [Migration](#migration)\n * [Migrating old MCFs to YAML](#migrating-old-mcfs-to-yaml)\n* [Development](#development)\n * [Setting up a Development Environment](#setting-up-a-development-environment)\n * [Adding a Metadata Schema to the Core](#adding-a-metadata-schema-to-the-core)\n * [Running Tests](#running-tests)\n * [Code Conventions](#code-conventions)\n * [Bugs and Issues](#bugs-and-issues)\n* [History](#history)\n* [Contact](#contact)\n\n## Overview\n\npygeometa is a Python package to generate metadata for geospatial datasets.\nMetadata content is managed by pygeometa in simple Metadata Control Files\n(MCF) which consist of 'parameter = value' pairs. pygeometa generates metadata\nrecords from MCFs based on the schema specified by the user, such as ISO19139,\nassociated profiles, and WMO WIGOS. pygeometa supports nesting MCFs, which\nreduces duplication of metadata content common to multiple records and ease\nmaintenance.\n\n## Features\n\n* simple YAML-based configuration\n* extensible: template architecture allows for easy addition of new metadata\n formats\n* flexible: use as a command-line tool or integrate as a library\n\n## Quickstart\n\nWorkflow to generate metadata XML:\n\n1. Install pygeometa\n2. Create a 'metadata control file' .yml file that contains metadata\n information \n 1. Modify the [sample.yml](https://github.com/geopython/pygeometa/blob/master/sample.yml) example\n 2. pygeometa supports nesting MCFs together, allowing providing a single MCF\n for common metadata parameters (e.g. common contact information)\n 3. Refer to the [Metadata Control File Reference documentation](https://github.com/geopython/pygeometa/blob/master/doc/MCF_Reference.md) \n3. Run pygeometa for the .yml file with a specified target metadata schema\n\n## Installation\n\npygeometa is best installed and used within a Python virtualenv.\n\n### Requirements\n\n* Python 3 and above. Works with Python 2.7\n* Python [virtualenv](https://virtualenv.pypa.io/) package\n\n### Dependencies\n\nDependencies are listed in [requirements.txt](requirements.txt). Dependencies\nare automatically installed during pygeometa's installation.\n\n### Installing the Package\n\n```bash\nvirtualenv -p python3 my-env\ncd my-env\n. bin/activate\ngit clone https://github.com/geopython/pygeometa.git\ncd pygeometa\npython setup.py build\npython setup.py install\n```\n\n## Running\n\n### From the command line\n\n```bash\npygeometa generate-metadata --mcf=path/to/file.yml --schema=iso19139 # to stdout\npygeometa generate-metadata --mcf=path/to/file.yml --schema=iso19139 --output=some_file.xml # to file\npygeometa generate-metadata --mcf=path/to/file.yml --schema=iso19139 --output=some_file.xml --verbosity=DEBUG # add verbose (ERROR, WARNING, INFO, DEBUG)\n# to use your own defined schema:\npygeometa generate-metadata --mcf=path/to/file.yml --schema_local=/path/to/my-schema --output=some_file.xml # to file\n```\n\n### Supported schemas\nSchemas supported by pygeometa:\n* iso19139, [reference](http://www.iso.org/iso/catalogue_detail.htm?csnumber=32557)\n* iso19139-hnap, [reference](http://www.gcpedia.gc.ca/wiki/Federal_Geospatial_Platform/Policies_and_Standards/Catalogue/Release/Appendix_B_Guidelines_and_Best_Practices/Guide_to_Harmonized_ISO_19115:2003_NAP)\n* [wmo-cmp](doc/wmo-cmp.md), [reference](http://wis.wmo.int/2013/metadata/version_1-3-0/WMO_Core_Metadata_Profile_v1.3_Part_1.pdf) \n* [wmo-wigos](doc/wmo-wigos.md), [reference](https://library.wmo.int/opac/doc_num.php?explnum_id=3653)\n* Local schema, specified with ```--schema_local=/path/to/my-schema```\n\n### Using the API from Python\n\n```python\nfrom pygeometa.core import render_template\n# default schema\nxml_string = render_template('/path/to/file.yml', schema='iso19139')\n# user-defined schema\nxml_string = render_template('/path/to/file.yml', schema_local='/path/to/new-schema')\n# dictionary representation of YAML\nxml_string = render_template(yaml_dict, schema='iso19139')\nwith open('output.xml', 'w') as ff:\n ff.write(xml_string)\n# render from an MCF stored in a string\nmcf_string = '...' # some string\nxml_string = render_template_string(mcf_string, schema='iso19139')\n# render from an MCF as a ConfigParser object\nmcf_cp = '...' # some ConfigParser object\nxml_string = render_template_string(mcf_cp, schema='iso19139')\n```\n\n## Migration\n\n### Migrating old MCFs to YAML\n\npygeometa provides a `migrate` utility to convert legacy MCFs into YAML:\n\n```bash\npygeometa migrate --mcf=path/to/file.mcf # to stdout\npygeometa migrate --mcf=path/to/file.mcf --output=some_file.yml # to file\n```\nThe migrate utility doesn't support migrating comments from legacy MCFs tox\n YAML MCFs.\n\n## Development\n\n### Setting up a Development Environment\n\nSame as installing a package. Use a virtualenv. Also install developer\nrequirements:\n\n```bash\npip install -r requirements-dev.txt\n```\n\n### Adding a Metadata Schema to the Core\n\nList of supported metadata schemas in `pygeometa/templates/`\n\nTo add support to new metadata schemas:\n```bash\ncp -r pygeometa/templates/iso19139 pygeometa/templates/new-schema\n```\nThen modify `*.j2` files in the new `pygeometa/templates/new-schema` directory\nto comply to new metadata schema.\n\n### Running Tests\n\n```bash\n# via distutils\npython setup.py test\n# manually\ncd tests\npython run_tests.py\n```\n\n### Code Conventions\n\n* [PEP8](https://www.python.org/dev/peps/pep-0008)\n\n### Bugs and Issues\n\nAll bugs, enhancements and issues are managed on [GitHub](https://github.com/geopython/pygeometa/issues).\n\n## History\n\nStarted in 2009, pygeometa originated within an internal project called pygdm,\nwhich provided generic geospatial data management functions. pygdm (now end\nof life) was used for generating MSC/CMC geospatial metadata. pygeometa was\npulled out of pygdm to focus on the core requirement of generating geospatial\nmetadata within a real-time environment and automated workflows.\n\nIn 2015 pygeometa was made publically available in support of the Treasury\nBoard [Policy on Acceptable Network and Device Use](http://www.tbs-sct.gc.ca/pol/doc-eng.aspx?id=27122).\n\n## Contact\n\n* [Tom Kralidis](https://github.com/tomkralidis)\n* [Alexandre Leroux](https://github.com/alexandreleroux)\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/geopython/pygeometa", "keywords": "geospatial metadata catalogue discovery", "license": "MIT", "maintainer": "Meteorological Service of Canada", "maintainer_email": "tom.kralidis@canada.ca", "name": "pygeometa", "package_url": "https://pypi.org/project/pygeometa/", "platform": "all", "project_url": "https://pypi.org/project/pygeometa/", "project_urls": { "Homepage": "https://github.com/geopython/pygeometa" }, "release_url": "https://pypi.org/project/pygeometa/0.5.0/", "requires_dist": [ "Click", "Jinja2", "pyyaml" ], "requires_python": "", "summary": "pygeometa is a Python package to generate metadata for geospatial datasets", "version": "0.5.0" }, "last_serial": 5550659, "releases": { "0.1.0": [], "0.2.0": [ { "comment_text": "", "digests": { "md5": "4f083dba723435e1f36b08c4762b97bc", "sha256": "e5d59adf506b908113d06f9ca7e5905f815a3c8d52b0d92db19bf675c6c5e38a" }, "downloads": -1, "filename": "pygeometa-0.2.0.tar.gz", "has_sig": false, "md5_digest": "4f083dba723435e1f36b08c4762b97bc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21332, "upload_time": "2017-03-23T19:09:19", "url": "https://files.pythonhosted.org/packages/7d/d2/e9f2de8e02ff9faaf11386a6a84eee6368569e654281497e4a1dcfda8f77/pygeometa-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "d990266cff6db5c43aad7a50f8d51aa9", "sha256": "088b6073dc0f8a97d825ccd2563d8037dc8a1fd8a6b070d99e919ec2a34fc2f4" }, "downloads": -1, "filename": "pygeometa-0.2.1.tar.gz", "has_sig": false, "md5_digest": "d990266cff6db5c43aad7a50f8d51aa9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18496, "upload_time": "2017-03-25T16:53:58", "url": "https://files.pythonhosted.org/packages/f4/8f/1494e9380299c84249a6119b6f77d9845c49d0b32408a7d79a45d0939284/pygeometa-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "c9ced4776171358777a768e7f5e36d29", "sha256": "f7663b4cfea5fd1792faf447e31e53da51f54b64c825a22edbf6427d5ff31637" }, "downloads": -1, "filename": "pygeometa-0.2.2.tar.gz", "has_sig": false, "md5_digest": "c9ced4776171358777a768e7f5e36d29", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18728, "upload_time": "2017-03-25T17:07:31", "url": "https://files.pythonhosted.org/packages/b1/d1/86da0640118bcbdac591f4ffa9fc7e37a9d3b55ef8ef2d59473cad8128a5/pygeometa-0.2.2.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "2a07887de47fea45eb704d7bd85afbd5", "sha256": "9dd0d9f2769502d3f04f87b0b0f0a9fbd21deded0c3180bfdf37cd4f4c58d0af" }, "downloads": -1, "filename": "pygeometa-0.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2a07887de47fea45eb704d7bd85afbd5", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 34234, "upload_time": "2018-02-23T12:01:38", "url": "https://files.pythonhosted.org/packages/9c/ea/c19d13d7c49b4818374f7c580f0f64c42512d9c6db03b62cc8548fa5793a/pygeometa-0.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0659ba217a2e097e2433526c116d450f", "sha256": "5b08e623d47b5825460a78def262b8cd5ae4fc5f24ac0e9f1197b0aac03de760" }, "downloads": -1, "filename": "pygeometa-0.3.0.tar.gz", "has_sig": false, "md5_digest": "0659ba217a2e097e2433526c116d450f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22740, "upload_time": "2018-02-23T11:55:43", "url": "https://files.pythonhosted.org/packages/d2/a6/909ef8798471e1dd40cdea542cbf8e2627471c8e2fa47c33231265ad0a72/pygeometa-0.3.0.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "e16363cb9bf797f0563c54fc663bb085", "sha256": "2c47c4a158b1ccd65203e17916bcd378050ea5b58bed94f88f065c735a675598" }, "downloads": -1, "filename": "pygeometa-0.5.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e16363cb9bf797f0563c54fc663bb085", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 32276, "upload_time": "2019-07-18T11:43:37", "url": "https://files.pythonhosted.org/packages/07/7e/66b73f64ac120d6c5d1c7afb98472913d0c491c1ff085ec349920af54cc6/pygeometa-0.5.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "278e82db78e0e8293ecb28ea5a517a14", "sha256": "fdcf6770408b39751c268770eb4bfe284d81ffc8d6a84dafbd4c80642d8ac691" }, "downloads": -1, "filename": "pygeometa-0.5.0.tar.gz", "has_sig": false, "md5_digest": "278e82db78e0e8293ecb28ea5a517a14", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22662, "upload_time": "2019-07-18T11:43:38", "url": "https://files.pythonhosted.org/packages/3b/d0/9de86a6fadd106089258d6149c523284d0eca85cbe5a809abf4a516b2125/pygeometa-0.5.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e16363cb9bf797f0563c54fc663bb085", "sha256": "2c47c4a158b1ccd65203e17916bcd378050ea5b58bed94f88f065c735a675598" }, "downloads": -1, "filename": "pygeometa-0.5.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e16363cb9bf797f0563c54fc663bb085", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 32276, "upload_time": "2019-07-18T11:43:37", "url": "https://files.pythonhosted.org/packages/07/7e/66b73f64ac120d6c5d1c7afb98472913d0c491c1ff085ec349920af54cc6/pygeometa-0.5.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "278e82db78e0e8293ecb28ea5a517a14", "sha256": "fdcf6770408b39751c268770eb4bfe284d81ffc8d6a84dafbd4c80642d8ac691" }, "downloads": -1, "filename": "pygeometa-0.5.0.tar.gz", "has_sig": false, "md5_digest": "278e82db78e0e8293ecb28ea5a517a14", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22662, "upload_time": "2019-07-18T11:43:38", "url": "https://files.pythonhosted.org/packages/3b/d0/9de86a6fadd106089258d6149c523284d0eca85cbe5a809abf4a516b2125/pygeometa-0.5.0.tar.gz" } ] }