lsst-efd-client


Namelsst-efd-client JSON
Version 0.13.1 PyPI version JSON
download
home_pagehttps://github.com/lsst-sqre/lsst-efd-client
SummaryUtility classes for working with the LSST EFD.
upload_time2023-07-01 13:34:05
maintainer
docs_urlNone
authorSimon Krughoff
requires_python>=3.5
licenseMIT license
keywords lsst efd
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            ===============
LSST EFD Client
===============


.. image:: https://img.shields.io/pypi/v/lsst-efd-client.svg
           :target: https://pypi.python.org/pypi/lsst-efd-client

.. image:: https://img.shields.io/travis/lsst-sqre/lsst-efd-client.svg
           :target: https://travis-ci.com/lsst-sqre/lsst-efd-client



Utility classes for working with the LSST EFD.


* Free software: MIT license


Features
--------

* The client `EfdClient`, has several useful functions.

  * `get_topics`: Return the topics in the EFD.
  * `get_fields`: Return the fields in a particular topic
  * `build_time_range_query`: Build an InfluxQL query for a topic and time range
  * `select_time_series`: Return a DataFrame containing results of a time range query
  * `select_packed_time_series`: Return a DataFrame with high cadence telemetry expanded into a single DataFrame.
  * `select_top_n`: Return a DataFrame with the results of just the most recent rows.
  * `get_schema`: Get metadata for the fields in a particular topic.

* There are also some utilities for dealing with results of queries

  * `merge_packed_time_series`: Takes a dataframe with records that have multiple samples per entry and returns a dataframe with one record per sample.
  * `rendezvous_dataframes`: Extend on dataframe with data from another dataframe using the closest record in time in the past, in the future, or nearest overall.

See example notebooks here_.

.. _here: https://github.com/lsst-sqre/notebook-demo/tree/master/experiments/efd

For more information, see the online docs_.

.. _docs: https://efd-client.lsst.io

CONTRIBUTING
------------

For information on contributing to this project see this_ page.

.. _this: https://github.com/lsst-sqre/lsst-efd-client/blob/master/CONTRIBUTING.rst

Credits
-------

This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage


=======
History
=======

0.1.0 (2019-12-23)
------------------

* First release on PyPI.

0.2.0 (2019-01-15)
------------------

* Minimal functionality in place.
* Docstrings complete.

0.3.0 (2019-01-31)
------------------

* Unit tests added.

0.4.0 (2019-01-31)
------------------

* Very minor doc updates.
* Accidently pushed minor version when patch was meant.

0.5.0 (2020-05-29)
------------------

* Switch to the segwarides based credentials.

0.6.0 (2021-02-11)
------------------

* Fix bug in listing possible endpoints
* Add some utility functionality and speed up unpacking packed time series (thank you RHL)

0.6.4 (2021-02-15)
------------------

* Fix a regression that causes an exception when the name of one column is the same as the start of the name of another column
* Add a test for the regression

0.7.0 (2021-03-24)
------------------

* Add the get_schema method to fetch metadata about topic fields
* Add a test for the schema parser

0.8.2 (2021-05-25)
------------------

* Deal gracefully with topics that have no description or units (Thanks Angelo!)
* Add a parameter to allow a time threshold when selecting top N (Thanks Michael!)

0.8.3 (2021-06-11)
------------------

* Add column specifying if a field in the schema is array-like.
* Check for both conventions indicating unitless columns when creating astropy units.

0.9.0 (2021-10-05)
------------------

* This changes the convention to using UTC as the internal representation.
  This mirrors a change in the influxDB to store index timestamps as UTC.
  There is a switch to convert the index from TAI to UTC, but the default is to assume UTC everywhere.

0.9.1 (2021-10-28)
------------------

* Fix various bugs left over from the UTC conversions.
  The most important of these is correcting how the index for packed time series is handled.
  The other is in the implementation fow how we attempt to handle legacy databases with the index still in TAI.

0.10.0 (2021-11-18)
-------------------

* Change how ports are handled.
  This forces the port to be sent with the rest of the auth information and removes the ability to pass an override port.

0.10.2 (2022-05-03)
-------------------

* Allow astropy to raise an exception for malformed units in the topic schema.

0.11.0 (2022-05-24)
-------------------

* Updates to API calls to handle SAL 7 change to indexed component ID field.
* Add timeout option to the EFD client.
  Set the `aiohttp.client` timeout when working with chunked queries. Set a default timeout of 900 seconds.

0.12.0 (2022-07-27)
-------------------

* The auth helper can now use a path attribute to connect to an InfluxDB instance.

0.13.0 (2023-06-26)
-------------------

* `EfdClient` now accepts non-UTC astropy.time.Time values (converting them, if necessary).
* Fix unit tests:

  * Update ``casettes/*.yaml`` to include "path" as a returned value.
  * Change fixture ``efd_client`` to an async context manager ``make_efd_client`` and call it explicitly.
  * Import ``vcr`` explicitly and configure it so that it fails if the specified cassette files cannot be found or used.
    This avoids two sources of mysterious failures.
  * Consolidate a few tests to make it clearer that they are testing the same thing, and to reduce the number of cassette files needed.

* Run black and isort on the code.

0.13.1 (2023-07-01)
-------------------

* numpy 1.25.0 breaks compatibility with aioinflux. 
  Pin numpy to version 1.23.5


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/lsst-sqre/lsst-efd-client",
    "name": "lsst-efd-client",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.5",
    "maintainer_email": "",
    "keywords": "LSST,EFD",
    "author": "Simon Krughoff",
    "author_email": "krughoff@lsst.org",
    "download_url": "https://files.pythonhosted.org/packages/c5/e5/a587e2bf5343f930ebb3b11956dd731ccea8e4d7d1e3196d90d3ea423f2d/lsst-efd-client-0.13.1.tar.gz",
    "platform": null,
    "description": "===============\nLSST EFD Client\n===============\n\n\n.. image:: https://img.shields.io/pypi/v/lsst-efd-client.svg\n           :target: https://pypi.python.org/pypi/lsst-efd-client\n\n.. image:: https://img.shields.io/travis/lsst-sqre/lsst-efd-client.svg\n           :target: https://travis-ci.com/lsst-sqre/lsst-efd-client\n\n\n\nUtility classes for working with the LSST EFD.\n\n\n* Free software: MIT license\n\n\nFeatures\n--------\n\n* The client `EfdClient`, has several useful functions.\n\n  * `get_topics`: Return the topics in the EFD.\n  * `get_fields`: Return the fields in a particular topic\n  * `build_time_range_query`: Build an InfluxQL query for a topic and time range\n  * `select_time_series`: Return a DataFrame containing results of a time range query\n  * `select_packed_time_series`: Return a DataFrame with high cadence telemetry expanded into a single DataFrame.\n  * `select_top_n`: Return a DataFrame with the results of just the most recent rows.\n  * `get_schema`: Get metadata for the fields in a particular topic.\n\n* There are also some utilities for dealing with results of queries\n\n  * `merge_packed_time_series`: Takes a dataframe with records that have multiple samples per entry and returns a dataframe with one record per sample.\n  * `rendezvous_dataframes`: Extend on dataframe with data from another dataframe using the closest record in time in the past, in the future, or nearest overall.\n\nSee example notebooks here_.\n\n.. _here: https://github.com/lsst-sqre/notebook-demo/tree/master/experiments/efd\n\nFor more information, see the online docs_.\n\n.. _docs: https://efd-client.lsst.io\n\nCONTRIBUTING\n------------\n\nFor information on contributing to this project see this_ page.\n\n.. _this: https://github.com/lsst-sqre/lsst-efd-client/blob/master/CONTRIBUTING.rst\n\nCredits\n-------\n\nThis package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage\n\n\n=======\nHistory\n=======\n\n0.1.0 (2019-12-23)\n------------------\n\n* First release on PyPI.\n\n0.2.0 (2019-01-15)\n------------------\n\n* Minimal functionality in place.\n* Docstrings complete.\n\n0.3.0 (2019-01-31)\n------------------\n\n* Unit tests added.\n\n0.4.0 (2019-01-31)\n------------------\n\n* Very minor doc updates.\n* Accidently pushed minor version when patch was meant.\n\n0.5.0 (2020-05-29)\n------------------\n\n* Switch to the segwarides based credentials.\n\n0.6.0 (2021-02-11)\n------------------\n\n* Fix bug in listing possible endpoints\n* Add some utility functionality and speed up unpacking packed time series (thank you RHL)\n\n0.6.4 (2021-02-15)\n------------------\n\n* Fix a regression that causes an exception when the name of one column is the same as the start of the name of another column\n* Add a test for the regression\n\n0.7.0 (2021-03-24)\n------------------\n\n* Add the get_schema method to fetch metadata about topic fields\n* Add a test for the schema parser\n\n0.8.2 (2021-05-25)\n------------------\n\n* Deal gracefully with topics that have no description or units (Thanks Angelo!)\n* Add a parameter to allow a time threshold when selecting top N (Thanks Michael!)\n\n0.8.3 (2021-06-11)\n------------------\n\n* Add column specifying if a field in the schema is array-like.\n* Check for both conventions indicating unitless columns when creating astropy units.\n\n0.9.0 (2021-10-05)\n------------------\n\n* This changes the convention to using UTC as the internal representation.\n  This mirrors a change in the influxDB to store index timestamps as UTC.\n  There is a switch to convert the index from TAI to UTC, but the default is to assume UTC everywhere.\n\n0.9.1 (2021-10-28)\n------------------\n\n* Fix various bugs left over from the UTC conversions.\n  The most important of these is correcting how the index for packed time series is handled.\n  The other is in the implementation fow how we attempt to handle legacy databases with the index still in TAI.\n\n0.10.0 (2021-11-18)\n-------------------\n\n* Change how ports are handled.\n  This forces the port to be sent with the rest of the auth information and removes the ability to pass an override port.\n\n0.10.2 (2022-05-03)\n-------------------\n\n* Allow astropy to raise an exception for malformed units in the topic schema.\n\n0.11.0 (2022-05-24)\n-------------------\n\n* Updates to API calls to handle SAL 7 change to indexed component ID field.\n* Add timeout option to the EFD client.\n  Set the `aiohttp.client` timeout when working with chunked queries. Set a default timeout of 900 seconds.\n\n0.12.0 (2022-07-27)\n-------------------\n\n* The auth helper can now use a path attribute to connect to an InfluxDB instance.\n\n0.13.0 (2023-06-26)\n-------------------\n\n* `EfdClient` now accepts non-UTC astropy.time.Time values (converting them, if necessary).\n* Fix unit tests:\n\n  * Update ``casettes/*.yaml`` to include \"path\" as a returned value.\n  * Change fixture ``efd_client`` to an async context manager ``make_efd_client`` and call it explicitly.\n  * Import ``vcr`` explicitly and configure it so that it fails if the specified cassette files cannot be found or used.\n    This avoids two sources of mysterious failures.\n  * Consolidate a few tests to make it clearer that they are testing the same thing, and to reduce the number of cassette files needed.\n\n* Run black and isort on the code.\n\n0.13.1 (2023-07-01)\n-------------------\n\n* numpy 1.25.0 breaks compatibility with aioinflux. \n  Pin numpy to version 1.23.5\n\n",
    "bugtrack_url": null,
    "license": "MIT license",
    "summary": "Utility classes for working with the LSST EFD.",
    "version": "0.13.1",
    "project_urls": {
        "Homepage": "https://github.com/lsst-sqre/lsst-efd-client"
    },
    "split_keywords": [
        "lsst",
        "efd"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6998787366248997b027b0a8b1320a666755b5c14a27358da3daac5c3de44122",
                "md5": "2521577b23730e72a4d8baf7c5f9b9eb",
                "sha256": "e8e1d32581daa390bfc9a8c68c81c7dd2155c8e6ff3ddb111cddf4fa077284ef"
            },
            "downloads": -1,
            "filename": "lsst_efd_client-0.13.1-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2521577b23730e72a4d8baf7c5f9b9eb",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.5",
            "size": 12997,
            "upload_time": "2023-07-01T13:34:02",
            "upload_time_iso_8601": "2023-07-01T13:34:02.669674Z",
            "url": "https://files.pythonhosted.org/packages/69/98/787366248997b027b0a8b1320a666755b5c14a27358da3daac5c3de44122/lsst_efd_client-0.13.1-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c5e5a587e2bf5343f930ebb3b11956dd731ccea8e4d7d1e3196d90d3ea423f2d",
                "md5": "e8cda45e3743ad2d390bec8e63306f64",
                "sha256": "ffb7c0bbec02e0b36e488dd4e0c695b0f3fe24c77106e688f8d2cff92c8e7af7"
            },
            "downloads": -1,
            "filename": "lsst-efd-client-0.13.1.tar.gz",
            "has_sig": false,
            "md5_digest": "e8cda45e3743ad2d390bec8e63306f64",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.5",
            "size": 3071023,
            "upload_time": "2023-07-01T13:34:05",
            "upload_time_iso_8601": "2023-07-01T13:34:05.695460Z",
            "url": "https://files.pythonhosted.org/packages/c5/e5/a587e2bf5343f930ebb3b11956dd731ccea8e4d7d1e3196d90d3ea423f2d/lsst-efd-client-0.13.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-01 13:34:05",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "lsst-sqre",
    "github_project": "lsst-efd-client",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "lsst-efd-client"
}
        
Elapsed time: 0.08442s