harmony-py


Nameharmony-py JSON
Version 0.4.12 PyPI version JSON
download
home_pagehttps://github.com/nasa/harmony-py
SummaryThe NASA Harmony Python library
upload_time2024-03-14 16:21:23
maintainer
docs_urlNone
author
requires_python>=3.6, <4
license
keywords nasa harmony remote-sensing science geoscience
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # harmony-py

[![Documentation Status](https://readthedocs.org/projects/harmony-py/badge/?version=latest)](https://harmony-py.readthedocs.io/en/latest/?badge=latest)

Harmony-Py is a Python library for integrating with NASA's [Harmony](https://harmony.earthdata.nasa.gov/) Services.

Harmony-Py provides a Python alternative to directly using [Harmony's RESTful API](https://harmony.earthdata.nasa.gov/docs/api/). It handles NASA [Earthdata Login (EDL)](https://urs.earthdata.nasa.gov/home) authentication and optionally integrates with the [CMR Python Wrapper](https://github.com/nasa/eo-metadata-tools) by accepting collection results as a request parameter. It's convenient for scientists who wish to use Harmony from Jupyter notebooks as well as machine-to-machine communication with larger Python applications.

We welcome feedback on Harmony-Py via [GitHub Issues](https://github.com/nasa/harmony-py/issues)

# Using Harmony Py

## Prerequisites

* Python 3.8+


## Installing

The library is available from [PyPI](https://pypi.org/project/harmony-py/) and can be installed with pip:

        $ pip install -U harmony-py

This will install harmony-py and its dependencies into your current Python environment. It's recommended that you install harmony-py into a virtual environment along with any other dependencies you may have.


# Running Examples & Developing on Harmony Py

## Prerequisites

* Python 3.7+, ideally installed via a virtual environment


## Installing Development & Example Dependencies

1. Install dependencies:

        $ make install

2. Optionally register your local copy with pip:

        $ pip install -e ./path/to/harmony_py


## Running the Example Jupyter Notebooks

Jupyter notebooks in the `examples` subdirectory show how to use the Harmony Py library. Start up the Jupyter Lab notebook server and run these examples:

The Jupyter Lab server will start and [open in your browser](http://localhost:8888/lab). Double-click on a notebook in the file-browser sidebar and run the notebook. Note that some notebooks may have cells which prompt for your EDL username and password. Be sure to use your UAT credentials since most of the example notebooks use the Harmony UAT environment.

        $ make examples


## Developing

### Generating Documentation

Documentation on the Read The Docs site is generated automatically. It is generated by using `sphinx` with reStructuredText (.rst) and other files in the `docs` directory. To generate the docs locally and see what they look like:

        $ make docs

You can then view the documentation in a web browser under `./docs/_build/html/index.html`.

IMPORTANT: The documentation uses a notebook from the `examples` directory rendered as HTML. If you've modified that notebook (see `Makefile` for notebook that is currently rendered), you will need to run `make docs` locally. You will see a change to the `docs/user/notebook.html` file after doing so. This file should be committed to the git repo since it is used when the latest docs are pushed to the Read The Docs site (it can't currently be generated as part of the build).

### Running the Linter & Unit Tests

Run the linter on the project source:

        $ make lint

Run unit tests and test coverage. This will display terminal output and generate an HTML coverage report in the `htmlcov` directory.

        $ make test

For development, you may want to run the unit tests continuously as you update tests and the code-under-test:

        $ make test-watch


### Generating Request Parameters

The `harmony.Request` constructor can accept parameters that are defined in the [Harmony OGC API schema](). If this schema has been changed and the `Request` constructor needs to be updated, you may run the generator utility. This tool reads the Harmony schema and generates a partial constructor signature with docstrings:

        $ python internal/genparams.py ${HARMONY_DIR}/app/schemas/ogc-api-coverages/1.0.0/ogc-api-coverages-v1.0.0.yml

Either set `HARMONY_DIR` or replace it with your Harmony project directory path. You may then write standard output to a file and then use it to update the `harmony.Request` constructor and code.

## CI

Harmony-py uses [GitHub
Actions](https://github.com/nasa/harmony-py/actions) to run the Linter
& Unit Tests. The test coverage output is saved as a build artifact.

## Building and Releasing

New versions of Harmony-Py will be published to PyPi via a GitHub [action](.github/workflows/publish-release.yml) whenever a draft release is marked as published https://github.com/nasa/harmony-py/releases.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/nasa/harmony-py",
    "name": "harmony-py",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6, <4",
    "maintainer_email": "",
    "keywords": "nasa,harmony,remote-sensing,science,geoscience",
    "author": "",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/1c/aa/927a4952102fc8deb8b4fa5d175642f18c4eb9703d81dd9cac857b7d42fe/harmony-py-0.4.12.tar.gz",
    "platform": null,
    "description": "# harmony-py\n\n[![Documentation Status](https://readthedocs.org/projects/harmony-py/badge/?version=latest)](https://harmony-py.readthedocs.io/en/latest/?badge=latest)\n\nHarmony-Py is a Python library for integrating with NASA's [Harmony](https://harmony.earthdata.nasa.gov/) Services.\n\nHarmony-Py provides a Python alternative to directly using [Harmony's RESTful API](https://harmony.earthdata.nasa.gov/docs/api/). It handles NASA [Earthdata Login (EDL)](https://urs.earthdata.nasa.gov/home) authentication and optionally integrates with the [CMR Python Wrapper](https://github.com/nasa/eo-metadata-tools) by accepting collection results as a request parameter. It's convenient for scientists who wish to use Harmony from Jupyter notebooks as well as machine-to-machine communication with larger Python applications.\n\nWe welcome feedback on Harmony-Py via [GitHub Issues](https://github.com/nasa/harmony-py/issues)\n\n# Using Harmony Py\n\n## Prerequisites\n\n* Python 3.8+\n\n\n## Installing\n\nThe library is available from [PyPI](https://pypi.org/project/harmony-py/) and can be installed with pip:\n\n        $ pip install -U harmony-py\n\nThis will install harmony-py and its dependencies into your current Python environment. It's recommended that you install harmony-py into a virtual environment along with any other dependencies you may have.\n\n\n# Running Examples & Developing on Harmony Py\n\n## Prerequisites\n\n* Python 3.7+, ideally installed via a virtual environment\n\n\n## Installing Development & Example Dependencies\n\n1. Install dependencies:\n\n        $ make install\n\n2. Optionally register your local copy with pip:\n\n        $ pip install -e ./path/to/harmony_py\n\n\n## Running the Example Jupyter Notebooks\n\nJupyter notebooks in the `examples` subdirectory show how to use the Harmony Py library. Start up the Jupyter Lab notebook server and run these examples:\n\nThe Jupyter Lab server will start and [open in your browser](http://localhost:8888/lab). Double-click on a notebook in the file-browser sidebar and run the notebook. Note that some notebooks may have cells which prompt for your EDL username and password. Be sure to use your UAT credentials since most of the example notebooks use the Harmony UAT environment.\n\n        $ make examples\n\n\n## Developing\n\n### Generating Documentation\n\nDocumentation on the Read The Docs site is generated automatically. It is generated by using `sphinx` with reStructuredText (.rst) and other files in the `docs` directory. To generate the docs locally and see what they look like:\n\n        $ make docs\n\nYou can then view the documentation in a web browser under `./docs/_build/html/index.html`.\n\nIMPORTANT: The documentation uses a notebook from the `examples` directory rendered as HTML. If you've modified that notebook (see `Makefile` for notebook that is currently rendered), you will need to run `make docs` locally. You will see a change to the `docs/user/notebook.html` file after doing so. This file should be committed to the git repo since it is used when the latest docs are pushed to the Read The Docs site (it can't currently be generated as part of the build).\n\n### Running the Linter & Unit Tests\n\nRun the linter on the project source:\n\n        $ make lint\n\nRun unit tests and test coverage. This will display terminal output and generate an HTML coverage report in the `htmlcov` directory.\n\n        $ make test\n\nFor development, you may want to run the unit tests continuously as you update tests and the code-under-test:\n\n        $ make test-watch\n\n\n### Generating Request Parameters\n\nThe `harmony.Request` constructor can accept parameters that are defined in the [Harmony OGC API schema](). If this schema has been changed and the `Request` constructor needs to be updated, you may run the generator utility. This tool reads the Harmony schema and generates a partial constructor signature with docstrings:\n\n        $ python internal/genparams.py ${HARMONY_DIR}/app/schemas/ogc-api-coverages/1.0.0/ogc-api-coverages-v1.0.0.yml\n\nEither set `HARMONY_DIR` or replace it with your Harmony project directory path. You may then write standard output to a file and then use it to update the `harmony.Request` constructor and code.\n\n## CI\n\nHarmony-py uses [GitHub\nActions](https://github.com/nasa/harmony-py/actions) to run the Linter\n& Unit Tests. The test coverage output is saved as a build artifact.\n\n## Building and Releasing\n\nNew versions of Harmony-Py will be published to PyPi via a GitHub [action](.github/workflows/publish-release.yml) whenever a draft release is marked as published https://github.com/nasa/harmony-py/releases.\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "The NASA Harmony Python library",
    "version": "0.4.12",
    "project_urls": {
        "Homepage": "https://github.com/nasa/harmony-py"
    },
    "split_keywords": [
        "nasa",
        "harmony",
        "remote-sensing",
        "science",
        "geoscience"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "984c544c7d4ad2ec2732b59e6078281920cac6cc187ebd42893a2c94301f4128",
                "md5": "678b625a60a2e32348382f04f4a63a74",
                "sha256": "526405f0cec67a5545609e7ded56fc279b036ebd2cf08606b8e05fc5fc7f61ec"
            },
            "downloads": -1,
            "filename": "harmony_py-0.4.12-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "678b625a60a2e32348382f04f4a63a74",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6, <4",
            "size": 25263,
            "upload_time": "2024-03-14T16:21:22",
            "upload_time_iso_8601": "2024-03-14T16:21:22.017660Z",
            "url": "https://files.pythonhosted.org/packages/98/4c/544c7d4ad2ec2732b59e6078281920cac6cc187ebd42893a2c94301f4128/harmony_py-0.4.12-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1caa927a4952102fc8deb8b4fa5d175642f18c4eb9703d81dd9cac857b7d42fe",
                "md5": "fe3c2e1c8f918eaf1e4a18f604231a94",
                "sha256": "735b1410306110e6a0e76c305db98730d0060389fdc9e8403d2e4b0049143355"
            },
            "downloads": -1,
            "filename": "harmony-py-0.4.12.tar.gz",
            "has_sig": false,
            "md5_digest": "fe3c2e1c8f918eaf1e4a18f604231a94",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6, <4",
            "size": 40099,
            "upload_time": "2024-03-14T16:21:23",
            "upload_time_iso_8601": "2024-03-14T16:21:23.337726Z",
            "url": "https://files.pythonhosted.org/packages/1c/aa/927a4952102fc8deb8b4fa5d175642f18c4eb9703d81dd9cac857b7d42fe/harmony-py-0.4.12.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-14 16:21:23",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "nasa",
    "github_project": "harmony-py",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "harmony-py"
}
        
Elapsed time: 0.21430s