Skip to content

Commit

Permalink
Make date summary stats optional
Browse files Browse the repository at this point in the history
  • Loading branch information
dfalbel committed Sep 30, 2024
1 parent 659e073 commit a699585
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -744,23 +744,28 @@ class SummaryStatsDate(BaseModel):
SummaryStatsDate in Schemas
"""

num_unique: StrictInt = Field(
num_unique: Optional[StrictInt] = Field(
default=None,
description="The exact number of distinct values",
)

min_date: StrictStr = Field(
min_date: Optional[StrictStr] = Field(
default=None,
description="Minimum date value as string",
)

mean_date: StrictStr = Field(
mean_date: Optional[StrictStr] = Field(
default=None,
description="Average date value as string",
)

median_date: StrictStr = Field(
median_date: Optional[StrictStr] = Field(
default=None,
description="Sample median (50% value) date value as string",
)

max_date: StrictStr = Field(
max_date: Optional[StrictStr] = Field(
default=None,
description="Maximum date value as string",
)

Expand All @@ -770,23 +775,28 @@ class SummaryStatsDatetime(BaseModel):
SummaryStatsDatetime in Schemas
"""

num_unique: StrictInt = Field(
num_unique: Optional[StrictInt] = Field(
default=None,
description="The exact number of distinct values",
)

min_date: StrictStr = Field(
min_date: Optional[StrictStr] = Field(
default=None,
description="Minimum date value as string",
)

mean_date: StrictStr = Field(
mean_date: Optional[StrictStr] = Field(
default=None,
description="Average date value as string",
)

median_date: StrictStr = Field(
median_date: Optional[StrictStr] = Field(
default=None,
description="Sample median (50% value) date value as string",
)

max_date: StrictStr = Field(
max_date: Optional[StrictStr] = Field(
default=None,
description="Maximum date value as string",
)

Expand Down
16 changes: 2 additions & 14 deletions positron/comms/data_explorer-backend-openrpc.json
Original file line number Diff line number Diff line change
Expand Up @@ -1043,13 +1043,7 @@
},
"summary_stats_date": {
"type": "object",
"required": [
"num_unique",
"min_date",
"mean_date",
"median_date",
"max_date"
],
"required": [],
"properties": {
"num_unique": {
"type": "integer",
Expand All @@ -1075,13 +1069,7 @@
},
"summary_stats_datetime": {
"type": "object",
"required": [
"num_unique",
"min_date",
"mean_date",
"median_date",
"max_date"
],
"required": [],
"properties": {
"num_unique": {
"type": "integer",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -608,27 +608,27 @@ export interface SummaryStatsDate {
/**
* The exact number of distinct values
*/
num_unique: number;
num_unique?: number;

/**
* Minimum date value as string
*/
min_date: string;
min_date?: string;

/**
* Average date value as string
*/
mean_date: string;
mean_date?: string;

/**
* Sample median (50% value) date value as string
*/
median_date: string;
median_date?: string;

/**
* Maximum date value as string
*/
max_date: string;
max_date?: string;

}

Expand All @@ -639,27 +639,27 @@ export interface SummaryStatsDatetime {
/**
* The exact number of distinct values
*/
num_unique: number;
num_unique?: number;

/**
* Minimum date value as string
*/
min_date: string;
min_date?: string;

/**
* Average date value as string
*/
mean_date: string;
mean_date?: string;

/**
* Sample median (50% value) date value as string
*/
median_date: string;
median_date?: string;

/**
* Maximum date value as string
*/
max_date: string;
max_date?: string;

/**
* Time zone for timestamp with time zone
Expand Down

0 comments on commit a699585

Please sign in to comment.