Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dependency(nivo): updated d3-color dependency #165

Merged
merged 1 commit into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions datachecks/report/dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def build(self):
[dashboard, metrics] = self.__build_params()
return DashboardInfo(name="test", metrics=metrics, dashboard=dashboard)

def __build_params(self) -> DashboardMetricOverview:
def __build_params(self):
data = self.inspect_data

self.metrics = []
Expand Down Expand Up @@ -170,12 +170,11 @@ def __build_params(self) -> DashboardMetricOverview:
else:
for metric_identifier, metric in ds_metrics.metrics.items():
self._insert_value(metric)

self.calculate_health_score()
return [self.dashboard, self.metrics]

def _insert_value(self, metric):
for metric_type in GroupedMetricsType.__dataclass_fields__.keys():
for metric_type in GroupedMetricsType.__members__.keys():
if metric.metric_type in GroupedMetricsType[metric_type].value:
current = getattr(self.dashboard, metric_type)
overall = getattr(self.dashboard, "overall")
Expand Down
31 changes: 11 additions & 20 deletions datachecks/report/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,26 +64,17 @@ class DashboardInfo:
dashboard: DashboardMetricOverview


@dataclass
class GroupedMetricsType(str, Enum):
reliability: List[str] = dataclasses.field(
default_factory=lambda: ["row_count", "document_count", "freshness"]
)
numeric: List[str] = dataclasses.field(
default_factory=lambda: ["min", "max", "avg", "sum", "stddev", "variance"]
)
uniqueness: List[str] = dataclasses.field(
default_factory=lambda: ["distinct_count", "duplicate_count"]
)
completeness: List[str] = dataclasses.field(
default_factory=lambda: [
"null_count",
"null_percentage",
"empty_string_count",
"empty_string_percentage",
]
)
custom: List[str] = dataclasses.field(default_factory=lambda: ["combined"])
class GroupedMetricsType(List[str], Enum):
reliability = ["row_count", "document_count", "freshness"]
numeric = ["min", "max", "avg", "sum", "stddev", "variance"]
uniqueness = ["distinct_count", "duplicate_count"]
completeness = [
"null_count",
"null_percentage",
"empty_string_count",
"empty_string_percentage",
]
custom = ["combined"]


@dataclass
Expand Down
2 changes: 1 addition & 1 deletion datachecks/report/static/index.js

Large diffs are not rendered by default.

32 changes: 0 additions & 32 deletions datachecks/report/static/index.js.LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3034,10 +3034,6 @@
!*** ./node_modules/@tanstack/match-sorter-utils/build/lib/index.mjs ***!
\***********************************************************************/

/*!***********************************************************************!*\
!*** ./node_modules/d3-interpolate/node_modules/d3-color/src/math.js ***!
\***********************************************************************/

/*!***********************************************************************!*\
!*** ./node_modules/d3-scale-chromatic/src/categorical/category10.js ***!
\***********************************************************************/
Expand Down Expand Up @@ -3102,10 +3098,6 @@
!*** ./node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js ***!
\************************************************************************/

/*!************************************************************************!*\
!*** ./node_modules/d3-interpolate/node_modules/d3-color/src/color.js ***!
\************************************************************************/

/*!************************************************************************!*\
!*** ./node_modules/d3-scale-chromatic/src/sequential-multi/PuBuGn.js ***!
\************************************************************************/
Expand Down Expand Up @@ -3178,10 +3170,6 @@
!*** ./node_modules/@react-spring/web/dist/react-spring_web.modern.mjs ***!
\*************************************************************************/

/*!*************************************************************************!*\
!*** ./node_modules/d3-interpolate/node_modules/d3-color/src/define.js ***!
\*************************************************************************/

/*!*************************************************************************!*\
!*** ./node_modules/d3-scale-chromatic/src/sequential-multi/cividis.js ***!
\*************************************************************************/
Expand Down Expand Up @@ -3310,10 +3298,6 @@
!*** ./node_modules/@react-spring/core/dist/react-spring_core.modern.mjs ***!
\***************************************************************************/

/*!***************************************************************************!*\
!*** ./node_modules/d3-scale-chromatic/node_modules/d3-color/src/math.js ***!
\***************************************************************************/

/*!***************************************************************************!*\
!*** ./node_modules/d3-scale-chromatic/src/sequential-multi/cubehelix.js ***!
\***************************************************************************/
Expand Down Expand Up @@ -3394,14 +3378,6 @@
!*** ./node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js ***!
\****************************************************************************/

/*!****************************************************************************!*\
!*** ./node_modules/d3-interpolate/node_modules/d3-color/src/cubehelix.js ***!
\****************************************************************************/

/*!****************************************************************************!*\
!*** ./node_modules/d3-scale-chromatic/node_modules/d3-color/src/color.js ***!
\****************************************************************************/

/*!****************************************************************************!*\
!*** ./node_modules/d3-scale/node_modules/d3-format/src/formatNumerals.js ***!
\****************************************************************************/
Expand Down Expand Up @@ -3454,10 +3430,6 @@
!*** ./node_modules/@react-spring/types/dist/react-spring_types.modern.mjs ***!
\*****************************************************************************/

/*!*****************************************************************************!*\
!*** ./node_modules/d3-scale-chromatic/node_modules/d3-color/src/define.js ***!
\*****************************************************************************/

/*!*****************************************************************************!*\
!*** ./node_modules/d3-scale/node_modules/d3-format/src/formatSpecifier.js ***!
\*****************************************************************************/
Expand Down Expand Up @@ -3578,10 +3550,6 @@
!*** ./node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js ***!
\********************************************************************************/

/*!********************************************************************************!*\
!*** ./node_modules/d3-scale-chromatic/node_modules/d3-color/src/cubehelix.js ***!
\********************************************************************************/

/*!********************************************************************************!*\
!*** ./src/components/Preview/Overview/MetricContent/MetricContent.module.css ***!
\********************************************************************************/
Expand Down
4 changes: 2 additions & 2 deletions examples/configurations/example_postgres_config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Data sources to query
data_sources:
- name: iris_pgsql
- name: iris
type: postgres
connection:
host: 127.0.0.1
Expand Down Expand Up @@ -132,4 +132,4 @@ metrics:
storage:
type: local_file|s3|elastic|postgres|clickhouse
params:
path: /Users/subhankar/Work/datageek00/dcs_metrics
path: /Users/subhankar/Work/datageek00/dcs_metrics
4 changes: 3 additions & 1 deletion ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@
"ts-loader": "^9.5.1",
"webpack": "^5.89.0"
},
"resolutions": {},
"resolutions": {
"d3-color": "^3.1.0"
},
"devDependencies": {
"source-map-explorer": "^2.5.0",
"terser-webpack-plugin": "^5.3.1",
Expand Down
8 changes: 8 additions & 0 deletions ui/src/types/component.type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ export interface MetricHeader {
export const TabsProps: TabsOwnProps = {
sx: {
borderColor: "divider",
"& .MuiTouchRipple-root": {
color: "rgba(163, 229, 246, 0.376)",
borderRadius: "10px",
},
},
variant: "scrollable",
textColor: "inherit",
Expand All @@ -42,6 +46,10 @@ export const TabsProps: TabsOwnProps = {
export const VerticalTabsProps: TabsOwnProps = {
sx: {
borderColor: "divider",
"& .MuiTouchRipple-root": {
color: "rgba(163, 229, 246, 0.376)",
borderRadius: "10px",
},
},
orientation: "vertical",
variant: "scrollable",
Expand Down
7 changes: 1 addition & 6 deletions ui/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1905,12 +1905,7 @@ d3-array@2, d3-array@^2.3.0:
dependencies:
internmap "^1.0.0"

"d3-color@1 - 2":
version "2.0.0"
resolved "https://registry.yarnpkg.com/d3-color/-/d3-color-2.0.0.tgz#8d625cab42ed9b8f601a1760a389f7ea9189d62e"
integrity sha512-SPXi0TSKPD4g9tw0NMZFnR95XVgUZiBH+uUTqQuDu1OsE2zomHU7ho0FISciaPvosimixwHFl3WHLGabv6dDgQ==

"d3-color@1 - 3", d3-color@^3.1.0:
"d3-color@1 - 2", "d3-color@1 - 3", d3-color@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/d3-color/-/d3-color-3.1.0.tgz#395b2833dfac71507f12ac2f7af23bf819de24e2"
integrity sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==
Expand Down
Loading