Module pyaurorax.search.sources.classes.data_source_stats

Data source statistics information

Expand source code
# Copyright 2024 University of Calgary
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""
Data source statistics information
"""

import datetime
from typing import Optional
from dataclasses import dataclass


@dataclass
class DataSourceStatistics:
    """
    Data source statistics information

    Attributes:
        ephemeris_count (int): total number of ephemeris records for this data source
        data_product_count (int): total number of ephemeris records for this data source
        earliest_ephemeris_loaded (datetime.datetime): timestamp of the earliest ephemeris record
        latest_ephemeris_loaded (datetime.datetime): timestamp of the latest ephemeris record
        earliest_data_product_loaded (datetime.datetime): timestamp of the earliest data_product record
        latest_data_product_loaded (datetime.datetime): timestamp of the latest data product record
    """
    ephemeris_count: int
    data_product_count: int
    earliest_ephemeris_loaded: Optional[datetime.datetime] = None
    latest_ephemeris_loaded: Optional[datetime.datetime] = None
    earliest_data_product_loaded: Optional[datetime.datetime] = None
    latest_data_product_loaded: Optional[datetime.datetime] = None

Classes

class DataSourceStatistics (ephemeris_count: int, data_product_count: int, earliest_ephemeris_loaded: Optional[datetime.datetime] = None, latest_ephemeris_loaded: Optional[datetime.datetime] = None, earliest_data_product_loaded: Optional[datetime.datetime] = None, latest_data_product_loaded: Optional[datetime.datetime] = None)

Data source statistics information

Attributes

ephemeris_count : int
total number of ephemeris records for this data source
data_product_count : int
total number of ephemeris records for this data source
earliest_ephemeris_loaded : datetime.datetime
timestamp of the earliest ephemeris record
latest_ephemeris_loaded : datetime.datetime
timestamp of the latest ephemeris record
earliest_data_product_loaded : datetime.datetime
timestamp of the earliest data_product record
latest_data_product_loaded : datetime.datetime
timestamp of the latest data product record
Expand source code
@dataclass
class DataSourceStatistics:
    """
    Data source statistics information

    Attributes:
        ephemeris_count (int): total number of ephemeris records for this data source
        data_product_count (int): total number of ephemeris records for this data source
        earliest_ephemeris_loaded (datetime.datetime): timestamp of the earliest ephemeris record
        latest_ephemeris_loaded (datetime.datetime): timestamp of the latest ephemeris record
        earliest_data_product_loaded (datetime.datetime): timestamp of the earliest data_product record
        latest_data_product_loaded (datetime.datetime): timestamp of the latest data product record
    """
    ephemeris_count: int
    data_product_count: int
    earliest_ephemeris_loaded: Optional[datetime.datetime] = None
    latest_ephemeris_loaded: Optional[datetime.datetime] = None
    earliest_data_product_loaded: Optional[datetime.datetime] = None
    latest_data_product_loaded: Optional[datetime.datetime] = None

Class variables

var data_product_count : int
var earliest_data_product_loaded : Optional[datetime.datetime]
var earliest_ephemeris_loaded : Optional[datetime.datetime]
var ephemeris_count : int
var latest_data_product_loaded : Optional[datetime.datetime]
var latest_ephemeris_loaded : Optional[datetime.datetime]