From 78ede590ee20e0cdfbe691e0e0f06575be1e46d7 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 2 Feb 2023 13:23:11 -0500 Subject: [PATCH] chore(frontend): Spelling (#19676) Signed-off-by: Josh Soref Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> Co-authored-by: Josh Soref --- scripts/generate_frontend_ts_tasklist.js | 4 ++-- .../cypress/integration/dashboard/utils.ts | 2 +- .../cypress/support/directories.ts | 12 ++++++------ superset-frontend/jest.config.js | 2 +- .../templates/src/plugin/controlPanel.erb | 4 ++-- .../src/operators/renameOperator.ts | 10 +++++----- .../src/operators/timeCompareOperator.ts | 4 ++-- .../src/operators/utils/isDerivedSeries.ts | 4 ++-- .../src/operators/utils/isTimeComparison.ts | 4 ++-- .../src/sections/advancedAnalytics.tsx | 10 +++++----- .../ColumnConfigControl/constants.tsx | 2 +- .../src/shared-controls/sharedControls.tsx | 4 ++-- .../superset-ui-chart-controls/src/types.ts | 4 ++-- .../src/utils/expandControlConfig.tsx | 2 +- .../test/operators/renameOperator.test.ts | 10 +++++----- .../operators/rollingWindowOperator.test.ts | 4 ++-- .../test/operators/timeCompareOperator.test.ts | 4 ++-- .../operators/utils/isDerivedSeries.test.ts | 18 +++++++++--------- .../src/chart/components/SuperChart.tsx | 2 +- .../src/math-expression/index.ts | 2 +- .../src/query/buildQueryObject.ts | 2 +- .../src/query/normalizeOrderBy.ts | 2 +- .../src/query/types/AdvancedAnalytics.ts | 4 ++-- .../src/query/types/PostProcessing.ts | 6 +++--- .../superset-ui-core/src/translation/index.ts | 2 +- .../test/models/Registry.test.ts | 2 +- .../factories/createD3NumberFormatter.test.ts | 2 +- .../test/query/types/PostProcessing.test.ts | 4 ++-- .../superset-ui-core/types/external.d.ts | 2 +- .../Area/stories/controlsShown.tsx | 2 +- .../Area/stories/expanded.tsx | 2 +- .../Area/stories/stackedWithBounds.tsx | 4 ++-- .../superset-ui-chart/SuperChartStories.tsx | 2 +- .../superset-ui-switchboard/src/switchboard.ts | 2 +- .../src/index.js | 2 +- .../legacy-plugin-chart-heatmap/src/Heatmap.js | 2 +- .../src/ReactParallelCoordinates.jsx | 6 +++--- .../src/SankeyLoop.js | 4 ++-- .../src/components/PlaySlider.jsx | 4 ++-- .../src/layers/Polygon/Polygon.jsx | 4 ++-- .../src/layers/Scatter/controlPanel.ts | 2 +- .../src/utilities/Shared_DeckGL.jsx | 8 ++++---- .../src/utils/fitViewport.ts | 2 +- .../src/utils/time.js | 8 ++++---- .../src/Pie/controlPanel.ts | 2 +- .../src/Radar/buildQuery.ts | 4 ++-- .../plugin-chart-echarts/src/Radar/index.ts | 2 +- .../src/Tree/controlPanel.tsx | 2 +- .../plugin-chart-echarts/src/Treemap/index.ts | 4 ++-- .../test/MixedTimeseries/buildQuery.test.ts | 6 +++--- .../test/plugin/transformProps.test.ts | 4 ++-- .../plugin-chart-table/src/TableChart.tsx | 2 +- .../plugin-chart-table/src/buildQuery.ts | 4 ++-- .../utils/convertScaleToDataUIScaleShape.ts | 2 +- .../DeprecatedSelect/DeprecatedSelect.tsx | 4 ++-- .../Form/LabeledErrorBoundInput.test.jsx | 1 - .../src/components/ListView/utils.ts | 2 +- .../src/components/Select/Select.stories.tsx | 2 +- .../PropertiesModal/PropertiesModal.test.tsx | 2 +- .../dashboard/components/SliceHeader/index.tsx | 2 +- .../components/dnd/dragDroppableConfig.js | 2 +- .../components/gridComponents/Chart.jsx | 2 +- .../components/gridComponents/Tabs.test.jsx | 2 +- .../FiltersConfigForm/getControlItemsMap.tsx | 2 +- .../dashboard/util/filterboxMigrationHelper.ts | 6 +++--- .../src/explore/components/Control.test.tsx | 2 +- .../explore/components/ExploreChartPanel.jsx | 2 +- .../components/controls/ColorPickerControl.jsx | 4 ++-- .../controls/ColorSchemeControl/index.tsx | 2 +- .../controls/DateFilterControl/types.ts | 2 +- .../controls/MetricControl/AdhocMetric.js | 2 +- .../explore/exploreUtils/getHostName.test.ts | 2 +- superset-frontend/src/explore/store.js | 2 +- superset-frontend/src/preamble.ts | 2 +- ...mponents.ts => setupDashboardComponents.ts} | 0 .../src/utils/getClientErrorObject.ts | 2 +- .../views/CRUD/annotation/AnnotationList.tsx | 2 +- .../CRUD/annotation/AnnotationModal.test.jsx | 4 ++-- .../views/CRUD/annotation/AnnotationModal.tsx | 8 ++++---- .../views/CRUD/data/database/DatabaseList.tsx | 4 ++-- .../DatabaseConnectionForm/EncryptedField.tsx | 4 ++-- .../CRUD/data/database/DatabaseModal/index.tsx | 2 +- .../CRUD/data/database/DatabaseModal/styles.ts | 2 +- superset-frontend/src/views/CRUD/types.ts | 2 +- superset-frontend/src/views/CRUD/utils.tsx | 2 +- .../src/views/CRUD/welcome/ActivityTable.tsx | 2 +- .../src/views/CRUD/welcome/Welcome.tsx | 4 ++-- .../src/views/components/RightMenu.tsx | 4 ++-- .../src/views/components/types.ts | 2 +- superset-frontend/webpack.config.js | 4 ++-- superset/charts/schemas.py | 12 ++++++------ superset/cli/importexport.py | 8 ++++---- superset/datasets/commands/importers/v0.py | 2 +- .../dashboards/COVID_Vaccine_Dashboard.yaml | 2 +- ...5a_rewriting_url_from_shortner_with_new_.py | 2 +- ...2_f9a30386bd74_cleanup_time_grainularity.py | 12 ++++++------ ...00de1855_add_uuid_column_to_import_mixin.py | 2 +- ..._add_type_to_native_filter_configuration.py | 2 +- ...afbb1a5849b_add_embedded_dahshoard_table.py | 2 +- superset/templates/tail_js_custom_extra.html | 2 +- .../translations/en/LC_MESSAGES/messages.po | 10 +++++----- superset/translations/messages.pot | 10 +++++----- superset/utils/core.py | 2 +- superset/views/base.py | 4 ++-- superset/views/core.py | 2 +- .../annotation_layers/fixtures.py | 2 +- tests/integration_tests/core_tests.py | 2 +- .../db_engine_specs/base_engine_spec_tests.py | 2 +- .../security/migrate_roles_tests.py | 8 ++++---- 109 files changed, 201 insertions(+), 202 deletions(-) rename superset-frontend/src/setup/{setupDasboardComponents.ts => setupDashboardComponents.ts} (100%) diff --git a/scripts/generate_frontend_ts_tasklist.js b/scripts/generate_frontend_ts_tasklist.js index b9c5c47fc..7f23ad124 100644 --- a/scripts/generate_frontend_ts_tasklist.js +++ b/scripts/generate_frontend_ts_tasklist.js @@ -48,10 +48,10 @@ while (directories.length) { // directory. const hasTypescriptFiles = getFilesByExtensions("./", [".ts", ".tsx"]).length > 0; - const hasJavascriptFiles = + const hasJavaScriptFiles = getFilesByExtensions("./", [".js", ".jsx"]).length > 0; - if (hasJavascriptFiles) { + if (hasJavaScriptFiles) { console.log( `${" ".repeat( curDirectory.split("/").length - 1 diff --git a/superset-frontend/cypress-base/cypress/integration/dashboard/utils.ts b/superset-frontend/cypress-base/cypress/integration/dashboard/utils.ts index dbe8debc3..29f1e1c26 100644 --- a/superset-frontend/cypress-base/cypress/integration/dashboard/utils.ts +++ b/superset-frontend/cypress-base/cypress/integration/dashboard/utils.ts @@ -347,7 +347,7 @@ export function saveNativeFilterSettings(charts: ChartSpec[]) { } /** ************************************************************************ - * Cancel Native fitler settings + * Cancel Native filter settings * @returns {None} * @summary helper for cancel native filters settings ************************************************************************* */ diff --git a/superset-frontend/cypress-base/cypress/support/directories.ts b/superset-frontend/cypress-base/cypress/support/directories.ts index d74aef607..b0eb024d2 100644 --- a/superset-frontend/cypress-base/cypress/support/directories.ts +++ b/superset-frontend/cypress-base/cypress/support/directories.ts @@ -84,11 +84,11 @@ export const databasesPage = { step: '.helper-top', selectDbStepTitle: '.select-db > h4', preferredBlockBigQuery: '.preferred > :nth-child(1)', - prefferedBlockPostgreSQL: '.preferred > :nth-child(2)', - prefferedBlockSnowflake: '.preferred > :nth-child(3)', - prefferedBlockMySQL: '.preferred > :nth-child(4)', - prefferedBlockAthena: '.preferred > :nth-child(5)', - prefferedBlockSheets: '.preferred > :nth-child(6)', + preferredBlockPostgreSQL: '.preferred > :nth-child(2)', + preferredBlockSnowflake: '.preferred > :nth-child(3)', + preferredBlockMySQL: '.preferred > :nth-child(4)', + preferredBlockAthena: '.preferred > :nth-child(5)', + preferredBlockSheets: '.preferred > :nth-child(6)', supportedDatabasesText: '.control-label', orChoose: '.available-label', dbDropdown: '[class="ant-select-selection-search-input"]', @@ -590,7 +590,7 @@ export const exploreView = { okButton: '.ant-modal-confirm-btns .ant-btn-primary', }, }, - vizualizationTypeModal: { + visualizationTypeModal: { vizTypeButton: dataTestLocator('viztype-selector-container'), }, }; diff --git a/superset-frontend/jest.config.js b/superset-frontend/jest.config.js index 0d66ade8b..d537b2993 100644 --- a/superset-frontend/jest.config.js +++ b/superset-frontend/jest.config.js @@ -26,7 +26,7 @@ module.exports = { '\\.svg$': '/spec/__mocks__/svgrMock.tsx', '^src/(.*)$': '/src/$1', '^spec/(.*)$': '/spec/$1', - // mapping plugins of superset-ui to souce code + // mapping plugins of superset-ui to source code '@superset-ui/(.*)$': '/node_modules/@superset-ui/$1/src', }, testEnvironment: 'jsdom', diff --git a/superset-frontend/packages/generator-superset/generators/plugin-chart/templates/src/plugin/controlPanel.erb b/superset-frontend/packages/generator-superset/generators/plugin-chart/templates/src/plugin/controlPanel.erb index 92e644a2a..998e68b68 100644 --- a/superset-frontend/packages/generator-superset/generators/plugin-chart/templates/src/plugin/controlPanel.erb +++ b/superset-frontend/packages/generator-superset/generators/plugin-chart/templates/src/plugin/controlPanel.erb @@ -30,7 +30,7 @@ const config: ControlPanelConfig = { * * There are several predefined controls that can be used. * Some examples: - * - groupby: columns to group by (tranlated to GROUP BY statement) + * - groupby: columns to group by (translated to GROUP BY statement) * - series: same as groupby, but single selection. * - metrics: multiple metrics (translated to aggregate expression) * - metric: sane as metrics, but single selection @@ -91,7 +91,7 @@ const config: ControlPanelConfig = { * by the `@superset-ui/core/lib/validator`: * - validateNonEmpty: must have at least one value * - validateInteger: must be an integer value - * - validateNumber: must be an intger or decimal value + * - validateNumber: must be an integer or decimal value */ // For control input types, see: superset-frontend/src/explore/components/controls/index.js diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/operators/renameOperator.ts b/superset-frontend/packages/superset-ui-chart-controls/src/operators/renameOperator.ts index 156196911..04f3b7ac3 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/operators/renameOperator.ts +++ b/superset-frontend/packages/superset-ui-chart-controls/src/operators/renameOperator.ts @@ -21,7 +21,7 @@ import { PostProcessingRename, ensureIsArray, getMetricLabel, - ComparisionType, + ComparisonType, getXAxisLabel, } from '@superset-ui/core'; import { PostProcessingFactory } from './types'; @@ -52,9 +52,9 @@ export const renameOperator: PostProcessingFactory = ( ( isTimeComparison(formData, queryObject) && [ - ComparisionType.Difference, - ComparisionType.Ratio, - ComparisionType.Percentage, + ComparisonType.Difference, + ComparisonType.Ratio, + ComparisonType.Percentage, ].includes(formData.comparison_type) ) ) && @@ -68,7 +68,7 @@ export const renameOperator: PostProcessingFactory = ( // we will rename the "metric" from the metricWithOffset label // for example: "count__1 year ago" => "1 year ago" isTimeComparison(formData, queryObject) && - formData.comparison_type === ComparisionType.Values + formData.comparison_type === ComparisonType.Values ) { const metricOffsetMap = getMetricOffsetsMap(formData, queryObject); const timeOffsets = ensureIsArray(formData.time_compare); diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/operators/timeCompareOperator.ts b/superset-frontend/packages/superset-ui-chart-controls/src/operators/timeCompareOperator.ts index 3fe253edf..da72c664c 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/operators/timeCompareOperator.ts +++ b/superset-frontend/packages/superset-ui-chart-controls/src/operators/timeCompareOperator.ts @@ -17,7 +17,7 @@ * specific language governing permissions and limitationsxw * under the License. */ -import { ComparisionType, PostProcessingCompare } from '@superset-ui/core'; +import { ComparisonType, PostProcessingCompare } from '@superset-ui/core'; import { getMetricOffsetsMap, isTimeComparison } from './utils'; import { PostProcessingFactory } from './types'; @@ -28,7 +28,7 @@ export const timeCompareOperator: PostProcessingFactory = if ( isTimeComparison(formData, queryObject) && - comparisonType !== ComparisionType.Values + comparisonType !== ComparisonType.Values ) { return { operation: 'compare', diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/operators/utils/isDerivedSeries.ts b/superset-frontend/packages/superset-ui-chart-controls/src/operators/utils/isDerivedSeries.ts index 24623e557..67815756f 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/operators/utils/isDerivedSeries.ts +++ b/superset-frontend/packages/superset-ui-chart-controls/src/operators/utils/isDerivedSeries.ts @@ -21,7 +21,7 @@ import { ensureIsArray, JsonObject, QueryFormData, - ComparisionType, + ComparisonType, } from '@superset-ui/core'; import { isString } from 'lodash'; @@ -30,7 +30,7 @@ export const isDerivedSeries = ( formData: QueryFormData, ): boolean => { const comparisonType = formData.comparison_type; - if (comparisonType !== ComparisionType.Values) { + if (comparisonType !== ComparisonType.Values) { return false; } diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/operators/utils/isTimeComparison.ts b/superset-frontend/packages/superset-ui-chart-controls/src/operators/utils/isTimeComparison.ts index 4430b9541..674e26333 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/operators/utils/isTimeComparison.ts +++ b/superset-frontend/packages/superset-ui-chart-controls/src/operators/utils/isTimeComparison.ts @@ -17,7 +17,7 @@ * specific language governing permissions and limitationsxw * under the License. */ -import { ComparisionType } from '@superset-ui/core'; +import { ComparisonType } from '@superset-ui/core'; import { getMetricOffsetsMap } from './getMetricOffsetsMap'; import { PostProcessingFactory } from '../types'; @@ -29,7 +29,7 @@ export const isTimeComparison: PostProcessingFactory = ( const metricOffsetMap = getMetricOffsetsMap(formData, queryObject); return ( - Object.values(ComparisionType).includes(comparisonType) && + Object.values(ComparisonType).includes(comparisonType) && metricOffsetMap.size > 0 ); }; diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/sections/advancedAnalytics.tsx b/superset-frontend/packages/superset-ui-chart-controls/src/sections/advancedAnalytics.tsx index 66da4bb9e..f17139cf1 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/sections/advancedAnalytics.tsx +++ b/superset-frontend/packages/superset-ui-chart-controls/src/sections/advancedAnalytics.tsx @@ -17,7 +17,7 @@ * under the License. */ import React from 'react'; -import { t, RollingType, ComparisionType } from '@superset-ui/core'; +import { t, RollingType, ComparisonType } from '@superset-ui/core'; import { ControlPanelSectionConfig } from '../types'; import { formatSelectOptions } from '../utils'; @@ -137,10 +137,10 @@ export const advancedAnalyticsControls: ControlPanelSectionConfig = { label: t('Calculation type'), default: 'values', choices: [ - [ComparisionType.Values, t('Actual values')], - [ComparisionType.Difference, t('Difference')], - [ComparisionType.Percentage, t('Percentage change')], - [ComparisionType.Ratio, t('Ratio')], + [ComparisonType.Values, t('Actual values')], + [ComparisonType.Difference, t('Difference')], + [ComparisonType.Percentage, t('Percentage change')], + [ComparisonType.Ratio, t('Ratio')], ], description: t( 'How to display time shifts: as individual lines; as the ' + diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/components/ColumnConfigControl/constants.tsx b/superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/components/ColumnConfigControl/constants.tsx index ecdee5be1..7bf6c95c7 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/components/ColumnConfigControl/constants.tsx +++ b/superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/components/ColumnConfigControl/constants.tsx @@ -149,7 +149,7 @@ export const SHARED_COLUMN_CONFIG_PROPS = { label: t('Small number format'), description: t( 'D3 number format for numbers between -1.0 and 1.0, ' + - 'useful when you want to have different siginificant digits for small and large numbers', + 'useful when you want to have different significant digits for small and large numbers', ), }, d3TimeFormat, diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/sharedControls.tsx b/superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/sharedControls.tsx index a2fb767f5..a4af8bcbf 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/sharedControls.tsx +++ b/superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/sharedControls.tsx @@ -40,7 +40,7 @@ import { getSequentialSchemeRegistry, SequentialScheme, legacyValidateInteger, - ComparisionType, + ComparisonType, isAdhocColumn, isPhysicalColumn, ensureIsArray, @@ -308,7 +308,7 @@ const y_axis_format: SharedControlConfig<'SelectControl', SelectDefaultOption> = option.label.includes(search) || option.value.includes(search), mapStateToProps: state => { const isPercentage = - state.controls?.comparison_type?.value === ComparisionType.Percentage; + state.controls?.comparison_type?.value === ComparisonType.Percentage; return { choices: isPercentage ? D3_FORMAT_OPTIONS.filter(option => option[0].includes('%')) diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/types.ts b/superset-frontend/packages/superset-ui-chart-controls/src/types.ts index 8df72011c..d4e91246a 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/types.ts +++ b/superset-frontend/packages/superset-ui-chart-controls/src/types.ts @@ -92,7 +92,7 @@ export interface ControlPanelState { } /** - * The action dispather will call Redux `dispatch` internally and return what's + * The action dispatcher will call Redux `dispatch` internally and return what's * returned from `dispatch`, which by default is the original or another action. */ export interface ActionDispatcher< @@ -200,7 +200,7 @@ export type TabOverride = 'data' | 'customize' | boolean; tab, or 'customize' if you want it to show up on that tam. Otherwise sections with ALL `renderTrigger: true` components will show up on the `Customize` tab. * - visibility: a function that uses control panel props to check whether a control should - * be visibile. + * be visible. */ export interface BaseControlConfig< T extends ControlType = ControlType, diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/utils/expandControlConfig.tsx b/superset-frontend/packages/superset-ui-chart-controls/src/utils/expandControlConfig.tsx index 73b4133f9..3ff734984 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/utils/expandControlConfig.tsx +++ b/superset-frontend/packages/superset-ui-chart-controls/src/utils/expandControlConfig.tsx @@ -74,7 +74,7 @@ export function expandControlConfig( // { // name: 'metric', // config: { - // type: 'SelectControl' | SelectComonent + // type: 'SelectControl' | SelectComponent // } // } if ('name' in control && 'config' in control) { diff --git a/superset-frontend/packages/superset-ui-chart-controls/test/operators/renameOperator.test.ts b/superset-frontend/packages/superset-ui-chart-controls/test/operators/renameOperator.test.ts index 7e0bcc42d..af9ebfebb 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/test/operators/renameOperator.test.ts +++ b/superset-frontend/packages/superset-ui-chart-controls/test/operators/renameOperator.test.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { ComparisionType, QueryObject, SqlaFormData } from '@superset-ui/core'; +import { ComparisonType, QueryObject, SqlaFormData } from '@superset-ui/core'; import { renameOperator } from '@superset-ui/chart-controls'; const formData: SqlaFormData = { @@ -74,9 +74,9 @@ test('should skip renameOperator if does not exist x_axis and is_timeseries', () test('should skip renameOperator if exists derived metrics', () => { [ - ComparisionType.Difference, - ComparisionType.Ratio, - ComparisionType.Percentage, + ComparisonType.Difference, + ComparisonType.Ratio, + ComparisonType.Percentage, ].forEach(type => { expect( renameOperator( @@ -145,7 +145,7 @@ test('should add renameOperator if exist "actual value" time comparison', () => { ...formData, ...{ - comparison_type: ComparisionType.Values, + comparison_type: ComparisonType.Values, time_compare: ['1 year ago', '1 year later'], }, }, diff --git a/superset-frontend/packages/superset-ui-chart-controls/test/operators/rollingWindowOperator.test.ts b/superset-frontend/packages/superset-ui-chart-controls/test/operators/rollingWindowOperator.test.ts index 5bd37a4d9..374f5c620 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/test/operators/rollingWindowOperator.test.ts +++ b/superset-frontend/packages/superset-ui-chart-controls/test/operators/rollingWindowOperator.test.ts @@ -107,8 +107,8 @@ test('rolling_type: sum/mean/std', () => { }); test('should append compared metrics when sets time compare type', () => { - const comparisionTypes = ['values', 'difference', 'percentage', 'ratio']; - comparisionTypes.forEach(cType => { + const comparisonTypes = ['values', 'difference', 'percentage', 'ratio']; + comparisonTypes.forEach(cType => { expect( rollingWindowOperator( { diff --git a/superset-frontend/packages/superset-ui-chart-controls/test/operators/timeCompareOperator.test.ts b/superset-frontend/packages/superset-ui-chart-controls/test/operators/timeCompareOperator.test.ts index 90ab4038d..e775780b3 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/test/operators/timeCompareOperator.test.ts +++ b/superset-frontend/packages/superset-ui-chart-controls/test/operators/timeCompareOperator.test.ts @@ -90,8 +90,8 @@ test('should skip CompareOperator', () => { }); test('should generate difference/percentage/ratio CompareOperator', () => { - const comparisionTypes = ['difference', 'percentage', 'ratio']; - comparisionTypes.forEach(cType => { + const comparisonTypes = ['difference', 'percentage', 'ratio']; + comparisonTypes.forEach(cType => { expect( timeCompareOperator( { diff --git a/superset-frontend/packages/superset-ui-chart-controls/test/operators/utils/isDerivedSeries.test.ts b/superset-frontend/packages/superset-ui-chart-controls/test/operators/utils/isDerivedSeries.test.ts index 05a1d738a..29c8c6586 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/test/operators/utils/isDerivedSeries.test.ts +++ b/superset-frontend/packages/superset-ui-chart-controls/test/operators/utils/isDerivedSeries.test.ts @@ -17,7 +17,7 @@ * under the License. */ import { isDerivedSeries } from '@superset-ui/chart-controls'; -import { SqlaFormData, ComparisionType } from '@superset-ui/core'; +import { SqlaFormData, ComparisonType } from '@superset-ui/core'; const formData: SqlaFormData = { datasource: 'foo', @@ -31,15 +31,15 @@ const series = { test('should be false if comparison type is not actual values', () => { expect(isDerivedSeries(series, formData)).toEqual(false); - Object.keys(ComparisionType) - .filter(type => type === ComparisionType.Values) + Object.keys(ComparisonType) + .filter(type => type === ComparisonType.Values) .forEach(type => { - const formDataWithComparisionType = { + const formDataWithComparisonType = { ...formData, comparison_type: type, time_compare: ['1 month ago'], }; - expect(isDerivedSeries(series, formDataWithComparisionType)).toEqual( + expect(isDerivedSeries(series, formDataWithComparisonType)).toEqual( false, ); }); @@ -48,7 +48,7 @@ test('should be false if comparison type is not actual values', () => { test('should be true if comparison type is values', () => { const formDataWithActualTypes = { ...formData, - comparison_type: ComparisionType.Values, + comparison_type: ComparisonType.Values, time_compare: ['1 month ago', '1 month later'], }; expect(isDerivedSeries(series, formDataWithActualTypes)).toEqual(true); @@ -62,7 +62,7 @@ test('should be false if series name does not match time_compare', () => { }; const formDataWithActualTypes = { ...formData, - comparison_type: ComparisionType.Values, + comparison_type: ComparisonType.Values, time_compare: ['1 month ago', '1 month later'], }; expect(isDerivedSeries(arbitrary_series, formDataWithActualTypes)).toEqual( @@ -78,7 +78,7 @@ test('should be false if time compare is not suffix', () => { }; const formDataWithActualTypes = { ...formData, - comparison_type: ComparisionType.Values, + comparison_type: ComparisonType.Values, time_compare: ['1 month ago', '1 month later'], }; expect(isDerivedSeries(series, formDataWithActualTypes)).toEqual(false); @@ -92,7 +92,7 @@ test('should be false if series name invalid', () => { }; const formDataWithActualTypes = { ...formData, - comparison_type: ComparisionType.Values, + comparison_type: ComparisonType.Values, time_compare: ['1 month ago', '1 month later'], }; expect(isDerivedSeries(series, formDataWithActualTypes)).toEqual(false); diff --git a/superset-frontend/packages/superset-ui-core/src/chart/components/SuperChart.tsx b/superset-frontend/packages/superset-ui-core/src/chart/components/SuperChart.tsx index edfd88ab7..99d7b6dbe 100644 --- a/superset-frontend/packages/superset-ui-core/src/chart/components/SuperChart.tsx +++ b/superset-frontend/packages/superset-ui-core/src/chart/components/SuperChart.tsx @@ -61,7 +61,7 @@ export type Props = Omit & FallbackComponent?: React.ComponentType; /** Event listener for unexpected errors from chart */ onErrorBoundary?: ErrorBoundaryProps['onError']; - /** Prop for form plugins uisng superchart */ + /** Prop for form plugins using superchart */ showOverflow?: boolean; /** Prop for popovercontainer ref */ parentRef?: RefObject; diff --git a/superset-frontend/packages/superset-ui-core/src/math-expression/index.ts b/superset-frontend/packages/superset-ui-core/src/math-expression/index.ts index ae3db1f06..8ee4d272d 100644 --- a/superset-frontend/packages/superset-ui-core/src/math-expression/index.ts +++ b/superset-frontend/packages/superset-ui-core/src/math-expression/index.ts @@ -106,7 +106,7 @@ export function evalExpression(expression: string, value: number): number { const subExpressions = String(parsedExpression).split('='); parsedExpression = subExpressions[1] ?? subExpressions[0]; // we can ignore the type requirement on `TOKENS`, as value is always `number` - // and doesn't need to consider `number | underfined`. + // and doesn't need to consider `number | undefined`. // @ts-ignore return Number(mexp.eval(parsedExpression, TOKENS, { x: value })); } diff --git a/superset-frontend/packages/superset-ui-core/src/query/buildQueryObject.ts b/superset-frontend/packages/superset-ui-core/src/query/buildQueryObject.ts index a1b6d8ed7..cf434f138 100644 --- a/superset-frontend/packages/superset-ui-core/src/query/buildQueryObject.ts +++ b/superset-frontend/packages/superset-ui-core/src/query/buildQueryObject.ts @@ -103,7 +103,7 @@ export default function buildQueryObject( let queryObject: QueryObject = { // fallback `null` to `undefined` so they won't be sent to the backend - // (JSON.strinify will ignore `undefined`.) + // (JSON.stringify will ignore `undefined`.) time_range: time_range || undefined, since: since || undefined, until: until || undefined, diff --git a/superset-frontend/packages/superset-ui-core/src/query/normalizeOrderBy.ts b/superset-frontend/packages/superset-ui-core/src/query/normalizeOrderBy.ts index 233af3120..e38e682ab 100644 --- a/superset-frontend/packages/superset-ui-core/src/query/normalizeOrderBy.ts +++ b/superset-frontend/packages/superset-ui-core/src/query/normalizeOrderBy.ts @@ -56,7 +56,7 @@ export default function normalizeOrderBy( }; } - // todo: Removed `legacy_ordery_by` after refactoring + // todo: Removed `legacy_order_by` after refactoring if ( queryObject.legacy_order_by !== undefined && queryObject.legacy_order_by !== null && diff --git a/superset-frontend/packages/superset-ui-core/src/query/types/AdvancedAnalytics.ts b/superset-frontend/packages/superset-ui-core/src/query/types/AdvancedAnalytics.ts index 463b07c1d..ea270e2d1 100644 --- a/superset-frontend/packages/superset-ui-core/src/query/types/AdvancedAnalytics.ts +++ b/superset-frontend/packages/superset-ui-core/src/query/types/AdvancedAnalytics.ts @@ -29,7 +29,7 @@ export interface RollingWindow { min_periods?: number; } -export enum ComparisionType { +export enum ComparisonType { Values = 'values', Difference = 'difference', Percentage = 'percentage', @@ -37,7 +37,7 @@ export enum ComparisionType { } export interface TimeCompare { time_compare?: string; - comparison_type?: ComparisionType; + comparison_type?: ComparisonType; } export default {}; diff --git a/superset-frontend/packages/superset-ui-core/src/query/types/PostProcessing.ts b/superset-frontend/packages/superset-ui-core/src/query/types/PostProcessing.ts index b88dafb5c..e32eda6a9 100644 --- a/superset-frontend/packages/superset-ui-core/src/query/types/PostProcessing.ts +++ b/superset-frontend/packages/superset-ui-core/src/query/types/PostProcessing.ts @@ -18,7 +18,7 @@ */ import { JsonObject } from '../../connection'; import { TimeGranularity } from '../../time-format'; -import { RollingType, ComparisionType } from './AdvancedAnalytics'; +import { RollingType, ComparisonType } from './AdvancedAnalytics'; export type NumpyFunction = | 'average' @@ -57,7 +57,7 @@ export interface Aggregates { [colname: string]: { operator: NumpyFunction; /** - * the name of the column to generate aggrates from. + * the name of the column to generate aggregates from. */ column?: string; options?: JsonObject; @@ -171,7 +171,7 @@ export interface _PostProcessingCompare { options: { source_columns: string[]; compare_columns: string[]; - compare_type: Omit; + compare_type: Omit; drop_original_columns: boolean; }; } diff --git a/superset-frontend/packages/superset-ui-core/src/translation/index.ts b/superset-frontend/packages/superset-ui-core/src/translation/index.ts index 71cb8acbe..216bf5847 100644 --- a/superset-frontend/packages/superset-ui-core/src/translation/index.ts +++ b/superset-frontend/packages/superset-ui-core/src/translation/index.ts @@ -22,4 +22,4 @@ export * from './types'; export default {}; -export { default as __hack_reexport_trasnslation } from './types'; +export { default as __hack_reexport_translation } from './types'; diff --git a/superset-frontend/packages/superset-ui-core/test/models/Registry.test.ts b/superset-frontend/packages/superset-ui-core/test/models/Registry.test.ts index 1c85dc242..11c2e65eb 100644 --- a/superset-frontend/packages/superset-ui-core/test/models/Registry.test.ts +++ b/superset-frontend/packages/superset-ui-core/test/models/Registry.test.ts @@ -404,7 +404,7 @@ describe('Registry', () => { expect(listener).toBeCalledWith(['foo']); }); - it('calls the listener when a value is overriden', () => { + it('calls the listener when a value is overridden', () => { registry.registerValue('foo', 'bar'); listener.mockClear(); registry.registerValue('foo', 'baz'); diff --git a/superset-frontend/packages/superset-ui-core/test/number-format/factories/createD3NumberFormatter.test.ts b/superset-frontend/packages/superset-ui-core/test/number-format/factories/createD3NumberFormatter.test.ts index c80c72c30..951ab039c 100644 --- a/superset-frontend/packages/superset-ui-core/test/number-format/factories/createD3NumberFormatter.test.ts +++ b/superset-frontend/packages/superset-ui-core/test/number-format/factories/createD3NumberFormatter.test.ts @@ -62,7 +62,7 @@ describe('createD3NumberFormatter(config)', () => { }); }); describe('config.description', () => { - it('set decription if specified', () => { + it('set description if specified', () => { const formatter = createD3NumberFormatter({ description: 'lorem ipsum', formatString: '.2f', diff --git a/superset-frontend/packages/superset-ui-core/test/query/types/PostProcessing.test.ts b/superset-frontend/packages/superset-ui-core/test/query/types/PostProcessing.test.ts index db9513740..047699fa5 100644 --- a/superset-frontend/packages/superset-ui-core/test/query/types/PostProcessing.test.ts +++ b/superset-frontend/packages/superset-ui-core/test/query/types/PostProcessing.test.ts @@ -42,7 +42,7 @@ import { PostProcessingRolling, PostProcessingSort, } from '@superset-ui/core'; -import { ComparisionType, RollingType, TimeGranularity } from '../../../src'; +import { ComparisonType, RollingType, TimeGranularity } from '../../../src'; const AGGREGATES_OPTION: Aggregates = { bar: { @@ -74,7 +74,7 @@ const COMPARE_RULE: PostProcessingCompare = { options: { source_columns: ['foo'], compare_columns: ['bar'], - compare_type: ComparisionType.Percentage, + compare_type: ComparisonType.Percentage, drop_original_columns: false, }, }; diff --git a/superset-frontend/packages/superset-ui-core/types/external.d.ts b/superset-frontend/packages/superset-ui-core/types/external.d.ts index 31b0250bf..dcce5fa88 100644 --- a/superset-frontend/packages/superset-ui-core/types/external.d.ts +++ b/superset-frontend/packages/superset-ui-core/types/external.d.ts @@ -17,6 +17,6 @@ * under the License. */ /** - * Stub for the untypped jed module. + * Stub for the untyped jed module. */ declare module 'jed'; diff --git a/superset-frontend/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Area/stories/controlsShown.tsx b/superset-frontend/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Area/stories/controlsShown.tsx index fac198e82..603ef83b0 100644 --- a/superset-frontend/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Area/stories/controlsShown.tsx +++ b/superset-frontend/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Area/stories/controlsShown.tsx @@ -31,7 +31,7 @@ export const controlsShown = () => ( queriesData={[{ data }]} formData={{ bottomMargin: 'auto', - colorCcheme: 'd3Category10', + colorScheme: 'd3Category10', contribution: false, groupby: ['region'], lineInterpolation: 'linear', diff --git a/superset-frontend/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Area/stories/expanded.tsx b/superset-frontend/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Area/stories/expanded.tsx index 8f71fb528..b26e7dfa6 100644 --- a/superset-frontend/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Area/stories/expanded.tsx +++ b/superset-frontend/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Area/stories/expanded.tsx @@ -31,7 +31,7 @@ export const expanded = () => ( queriesData={[{ data }]} formData={{ bottomMargin: 'auto', - colorCcheme: 'd3Category10', + colorScheme: 'd3Category10', contribution: false, groupby: ['region'], lineInterpolation: 'linear', diff --git a/superset-frontend/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Area/stories/stackedWithBounds.tsx b/superset-frontend/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Area/stories/stackedWithBounds.tsx index d3dccc63d..6f7a19825 100644 --- a/superset-frontend/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Area/stories/stackedWithBounds.tsx +++ b/superset-frontend/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Area/stories/stackedWithBounds.tsx @@ -31,7 +31,7 @@ export const stackedWithYAxisBounds = () => ( queriesData={[{ data }]} formData={{ bottomMargin: 'auto', - colorCcheme: 'd3Category10', + colorScheme: 'd3Category10', contribution: false, groupby: ['region'], lineInterpolation: 'linear', @@ -66,7 +66,7 @@ export const stackedWithYAxisBoundsMinOnly = () => ( queriesData={[{ data }]} formData={{ bottomMargin: 'auto', - colorCcheme: 'd3Category10', + colorScheme: 'd3Category10', contribution: false, groupby: ['region'], lineInterpolation: 'linear', diff --git a/superset-frontend/packages/superset-ui-demo/storybook/stories/superset-ui-chart/SuperChartStories.tsx b/superset-frontend/packages/superset-ui-demo/storybook/stories/superset-ui-chart/SuperChartStories.tsx index 490f498ec..d2eb5dae4 100644 --- a/superset-frontend/packages/superset-ui-demo/storybook/stories/superset-ui-chart/SuperChartStories.tsx +++ b/superset-frontend/packages/superset-ui-demo/storybook/stories/superset-ui-chart/SuperChartStories.tsx @@ -110,7 +110,7 @@ export const fixedHeight100Width = () => { }; fixedHeight100Width.story = { name: 'fixed height, 100% width' }; -export const withErrorBoundar = () => { +export const withErrorBoundary = () => { const width = text('Vis width', '500'); const height = text('Vis height', '300'); diff --git a/superset-frontend/packages/superset-ui-switchboard/src/switchboard.ts b/superset-frontend/packages/superset-ui-switchboard/src/switchboard.ts index 2a870e7b6..ab19d462f 100644 --- a/superset-frontend/packages/superset-ui-switchboard/src/switchboard.ts +++ b/superset-frontend/packages/superset-ui-switchboard/src/switchboard.ts @@ -191,7 +191,7 @@ export class Switchboard { * Instead of an arguments list, arguments are supplied as a map. * * @param method the name of the method to call - * @param args arguments that will be supplied. Must be serializable, no functions or other nonense. + * @param args arguments that will be supplied. Must be serializable, no functions or other nonsense. * @returns whatever is returned from the method */ get(method: string, args: unknown = undefined): Promise { diff --git a/superset-frontend/plugins/legacy-plugin-chart-country-map/src/index.js b/superset-frontend/plugins/legacy-plugin-chart-country-map/src/index.js index 7c565201a..79dd291f0 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-country-map/src/index.js +++ b/superset-frontend/plugins/legacy-plugin-chart-country-map/src/index.js @@ -27,7 +27,7 @@ const metadata = new ChartMetadata({ category: t('Map'), credits: ['https://bl.ocks.org/john-guerra'], description: t( - "Visualizes how a single metric varies across a country's principal subdivisions (states, provinces, etc) on a chloropleth map. Each subdivision's value is elevated when you hover over the corresponding geographic boundary.", + "Visualizes how a single metric varies across a country's principal subdivisions (states, provinces, etc) on a choropleth map. Each subdivision's value is elevated when you hover over the corresponding geographic boundary.", ), exampleGallery: [{ url: exampleUsa }, { url: exampleGermany }], name: t('Country Map'), diff --git a/superset-frontend/plugins/legacy-plugin-chart-heatmap/src/Heatmap.js b/superset-frontend/plugins/legacy-plugin-chart-heatmap/src/Heatmap.js index b0b32aba4..f2e3624f0 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-heatmap/src/Heatmap.js +++ b/superset-frontend/plugins/legacy-plugin-chart-heatmap/src/Heatmap.js @@ -177,7 +177,7 @@ function Heatmap(element, props) { domain[d[k]] = (domain[d[k]] || 0) + d.v; actualKeys[d[k]] = d[k]; }); - // Not usgin object.keys() as it converts to strings + // Not using object.keys() as it converts to strings const keys = Object.keys(actualKeys).map(s => actualKeys[s]); if (sortMethod === 'alpha_asc') { domain = keys.sort(cmp); diff --git a/superset-frontend/plugins/legacy-plugin-chart-parallel-coordinates/src/ReactParallelCoordinates.jsx b/superset-frontend/plugins/legacy-plugin-chart-parallel-coordinates/src/ReactParallelCoordinates.jsx index 712509e4e..4a7675d55 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-parallel-coordinates/src/ReactParallelCoordinates.jsx +++ b/superset-frontend/plugins/legacy-plugin-chart-parallel-coordinates/src/ReactParallelCoordinates.jsx @@ -23,17 +23,17 @@ import Component from './ParallelCoordinates'; const ReactComponent = reactify(Component); -const ParallelCoordianes = ({ className, ...otherProps }) => ( +const ParallelCoordinates = ({ className, ...otherProps }) => (
); -ParallelCoordianes.propTypes = { +ParallelCoordinates.propTypes = { className: PropTypes.string.isRequired, }; -export default styled(ParallelCoordianes)` +export default styled(ParallelCoordinates)` ${({ theme }) => ` .superset-legacy-chart-parallel-coordinates { div.grid { diff --git a/superset-frontend/plugins/legacy-plugin-chart-sankey-loop/src/SankeyLoop.js b/superset-frontend/plugins/legacy-plugin-chart-sankey-loop/src/SankeyLoop.js index 33a349015..00f47ada2 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-sankey-loop/src/SankeyLoop.js +++ b/superset-frontend/plugins/legacy-plugin-chart-sankey-loop/src/SankeyLoop.js @@ -26,9 +26,9 @@ import { CategoricalColorNamespace, } from '@superset-ui/core'; -// a problem with 'd3-sankey-diagram' is that the sankey().extent() paramters, which +// a problem with 'd3-sankey-diagram' is that the sankey().extent() parameters, which // informs the layout of the bounding box of the sankey columns, does not account -// for labels and paths which happen to be layedout outside that rectangle. +// for labels and paths which happen to be layed out outside that rectangle. // for that reason i've selected relatively large default left/right margins, and have // made 'margin' a property. i have raised an issue in the chart repo: // diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/components/PlaySlider.jsx b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/components/PlaySlider.jsx index eda7803f2..1705b8f53 100644 --- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/components/PlaySlider.jsx +++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/components/PlaySlider.jsx @@ -27,7 +27,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import Mousetrap from 'mousetrap'; import { t, styled } from '@superset-ui/core'; -import BootrapSliderWrapper from './BootstrapSliderWrapper'; +import BootstrapSliderWrapper from './BootstrapSliderWrapper'; const StyledSlider = styled.div` ${({ theme }) => ` @@ -210,7 +210,7 @@ export default class PlaySlider extends React.PureComponent { />
- { let { metrics, orderby = [] } = baseQueryObject; metrics = metrics || []; - // orverride orderby with timeseries metric + // override orderby with timeseries metric if (sortByMetric) { orderby = [[sortByMetric, false]]; } else if (metrics?.length > 0) { // default to ordering by first metric in descending order - // when no "sort by" metric is set (regargless if "SORT DESC" is set to true) + // when no "sort by" metric is set (regardless if "SORT DESC" is set to true) orderby = [[metrics[0], false]]; } return [ diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Radar/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Radar/index.ts index 596f41cfb..69f1ee8da 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Radar/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Radar/index.ts @@ -2,7 +2,7 @@ * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information - * regardin + * regarding * g copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Tree/controlPanel.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/Tree/controlPanel.tsx index f8035203f..a6ee81589 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Tree/controlPanel.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Tree/controlPanel.tsx @@ -161,7 +161,7 @@ const controlPanel: ControlPanelConfig = { ['right', t('right')], ['bottom', t('bottom')], ], - description: t('Position of intermidiate node label on tree'), + description: t('Position of intermediate node label on tree'), }, }, ], diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Treemap/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Treemap/index.ts index 6be508d56..ec6d2d382 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Treemap/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Treemap/index.ts @@ -2,7 +2,7 @@ * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information - * regardin + * regarding * g copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance @@ -50,7 +50,7 @@ export default class EchartsTreemapChartPlugin extends ChartPlugin< category: t('Part of a Whole'), credits: ['https://echarts.apache.org'], description: t( - 'Show hierarchical relationships of data, with with the value represented by area, showing proportion and contribution to the whole.', + 'Show hierarchical relationships of data, with the value represented by area, showing proportion and contribution to the whole.', ), exampleGallery: [{ url: example1 }, { url: example2 }], name: t('Treemap'), diff --git a/superset-frontend/plugins/plugin-chart-echarts/test/MixedTimeseries/buildQuery.test.ts b/superset-frontend/plugins/plugin-chart-echarts/test/MixedTimeseries/buildQuery.test.ts index af23bd927..15d9e2cbb 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/test/MixedTimeseries/buildQuery.test.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/test/MixedTimeseries/buildQuery.test.ts @@ -17,7 +17,7 @@ * under the License. */ import { - ComparisionType, + ComparisonType, FreeFormAdhocFilter, RollingType, TimeGranularity, @@ -72,14 +72,14 @@ const formDataMixedChartWithAA = { ...formDataMixedChart, rolling_type: RollingType.Cumsum, time_compare: ['1 years ago'], - comparison_type: ComparisionType.Values, + comparison_type: ComparisonType.Values, resample_rule: '1AS', resample_method: 'zerofill', rolling_type_b: RollingType.Sum, rolling_periods_b: 1, min_periods_b: 1, - comparison_type_b: ComparisionType.Difference, + comparison_type_b: ComparisonType.Difference, time_compare_b: ['3 years ago'], resample_rule_b: '1A', resample_method_b: 'asfreq', diff --git a/superset-frontend/plugins/plugin-chart-handlebars/test/plugin/transformProps.test.ts b/superset-frontend/plugins/plugin-chart-handlebars/test/plugin/transformProps.test.ts index 62903ad73..5910ea0f4 100644 --- a/superset-frontend/plugins/plugin-chart-handlebars/test/plugin/transformProps.test.ts +++ b/superset-frontend/plugins/plugin-chart-handlebars/test/plugin/transformProps.test.ts @@ -20,7 +20,7 @@ import { ChartProps, QueryFormData, supersetTheme } from '@superset-ui/core'; import { HandlebarsQueryFormData } from '../../src/types'; import transformProps from '../../src/plugin/transformProps'; -describe('Handlebars tranformProps', () => { +describe('Handlebars transformProps', () => { const formData: HandlebarsQueryFormData = { colorScheme: 'bnbColors', datasource: '3__table', @@ -40,7 +40,7 @@ describe('Handlebars tranformProps', () => { theme: supersetTheme, }); - it('should tranform chart props for viz', () => { + it('should transform chart props for viz', () => { expect(transformProps(chartProps)).toEqual( expect.objectContaining({ width: 800, diff --git a/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx b/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx index 465f7bdbf..e114a823d 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx +++ b/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx @@ -478,7 +478,7 @@ export default function TableChart( // eslint-disable-next-line react/no-danger return ; } - // If cellProps renderes textContent already, then we don't have to + // If cellProps renders textContent already, then we don't have to // render `Cell`. This saves some time for large tables. return ( diff --git a/superset-frontend/plugins/plugin-chart-table/src/buildQuery.ts b/superset-frontend/plugins/plugin-chart-table/src/buildQuery.ts index 2c0f3385b..211070f8b 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/buildQuery.ts +++ b/superset-frontend/plugins/plugin-chart-table/src/buildQuery.ts @@ -71,12 +71,12 @@ const buildQuery: BuildQuery = ( if (queryMode === QueryMode.aggregate) { metrics = metrics || []; - // orverride orderby with timeseries metric when in aggregation mode + // override orderby with timeseries metric when in aggregation mode if (sortByMetric) { orderby = [[sortByMetric, !orderDesc]]; } else if (metrics?.length > 0) { // default to ordering by first metric in descending order - // when no "sort by" metric is set (regargless if "SORT DESC" is set to true) + // when no "sort by" metric is set (regardless if "SORT DESC" is set to true) orderby = [[metrics[0], false]]; } // add postprocessing for percent metrics only when in aggregation mode diff --git a/superset-frontend/plugins/preset-chart-xy/src/utils/convertScaleToDataUIScaleShape.ts b/superset-frontend/plugins/preset-chart-xy/src/utils/convertScaleToDataUIScaleShape.ts index 4d756e138..972f01f90 100644 --- a/superset-frontend/plugins/preset-chart-xy/src/utils/convertScaleToDataUIScaleShape.ts +++ b/superset-frontend/plugins/preset-chart-xy/src/utils/convertScaleToDataUIScaleShape.ts @@ -43,7 +43,7 @@ function isCompatibleDomainOrRange( } /** - * Convert encodeable scale object into @data-ui's scale config + * Convert encodable scale object into @data-ui's scale config * @param scale */ export default function convertScaleToDataUIScale( diff --git a/superset-frontend/src/components/DeprecatedSelect/DeprecatedSelect.tsx b/superset-frontend/src/components/DeprecatedSelect/DeprecatedSelect.tsx index 95a2556ff..2e2c1e954 100644 --- a/superset-frontend/src/components/DeprecatedSelect/DeprecatedSelect.tsx +++ b/superset-frontend/src/components/DeprecatedSelect/DeprecatedSelect.tsx @@ -90,7 +90,7 @@ export type SupersetStyledSelectProps< // callback for paste event onPaste?: (e: SyntheticEvent) => void; forceOverflow?: boolean; - // for simplier theme overrides + // for simpler theme overrides themeConfig?: PartialThemeConfig; stylesConfig?: PartialStylesConfig; }; @@ -185,7 +185,7 @@ function styled< // `value` may be rendered values (strings), we want option objects const value: OptionType[] = findValue(value_, options || [], valueKey); - // Add backward compability to v1 API + // Add backward compatibility to v1 API const isMulti = isMulti_ === undefined ? multi : isMulti_; const isClearable = isClearable_ === undefined ? clearable : isClearable_; diff --git a/superset-frontend/src/components/Form/LabeledErrorBoundInput.test.jsx b/superset-frontend/src/components/Form/LabeledErrorBoundInput.test.jsx index a5cb80de2..5324f1bef 100644 --- a/superset-frontend/src/components/Form/LabeledErrorBoundInput.test.jsx +++ b/superset-frontend/src/components/Form/LabeledErrorBoundInput.test.jsx @@ -60,7 +60,6 @@ describe('LabeledErrorBoundInput', () => { expect(textboxInput).toBeVisible(); expect(errorText).toBeVisible(); }); - it('renders a LabeledErrorBoundInput with a InfoTooltip', async () => { defaultProps.hasTooltip = true; render(); diff --git a/superset-frontend/src/components/ListView/utils.ts b/superset-frontend/src/components/ListView/utils.ts index 10b7035f2..8a8c57cb6 100644 --- a/superset-frontend/src/components/ListView/utils.ts +++ b/superset-frontend/src/components/ListView/utils.ts @@ -344,7 +344,7 @@ export function useListViewState({ const applyFilterValue = (index: number, value: any) => { setInternalFilters(currentInternalFilters => { - // skip redunundant updates + // skip redundant updates if (currentInternalFilters[index].value === value) { return currentInternalFilters; } diff --git a/superset-frontend/src/components/Select/Select.stories.tsx b/superset-frontend/src/components/Select/Select.stories.tsx index 6c774fe16..cb7224fdc 100644 --- a/superset-frontend/src/components/Select/Select.stories.tsx +++ b/superset-frontend/src/components/Select/Select.stories.tsx @@ -158,7 +158,7 @@ const mountHeader = (type: String) => { header = ( ); } diff --git a/superset-frontend/src/dashboard/components/PropertiesModal/PropertiesModal.test.tsx b/superset-frontend/src/dashboard/components/PropertiesModal/PropertiesModal.test.tsx index 645b70cc5..8469ef600 100644 --- a/superset-frontend/src/dashboard/components/PropertiesModal/PropertiesModal.test.tsx +++ b/superset-frontend/src/dashboard/components/PropertiesModal/PropertiesModal.test.tsx @@ -122,7 +122,7 @@ const dashboardInfo = { metadata: mockedJsonMetadata, owners: [], position_json: - '{"CHART-63bEuxjDMJ": {"children": [], "id": "CHART-63bEuxjDMJ", "meta": {"chartId": 369, "height": 76, "sliceName": "Vaccine Candidates per Country", "sliceNameOverride": "Map of Vaccine Candidates", "uuid": "ddc91df6-fb40-4826-bdca-16b85af1c024", "width": 7}, "parents": ["ROOT_ID", "TABS-wUKya7eQ0Z", "TAB-BCIJF4NvgQ", "ROW-zvw7luvEL"], "type": "CHART"}, "CHART-F-fkth0Dnv": {"children": [], "id": "CHART-F-fkth0Dnv", "meta": {"chartId": 314, "height": 76, "sliceName": "Vaccine Candidates per Country", "sliceNameOverride": "Treemap of Vaccine Candidates per Country", "uuid": "e2f5a8a7-feb0-4f79-bc6b-01fe55b98b3c", "width": 5}, "parents": ["ROOT_ID", "TABS-wUKya7eQ0Z", "TAB-BCIJF4NvgQ", "ROW-zvw7luvEL"], "type": "CHART"}, "CHART-RjD_ygqtwH": {"children": [], "id": "CHART-RjD_ygqtwH", "meta": {"chartId": 351, "height": 59, "sliceName": "Vaccine Candidates per Phase", "sliceNameOverride": "Vaccine Candidates per Phase", "uuid": "30b73c65-85e7-455f-bb24-801bb0cdc670", "width": 2}, "parents": ["ROOT_ID", "TABS-wUKya7eQ0Z", "TAB-BCIJF4NvgQ", "ROW-xSeNAspgw"], "type": "CHART"}, "CHART-aGfmWtliqA": {"children": [], "id": "CHART-aGfmWtliqA", "meta": {"chartId": 312, "height": 59, "sliceName": "Vaccine Candidates per Phase", "uuid": "392f293e-0892-4316-bd41-c927b65606a4", "width": 4}, "parents": ["ROOT_ID", "TABS-wUKya7eQ0Z", "TAB-BCIJF4NvgQ", "ROW-xSeNAspgw"], "type": "CHART"}, "CHART-dCUpAcPsji": {"children": [], "id": "CHART-dCUpAcPsji", "meta": {"chartId": 325, "height": 82, "sliceName": "Vaccine Candidates per Country & Stage", "sliceNameOverride": "Heatmap of Countries & Clinical Stages", "uuid": "cd111331-d286-4258-9020-c7949a109ed2", "width": 4}, "parents": ["ROOT_ID", "TABS-wUKya7eQ0Z", "TAB-BCIJF4NvgQ", "ROW-zhOlQLQnB"], "type": "CHART"}, "CHART-eirDduqb1A": {"children": [], "id": "CHART-eirDduqb1A", "meta": {"chartId": 358, "height": 59, "sliceName": "Filtering Vaccines", "sliceNameOverride": "Filter Box of Vaccines", "uuid": "c29381ce-0e99-4cf3-bf0f-5f55d6b94176", "width": 3}, "parents": ["ROOT_ID", "TABS-wUKya7eQ0Z", "TAB-BCIJF4NvgQ", "ROW-xSeNAspgw"], "type": "CHART"}, "CHART-fYo7IyvKZQ": {"children": [], "id": "CHART-fYo7IyvKZQ", "meta": {"chartId": 371, "height": 82, "sliceName": "Vaccine Candidates per Country & Stage", "sliceNameOverride": "Sunburst of Country & Clinical Stages", "uuid": "f69c556f-15fe-4a82-a8bb-69d5b6954123", "width": 5}, "parents": ["ROOT_ID", "TABS-wUKya7eQ0Z", "TAB-BCIJF4NvgQ", "ROW-zhOlQLQnB"], "type": "CHART"}, "CHART-j4hUvP5dDD": {"children": [], "id": "CHART-j4hUvP5dDD", "meta": {"chartId": 364, "height": 82, "sliceName": "Vaccine Candidates per Approach & Stage", "sliceNameOverride": "Heatmap of Aproaches & Clinical Stages", "uuid": "0c953c84-0c9a-418d-be9f-2894d2a2cee0", "width": 3}, "parents": ["ROOT_ID", "TABS-wUKya7eQ0Z", "TAB-BCIJF4NvgQ", "ROW-zhOlQLQnB"], "type": "CHART"}, "DASHBOARD_VERSION_KEY": "v2", "GRID_ID": {"children": [], "id": "GRID_ID", "parents": ["ROOT_ID"], "type": "GRID"}, "HEADER_ID": {"id": "HEADER_ID", "meta": {"text": "COVID Vaccine Dashboard"}, "type": "HEADER"}, "MARKDOWN-VjQQ5SFj5v": {"children": [], "id": "MARKDOWN-VjQQ5SFj5v", "meta": {"code": "# COVID-19 Vaccine Dashboard\\n\\nEverywhere you look, you see negative news about COVID-19. This is to be expected; it\'s been a brutal year and this disease is no joke. This dashboard hopes to use visualization to inject some optimism about the coming return to normalcy we enjoyed before 2020! There\'s lots to be optimistic about:\\n\\n- the sheer volume of attempts to fund the R&D needed to produce and bring an effective vaccine to market\\n- the large number of countries involved in at least one vaccine candidate (and the diversity of economic status of these countries)\\n- the diversity of vaccine approaches taken\\n- the fact that 2 vaccines have already been approved (and a hundreds of thousands of patients have already been vaccinated)\\n\\n### The Dataset\\n\\nThis dashboard is powered by data maintained by the Millken Institute ([link to dataset](https://airtable.com/shrSAi6t5WFwqo3GM/tblEzPQS5fnc0FHYR/viwDBH7b6FjmIBX5x?blocks=bipZFzhJ7wHPv7x9z)). We researched each vaccine candidate and added our own best guesses for the country responsible for each vaccine effort.\\n\\n_Note that this dataset was last updated on 12/23/2020_.\\n\\n", "height": 59, "width": 3}, "parents": ["ROOT_ID", "TABS-wUKya7eQ0Z", "TAB-BCIJF4NvgQ", "ROW-xSeNAspgw"], "type": "MARKDOWN"}, "ROOT_ID": {"children": ["TABS-wUKya7eQ0Z"], "id": "ROOT_ID", "type": "ROOT"}, "ROW-xSeNAspgw": {"children": ["MARKDOWN-VjQQ5SFj5v", "CHART-aGfmWtliqA", "CHART-RjD_ygqtwH", "CHART-eirDduqb1A"], "id": "ROW-xSeNAspgw", "meta": {"0": "ROOT_ID", "background": "BACKGROUND_TRANSPARENT"}, "parents": ["ROOT_ID", "TABS-wUKya7eQ0Z", "TAB-BCIJF4NvgQ"], "type": "ROW"}, "ROW-zhOlQLQnB": {"children": ["CHART-j4hUvP5dDD", "CHART-dCUpAcPsji", "CHART-fYo7IyvKZQ"], "id": "ROW-zhOlQLQnB", "meta": {"0": "ROOT_ID", "background": "BACKGROUND_TRANSPARENT"}, "parents": ["ROOT_ID", "TABS-wUKya7eQ0Z", "TAB-BCIJF4NvgQ"], "type": "ROW"}, "ROW-zvw7luvEL": {"children": ["CHART-63bEuxjDMJ", "CHART-F-fkth0Dnv"], "id": "ROW-zvw7luvEL", "meta": {"0": "ROOT_ID", "background": "BACKGROUND_TRANSPARENT"}, "parents": ["ROOT_ID", "TABS-wUKya7eQ0Z", "TAB-BCIJF4NvgQ"], "type": "ROW"}, "TAB-BCIJF4NvgQ": {"children": ["ROW-xSeNAspgw", "ROW-zvw7luvEL", "ROW-zhOlQLQnB"], "id": "TAB-BCIJF4NvgQ", "meta": {"text": "Overview"}, "parents": ["ROOT_ID", "TABS-wUKya7eQ0Z"], "type": "TAB"}, "TABS-wUKya7eQ0Z": {"children": ["TAB-BCIJF4NvgQ"], "id": "TABS-wUKya7eQ0Z", "meta": {}, "parents": ["ROOT_ID"], "type": "TABS"}}', + '{"CHART-63bEuxjDMJ": {"children": [], "id": "CHART-63bEuxjDMJ", "meta": {"chartId": 369, "height": 76, "sliceName": "Vaccine Candidates per Country", "sliceNameOverride": "Map of Vaccine Candidates", "uuid": "ddc91df6-fb40-4826-bdca-16b85af1c024", "width": 7}, "parents": ["ROOT_ID", "TABS-wUKya7eQ0Z", "TAB-BCIJF4NvgQ", "ROW-zvw7luvEL"], "type": "CHART"}, "CHART-F-fkth0Dnv": {"children": [], "id": "CHART-F-fkth0Dnv", "meta": {"chartId": 314, "height": 76, "sliceName": "Vaccine Candidates per Country", "sliceNameOverride": "Treemap of Vaccine Candidates per Country", "uuid": "e2f5a8a7-feb0-4f79-bc6b-01fe55b98b3c", "width": 5}, "parents": ["ROOT_ID", "TABS-wUKya7eQ0Z", "TAB-BCIJF4NvgQ", "ROW-zvw7luvEL"], "type": "CHART"}, "CHART-RjD_ygqtwH": {"children": [], "id": "CHART-RjD_ygqtwH", "meta": {"chartId": 351, "height": 59, "sliceName": "Vaccine Candidates per Phase", "sliceNameOverride": "Vaccine Candidates per Phase", "uuid": "30b73c65-85e7-455f-bb24-801bb0cdc670", "width": 2}, "parents": ["ROOT_ID", "TABS-wUKya7eQ0Z", "TAB-BCIJF4NvgQ", "ROW-xSeNAspgw"], "type": "CHART"}, "CHART-aGfmWtliqA": {"children": [], "id": "CHART-aGfmWtliqA", "meta": {"chartId": 312, "height": 59, "sliceName": "Vaccine Candidates per Phase", "uuid": "392f293e-0892-4316-bd41-c927b65606a4", "width": 4}, "parents": ["ROOT_ID", "TABS-wUKya7eQ0Z", "TAB-BCIJF4NvgQ", "ROW-xSeNAspgw"], "type": "CHART"}, "CHART-dCUpAcPsji": {"children": [], "id": "CHART-dCUpAcPsji", "meta": {"chartId": 325, "height": 82, "sliceName": "Vaccine Candidates per Country & Stage", "sliceNameOverride": "Heatmap of Countries & Clinical Stages", "uuid": "cd111331-d286-4258-9020-c7949a109ed2", "width": 4}, "parents": ["ROOT_ID", "TABS-wUKya7eQ0Z", "TAB-BCIJF4NvgQ", "ROW-zhOlQLQnB"], "type": "CHART"}, "CHART-eirDduqb1A": {"children": [], "id": "CHART-eirDduqb1A", "meta": {"chartId": 358, "height": 59, "sliceName": "Filtering Vaccines", "sliceNameOverride": "Filter Box of Vaccines", "uuid": "c29381ce-0e99-4cf3-bf0f-5f55d6b94176", "width": 3}, "parents": ["ROOT_ID", "TABS-wUKya7eQ0Z", "TAB-BCIJF4NvgQ", "ROW-xSeNAspgw"], "type": "CHART"}, "CHART-fYo7IyvKZQ": {"children": [], "id": "CHART-fYo7IyvKZQ", "meta": {"chartId": 371, "height": 82, "sliceName": "Vaccine Candidates per Country & Stage", "sliceNameOverride": "Sunburst of Country & Clinical Stages", "uuid": "f69c556f-15fe-4a82-a8bb-69d5b6954123", "width": 5}, "parents": ["ROOT_ID", "TABS-wUKya7eQ0Z", "TAB-BCIJF4NvgQ", "ROW-zhOlQLQnB"], "type": "CHART"}, "CHART-j4hUvP5dDD": {"children": [], "id": "CHART-j4hUvP5dDD", "meta": {"chartId": 364, "height": 82, "sliceName": "Vaccine Candidates per Approach & Stage", "sliceNameOverride": "Heatmap of Approaches & Clinical Stages", "uuid": "0c953c84-0c9a-418d-be9f-2894d2a2cee0", "width": 3}, "parents": ["ROOT_ID", "TABS-wUKya7eQ0Z", "TAB-BCIJF4NvgQ", "ROW-zhOlQLQnB"], "type": "CHART"}, "DASHBOARD_VERSION_KEY": "v2", "GRID_ID": {"children": [], "id": "GRID_ID", "parents": ["ROOT_ID"], "type": "GRID"}, "HEADER_ID": {"id": "HEADER_ID", "meta": {"text": "COVID Vaccine Dashboard"}, "type": "HEADER"}, "MARKDOWN-VjQQ5SFj5v": {"children": [], "id": "MARKDOWN-VjQQ5SFj5v", "meta": {"code": "# COVID-19 Vaccine Dashboard\\n\\nEverywhere you look, you see negative news about COVID-19. This is to be expected; it\'s been a brutal year and this disease is no joke. This dashboard hopes to use visualization to inject some optimism about the coming return to normalcy we enjoyed before 2020! There\'s lots to be optimistic about:\\n\\n- the sheer volume of attempts to fund the R&D needed to produce and bring an effective vaccine to market\\n- the large number of countries involved in at least one vaccine candidate (and the diversity of economic status of these countries)\\n- the diversity of vaccine approaches taken\\n- the fact that 2 vaccines have already been approved (and a hundreds of thousands of patients have already been vaccinated)\\n\\n### The Dataset\\n\\nThis dashboard is powered by data maintained by the Millken Institute ([link to dataset](https://airtable.com/shrSAi6t5WFwqo3GM/tblEzPQS5fnc0FHYR/viwDBH7b6FjmIBX5x?blocks=bipZFzhJ7wHPv7x9z)). We researched each vaccine candidate and added our own best guesses for the country responsible for each vaccine effort.\\n\\n_Note that this dataset was last updated on 12/23/2020_.\\n\\n", "height": 59, "width": 3}, "parents": ["ROOT_ID", "TABS-wUKya7eQ0Z", "TAB-BCIJF4NvgQ", "ROW-xSeNAspgw"], "type": "MARKDOWN"}, "ROOT_ID": {"children": ["TABS-wUKya7eQ0Z"], "id": "ROOT_ID", "type": "ROOT"}, "ROW-xSeNAspgw": {"children": ["MARKDOWN-VjQQ5SFj5v", "CHART-aGfmWtliqA", "CHART-RjD_ygqtwH", "CHART-eirDduqb1A"], "id": "ROW-xSeNAspgw", "meta": {"0": "ROOT_ID", "background": "BACKGROUND_TRANSPARENT"}, "parents": ["ROOT_ID", "TABS-wUKya7eQ0Z", "TAB-BCIJF4NvgQ"], "type": "ROW"}, "ROW-zhOlQLQnB": {"children": ["CHART-j4hUvP5dDD", "CHART-dCUpAcPsji", "CHART-fYo7IyvKZQ"], "id": "ROW-zhOlQLQnB", "meta": {"0": "ROOT_ID", "background": "BACKGROUND_TRANSPARENT"}, "parents": ["ROOT_ID", "TABS-wUKya7eQ0Z", "TAB-BCIJF4NvgQ"], "type": "ROW"}, "ROW-zvw7luvEL": {"children": ["CHART-63bEuxjDMJ", "CHART-F-fkth0Dnv"], "id": "ROW-zvw7luvEL", "meta": {"0": "ROOT_ID", "background": "BACKGROUND_TRANSPARENT"}, "parents": ["ROOT_ID", "TABS-wUKya7eQ0Z", "TAB-BCIJF4NvgQ"], "type": "ROW"}, "TAB-BCIJF4NvgQ": {"children": ["ROW-xSeNAspgw", "ROW-zvw7luvEL", "ROW-zhOlQLQnB"], "id": "TAB-BCIJF4NvgQ", "meta": {"text": "Overview"}, "parents": ["ROOT_ID", "TABS-wUKya7eQ0Z"], "type": "TAB"}, "TABS-wUKya7eQ0Z": {"children": ["TAB-BCIJF4NvgQ"], "id": "TABS-wUKya7eQ0Z", "meta": {}, "parents": ["ROOT_ID"], "type": "TABS"}}', published: false, roles: [], slug: null, diff --git a/superset-frontend/src/dashboard/components/SliceHeader/index.tsx b/superset-frontend/src/dashboard/components/SliceHeader/index.tsx index a57a7cd22..a928933b5 100644 --- a/superset-frontend/src/dashboard/components/SliceHeader/index.tsx +++ b/superset-frontend/src/dashboard/components/SliceHeader/index.tsx @@ -232,7 +232,7 @@ const SliceHeader: FC = ({ )} {!!Object.values(annotationError).length && ( diff --git a/superset-frontend/src/dashboard/components/dnd/dragDroppableConfig.js b/superset-frontend/src/dashboard/components/dnd/dragDroppableConfig.js index 02466d3c5..4d7185148 100644 --- a/superset-frontend/src/dashboard/components/dnd/dragDroppableConfig.js +++ b/superset-frontend/src/dashboard/components/dnd/dragDroppableConfig.js @@ -19,7 +19,7 @@ import handleHover from './handleHover'; import handleDrop from './handleDrop'; -// note: the 'type' hook is not useful for us as dropping is contigent on other properties +// note: the 'type' hook is not useful for us as dropping is contingent on other properties const TYPE = 'DRAG_DROPPABLE'; export const dragConfig = [ diff --git a/superset-frontend/src/dashboard/components/gridComponents/Chart.jsx b/superset-frontend/src/dashboard/components/gridComponents/Chart.jsx index 506fefd43..89d4fb94c 100644 --- a/superset-frontend/src/dashboard/components/gridComponents/Chart.jsx +++ b/superset-frontend/src/dashboard/components/gridComponents/Chart.jsx @@ -211,7 +211,7 @@ class Chart extends React.Component { for (let i = 0; i < SHOULD_UPDATE_ON_PROP_CHANGES.length; i += 1) { const prop = SHOULD_UPDATE_ON_PROP_CHANGES[i]; // use deep objects equality comparison to prevent - // unneccessary updates when objects references change + // unnecessary updates when objects references change if (!areObjectsEqual(nextProps[prop], this.props[prop])) { return true; } diff --git a/superset-frontend/src/dashboard/components/gridComponents/Tabs.test.jsx b/superset-frontend/src/dashboard/components/gridComponents/Tabs.test.jsx index c1464ae4e..8a4f51171 100644 --- a/superset-frontend/src/dashboard/components/gridComponents/Tabs.test.jsx +++ b/superset-frontend/src/dashboard/components/gridComponents/Tabs.test.jsx @@ -40,7 +40,7 @@ import { nativeFilters } from 'spec/fixtures/mockNativeFilters'; import { initialState } from 'src/SqlLab/fixtures'; describe('Tabs', () => { - fetchMock.post('glob:*/r/shortner/', {}); + fetchMock.post('glob:*/r/shortener/', {}); const props = { id: 'TABS_ID', diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/getControlItemsMap.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/getControlItemsMap.tsx index 22078c26a..ec43e4aa5 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/getControlItemsMap.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/getControlItemsMap.tsx @@ -129,7 +129,7 @@ export default function getControlItemsMap({ doesColumnMatchFilterType(formFilter?.filterType || '', column) } onChange={() => { - // We need reset default value when when column changed + // We need reset default value when column changed setNativeFilterFieldValues(form, filterId, { defaultDataMask: null, }); diff --git a/superset-frontend/src/dashboard/util/filterboxMigrationHelper.ts b/superset-frontend/src/dashboard/util/filterboxMigrationHelper.ts index 4eebbc075..3e9ceb139 100644 --- a/superset-frontend/src/dashboard/util/filterboxMigrationHelper.ts +++ b/superset-frontend/src/dashboard/util/filterboxMigrationHelper.ts @@ -72,7 +72,7 @@ interface PreselectedFilterColumn { [key: string]: boolean | string | number | string[] | number[]; } -interface PreselectedFiltersMeatadata { +interface PreselectedFiltersMetadata { [key: string]: PreselectedFilterColumn; } @@ -97,7 +97,7 @@ enum FILTER_COMPONENT_FILTER_TYPES { } const getPreselectedValuesFromDashboard = - (preselectedFilters: PreselectedFiltersMeatadata) => + (preselectedFilters: PreselectedFiltersMetadata) => (filterKey: string, column: string) => { if (preselectedFilters[filterKey]?.[column]) { // overwrite default values by dashboard default_filters @@ -154,7 +154,7 @@ const getFilterboxDependencies = (filterScopes: FilterScopesMetadata) => { export default function getNativeFilterConfig( chartData: SliceData[] = [], filterScopes: FilterScopesMetadata = {}, - preselectFilters: PreselectedFiltersMeatadata = {}, + preselectFilters: PreselectedFiltersMetadata = {}, ): Filter[] { const filterConfig: Filter[] = []; const filterBoxToFilterComponentMap: FilterBoxToFilterComponentMap = {}; diff --git a/superset-frontend/src/explore/components/Control.test.tsx b/superset-frontend/src/explore/components/Control.test.tsx index 3921d4374..9b8b54985 100644 --- a/superset-frontend/src/explore/components/Control.test.tsx +++ b/superset-frontend/src/explore/components/Control.test.tsx @@ -61,7 +61,7 @@ describe('Control', () => { it('render null if type is not valid', () => { render( setup({ - type: 'UnkownControl', + type: 'UnknownControl', }), ); expect(screen.queryByRole('checkbox')).not.toBeInTheDocument(); diff --git a/superset-frontend/src/explore/components/ExploreChartPanel.jsx b/superset-frontend/src/explore/components/ExploreChartPanel.jsx index 03cda337b..a2f7d05b2 100644 --- a/superset-frontend/src/explore/components/ExploreChartPanel.jsx +++ b/superset-frontend/src/explore/components/ExploreChartPanel.jsx @@ -411,7 +411,7 @@ const ExploreChartPanel = ({ ); if (standalone) { - // dom manipulation hack to get rid of the boostrap theme's body background + // dom manipulation hack to get rid of the bootstrap theme's body background const standaloneClass = 'background-transparent'; const bodyClasses = document.body.className.split(' '); if (!bodyClasses.includes(standaloneClass)) { diff --git a/superset-frontend/src/explore/components/controls/ColorPickerControl.jsx b/superset-frontend/src/explore/components/controls/ColorPickerControl.jsx index d0337dcc3..3b8873579 100644 --- a/superset-frontend/src/explore/components/controls/ColorPickerControl.jsx +++ b/superset-frontend/src/explore/components/controls/ColorPickerControl.jsx @@ -59,7 +59,7 @@ const styles = { ...swatchCommon, borderRadius: '2px', }, - checkboard: { + checkerboard: { ...swatchCommon, background: 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg==") left center', @@ -105,7 +105,7 @@ export default class ColorPickerControl extends React.Component { content={this.renderPopover()} > -
+
diff --git a/superset-frontend/src/explore/components/controls/ColorSchemeControl/index.tsx b/superset-frontend/src/explore/components/controls/ColorSchemeControl/index.tsx index 768db89db..2faa08d8e 100644 --- a/superset-frontend/src/explore/components/controls/ColorSchemeControl/index.tsx +++ b/superset-frontend/src/explore/components/controls/ColorSchemeControl/index.tsx @@ -48,7 +48,7 @@ const StyledAlert = styled(Icons.AlertSolid)` `; const CUSTOM_LABEL_ALERT = t( - `This color scheme is being overriden by custom label colors. + `This color scheme is being overridden by custom label colors. Check the JSON metadata in the Advanced settings`, ); diff --git a/superset-frontend/src/explore/components/controls/DateFilterControl/types.ts b/superset-frontend/src/explore/components/controls/DateFilterControl/types.ts index 3179d6e39..ce5e81276 100644 --- a/superset-frontend/src/explore/components/controls/DateFilterControl/types.ts +++ b/superset-frontend/src/explore/components/controls/DateFilterControl/types.ts @@ -30,7 +30,7 @@ export type FrameType = export type DateTimeGrainType = | 'second' - | 'minite' + | 'minute' | 'hour' | 'day' | 'week' diff --git a/superset-frontend/src/explore/components/controls/MetricControl/AdhocMetric.js b/superset-frontend/src/explore/components/controls/MetricControl/AdhocMetric.js index 2cf220be9..868879659 100644 --- a/superset-frontend/src/explore/components/controls/MetricControl/AdhocMetric.js +++ b/superset-frontend/src/explore/components/controls/MetricControl/AdhocMetric.js @@ -127,7 +127,7 @@ export default class AdhocMetric { ...this, // all duplicate metrics are not considered new by default isNew: false, - // but still overriddable by nextFields + // but still overridable by nextFields ...nextFields, }); } diff --git a/superset-frontend/src/explore/exploreUtils/getHostName.test.ts b/superset-frontend/src/explore/exploreUtils/getHostName.test.ts index 6b90cc0f5..6711eca4a 100644 --- a/superset-frontend/src/explore/exploreUtils/getHostName.test.ts +++ b/superset-frontend/src/explore/exploreUtils/getHostName.test.ts @@ -30,7 +30,7 @@ jest.mock('src/utils/hostNamesConfig', () => ({ ], })); -test('Should get next diferent domain on a loop, never the first on the list', () => { +test('Should get next different domain on a loop, never the first on the list', () => { for (let loop = 3; loop > 0; loop -= 1) { expect(getHostName(true)).toBe('domain-b'); expect(getHostName(true)).toBe('domain-c'); diff --git a/superset-frontend/src/explore/store.js b/superset-frontend/src/explore/store.js index 50f83bd0f..239884bcd 100644 --- a/superset-frontend/src/explore/store.js +++ b/superset-frontend/src/explore/store.js @@ -22,7 +22,7 @@ import { getAllControlsState, getFormDataFromControls } from './controlUtils'; import { controls } from './controls'; function handleDeprecatedControls(formData) { - // Reacffectation / handling of deprecated controls + // Reaffectation / handling of deprecated controls /* eslint-disable no-param-reassign */ // y_axis_zero was a boolean forcing 0 to be part of the Y Axis diff --git a/superset-frontend/src/preamble.ts b/superset-frontend/src/preamble.ts index 1d5c2ae10..1af94eedc 100644 --- a/superset-frontend/src/preamble.ts +++ b/superset-frontend/src/preamble.ts @@ -25,7 +25,7 @@ import { merge } from 'lodash'; import setupClient from './setup/setupClient'; import setupColors from './setup/setupColors'; import setupFormatters from './setup/setupFormatters'; -import setupDashboardComponents from './setup/setupDasboardComponents'; +import setupDashboardComponents from './setup/setupDashboardComponents'; import { User } from './types/bootstrapTypes'; import { initFeatureFlags } from './featureFlags'; import getBootstrapData from './utils/getBootstrapData'; diff --git a/superset-frontend/src/setup/setupDasboardComponents.ts b/superset-frontend/src/setup/setupDashboardComponents.ts similarity index 100% rename from superset-frontend/src/setup/setupDasboardComponents.ts rename to superset-frontend/src/setup/setupDashboardComponents.ts diff --git a/superset-frontend/src/utils/getClientErrorObject.ts b/superset-frontend/src/utils/getClientErrorObject.ts index de2a2c2be..a5f287187 100644 --- a/superset-frontend/src/utils/getClientErrorObject.ts +++ b/superset-frontend/src/utils/getClientErrorObject.ts @@ -56,7 +56,7 @@ export function parseErrorJson(responseObject: JsonObject): ClientErrorObject { error.error = error.description = error.errors[0].message; error.link = error.errors[0]?.extra?.link; } - // Marshmallow field validation returns the error mssage in the format + // Marshmallow field validation returns the error message in the format // of { message: { field1: [msg1, msg2], field2: [msg], } } if (!error.error && error.message) { if (typeof error.message === 'object') { diff --git a/superset-frontend/src/views/CRUD/annotation/AnnotationList.tsx b/superset-frontend/src/views/CRUD/annotation/AnnotationList.tsx index 89a2e5e80..f92bedd15 100644 --- a/superset-frontend/src/views/CRUD/annotation/AnnotationList.tsx +++ b/superset-frontend/src/views/CRUD/annotation/AnnotationList.tsx @@ -274,7 +274,7 @@ function AnnotationList({ annotation={currentAnnotation} show={annotationModalOpen} onAnnotationAdd={() => refreshData()} - annnotationLayerId={annotationLayerId} + annotationLayerId={annotationLayerId} onHide={() => setAnnotationModalOpen(false)} /> {annotationCurrentlyDeleting && ( diff --git a/superset-frontend/src/views/CRUD/annotation/AnnotationModal.test.jsx b/superset-frontend/src/views/CRUD/annotation/AnnotationModal.test.jsx index 0b2f4cb9a..4ba95fe3b 100644 --- a/superset-frontend/src/views/CRUD/annotation/AnnotationModal.test.jsx +++ b/superset-frontend/src/views/CRUD/annotation/AnnotationModal.test.jsx @@ -80,12 +80,12 @@ describe('AnnotationModal', () => { it('renders add header when no annotation prop is included', async () => { const addWrapper = await mountAndWait({}); expect( - addWrapper.find('[data-test="annotaion-modal-title"]').text(), + addWrapper.find('[data-test="annotation-modal-title"]').text(), ).toEqual('Add annotation'); }); it('renders edit header when annotation prop is included', () => { - expect(wrapper.find('[data-test="annotaion-modal-title"]').text()).toEqual( + expect(wrapper.find('[data-test="annotation-modal-title"]').text()).toEqual( 'Edit annotation', ); }); diff --git a/superset-frontend/src/views/CRUD/annotation/AnnotationModal.tsx b/superset-frontend/src/views/CRUD/annotation/AnnotationModal.tsx index 81225feda..7aedad199 100644 --- a/superset-frontend/src/views/CRUD/annotation/AnnotationModal.tsx +++ b/superset-frontend/src/views/CRUD/annotation/AnnotationModal.tsx @@ -32,7 +32,7 @@ import { AnnotationObject } from './types'; interface AnnotationModalProps { addDangerToast: (msg: string) => void; addSuccessToast: (msg: string) => void; - annnotationLayerId: number; + annotationLayerId: number; annotation?: AnnotationObject | null; onAnnotationAdd?: (annotation?: AnnotationObject) => void; onHide: () => void; @@ -84,7 +84,7 @@ const AnnotationContainer = styled.div` const AnnotationModal: FunctionComponent = ({ addDangerToast, addSuccessToast, - annnotationLayerId, + annotationLayerId, annotation = null, onAnnotationAdd, onHide, @@ -102,7 +102,7 @@ const AnnotationModal: FunctionComponent = ({ createResource, updateResource, } = useSingleViewResource( - `annotation_layer/${annnotationLayerId}/annotation`, + `annotation_layer/${annotationLayerId}/annotation`, t('annotation'), addDangerToast, ); @@ -273,7 +273,7 @@ const AnnotationModal: FunctionComponent = ({ show={show} width="55%" title={ -

+

{isEditMode ? ( ) : ( diff --git a/superset-frontend/src/views/CRUD/data/database/DatabaseList.tsx b/superset-frontend/src/views/CRUD/data/database/DatabaseList.tsx index 0e3642493..00f207ba7 100644 --- a/superset-frontend/src/views/CRUD/data/database/DatabaseList.tsx +++ b/superset-frontend/src/views/CRUD/data/database/DatabaseList.tsx @@ -37,7 +37,7 @@ import Icons from 'src/components/Icons'; import { isUserAdmin } from 'src/dashboard/util/permissionUtils'; import ListView, { FilterOperator, Filters } from 'src/components/ListView'; import handleResourceExport from 'src/utils/export'; -import { ExtentionConfigs } from 'src/views/components/types'; +import { ExtensionConfigs } from 'src/views/components/types'; import { UserWithPermissionsAndRoles } from 'src/types/bootstrapTypes'; import type { MenuObjectProps } from 'src/types/bootstrapTypes'; import DatabaseModal from './DatabaseModal'; @@ -120,7 +120,7 @@ function DatabaseList({ addDangerToast, addSuccessToast }: DatabaseListProps) { COLUMNAR_EXTENSIONS, EXCEL_EXTENSIONS, ALLOWED_EXTENSIONS, - } = useSelector(state => state.common.conf); + } = useSelector(state => state.common.conf); useEffect(() => { if (query?.databaseAdded) { diff --git a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/DatabaseConnectionForm/EncryptedField.tsx b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/DatabaseConnectionForm/EncryptedField.tsx index dc24d1866..0125fd36d 100644 --- a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/DatabaseConnectionForm/EncryptedField.tsx +++ b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/DatabaseConnectionForm/EncryptedField.tsx @@ -23,7 +23,7 @@ import InfoTooltip from 'src/components/InfoTooltip'; import FormLabel from 'src/components/Form/FormLabel'; import Icons from 'src/components/Icons'; import { FieldPropTypes } from '.'; -import { infoTooltip, labelMarginBotton, CredentialInfoForm } from '../styles'; +import { infoTooltip, labelMarginBottom, CredentialInfoForm } from '../styles'; enum CredentialInfoOptions { jsonUpload, @@ -66,7 +66,7 @@ export const EncryptedField = ({ {db?.engine === 'gsheets' && (
labelMarginBotton(theme)} + css={(theme: SupersetTheme) => labelMarginBottom(theme)} required > {t('Type of Google Sheets allowed')} diff --git a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx index 72d3ddfd9..e7e0447e6 100644 --- a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx +++ b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx @@ -753,7 +753,7 @@ const DatabaseModal: FunctionComponent = ({ } if (dbToUpdate?.parameters?.catalog) { - // need to stringify gsheets catalog to allow it to be seralized + // need to stringify gsheets catalog to allow it to be serialized dbToUpdate.extra = JSON.stringify({ ...JSON.parse(dbToUpdate.extra || '{}'), engine_params: { diff --git a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/styles.ts b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/styles.ts index 048f15ee0..ed30e7885 100644 --- a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/styles.ts +++ b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/styles.ts @@ -32,7 +32,7 @@ export const no_margin_bottom = css` margin-bottom: 0; `; -export const labelMarginBotton = (theme: SupersetTheme) => css` +export const labelMarginBottom = (theme: SupersetTheme) => css` margin-bottom: ${theme.gridUnit * 2}px; `; diff --git a/superset-frontend/src/views/CRUD/types.ts b/superset-frontend/src/views/CRUD/types.ts index 441fc9bde..7dd5d74f1 100644 --- a/superset-frontend/src/views/CRUD/types.ts +++ b/superset-frontend/src/views/CRUD/types.ts @@ -117,7 +117,7 @@ export enum QueryObjectColumns { database_name = 'database.database_name', schema = 'schema', sql = 'sql', - executed_sql = 'exceuted_sql', + executed_sql = 'executed_sql', sql_tables = 'sql_tables', status = 'status', tab_name = 'tab_name', diff --git a/superset-frontend/src/views/CRUD/utils.tsx b/superset-frontend/src/views/CRUD/utils.tsx index 07794f960..4b839739d 100644 --- a/superset-frontend/src/views/CRUD/utils.tsx +++ b/superset-frontend/src/views/CRUD/utils.tsx @@ -178,7 +178,7 @@ export const getUserOwnedObjects = ( endpoint: `/api/v1/${resource}/?q=${getParams(filters)}`, }).then(res => res.json?.result); -export const getRecentAcitivtyObjs = ( +export const getRecentActivityObjs = ( userId: string | number, recent: string, addDangerToast: (arg1: string, arg2: any) => any, diff --git a/superset-frontend/src/views/CRUD/welcome/ActivityTable.tsx b/superset-frontend/src/views/CRUD/welcome/ActivityTable.tsx index 302a32e7f..11a3e9afd 100644 --- a/superset-frontend/src/views/CRUD/welcome/ActivityTable.tsx +++ b/superset-frontend/src/views/CRUD/welcome/ActivityTable.tsx @@ -58,7 +58,7 @@ interface RecentDashboard extends RecentActivity { } /** - * Recent activity objects fetched by `getRecentAcitivtyObjs`. + * Recent activity objects fetched by `getRecentActivityObjs`. */ type ActivityObject = | RecentSlice diff --git a/superset-frontend/src/views/CRUD/welcome/Welcome.tsx b/superset-frontend/src/views/CRUD/welcome/Welcome.tsx index bede59457..9da45615f 100644 --- a/superset-frontend/src/views/CRUD/welcome/Welcome.tsx +++ b/superset-frontend/src/views/CRUD/welcome/Welcome.tsx @@ -38,7 +38,7 @@ import ListViewCard from 'src/components/ListViewCard'; import withToasts from 'src/components/MessageToasts/withToasts'; import { createErrorHandler, - getRecentAcitivtyObjs, + getRecentActivityObjs, mq, CardContainer, getUserOwnedObjects, @@ -228,7 +228,7 @@ function Welcome({ user, addDangerToast }: WelcomeProps) { } const activeTab = getItem(LocalStorageKeys.homepage_activity_filter, null); setActiveState(collapseState.length > 0 ? collapseState : DEFAULT_TAB_ARR); - getRecentAcitivtyObjs(user.userId!, recent, addDangerToast, otherTabFilters) + getRecentActivityObjs(user.userId!, recent, addDangerToast, otherTabFilters) .then(res => { const data: ActivityData | null = {}; data[TableTab.Other] = res.other; diff --git a/superset-frontend/src/views/components/RightMenu.tsx b/superset-frontend/src/views/components/RightMenu.tsx index 2e37424e0..e245096f4 100644 --- a/superset-frontend/src/views/components/RightMenu.tsx +++ b/superset-frontend/src/views/components/RightMenu.tsx @@ -48,7 +48,7 @@ import LanguagePicker from './LanguagePicker'; import DatabaseModal from '../CRUD/data/database/DatabaseModal'; import { uploadUserPerms } from '../CRUD/utils'; import { - ExtentionConfigs, + ExtensionConfigs, GlobalMenuDataOptions, RightMenuProps, } from './types'; @@ -141,7 +141,7 @@ const RightMenu = ({ EXCEL_EXTENSIONS, ALLOWED_EXTENSIONS, HAS_GSHEETS_INSTALLED, - } = useSelector(state => state.common.conf); + } = useSelector(state => state.common.conf); const [showDatabaseModal, setShowDatabaseModal] = useState(false); const [engine, setEngine] = useState(''); const canSql = findPermission('can_sqllab', 'Superset', roles); diff --git a/superset-frontend/src/views/components/types.ts b/superset-frontend/src/views/components/types.ts index 70f1eb153..2cdc3ae92 100644 --- a/superset-frontend/src/views/components/types.ts +++ b/superset-frontend/src/views/components/types.ts @@ -19,7 +19,7 @@ import { NavBarProps, MenuObjectProps } from 'src/types/bootstrapTypes'; -export interface ExtentionConfigs { +export interface ExtensionConfigs { ALLOWED_EXTENSIONS: Array; CSV_EXTENSIONS: Array; COLUMNAR_EXTENSIONS: Array; diff --git a/superset-frontend/webpack.config.js b/superset-frontend/webpack.config.js index cf1d3c831..f8428e441 100644 --- a/superset-frontend/webpack.config.js +++ b/superset-frontend/webpack.config.js @@ -108,7 +108,7 @@ const plugins = [ entrypoints: entryFiles, }; }, - // Also write maniafest.json to disk when running `npm run dev`. + // Also write manifest.json to disk when running `npm run dev`. // This is required for Flask to work. writeToFileEmit: isDevMode && !isDevServer, }), @@ -325,7 +325,7 @@ const config = { transpileOnly: true, // must override compiler options here, even though we have set // the same options in `tsconfig.json`, because they may still - // be overriden by `tsconfig.json` in node_modules subdirectories. + // be overridden by `tsconfig.json` in node_modules subdirectories. compilerOptions: { esModuleInterop: false, importHelpers: false, diff --git a/superset/charts/schemas.py b/superset/charts/schemas.py index dee73de17..1a8e8d728 100644 --- a/superset/charts/schemas.py +++ b/superset/charts/schemas.py @@ -435,7 +435,7 @@ class ChartDataRollingOptionsSchema(ChartDataPostProcessingOperationOptionsSchem example=7, ) rolling_type_options = fields.Dict( - desctiption="Optional options to pass to rolling method. Needed for " + description="Optional options to pass to rolling method. Needed for " "e.g. quantile operation.", example={}, ) @@ -551,7 +551,7 @@ class ChartDataProphetOptionsSchema(ChartDataPostProcessingOperationOptionsSchem required=True, ) periods = fields.Integer( - descrption="Time periods (in units of `time_grain`) to predict into the future", + description="Time periods (in units of `time_grain`) to predict into the future", min=0, example=7, required=True, @@ -910,7 +910,7 @@ class AnnotationLayerSchema(Schema): ) overrides = fields.Dict( keys=fields.String( - desciption="Name of property to be overridden", + description="Name of property to be overridden", validate=validate.OneOf( choices=("granularity", "time_grain_sqla", "time_range", "time_shift"), ), @@ -1298,7 +1298,7 @@ class ChartDataResponseResult(Schema): allow_none=False, ) stacktrace = fields.String( - desciption="Stacktrace if there was an error", + description="Stacktrace if there was an error", allow_none=True, ) rowcount = fields.Integer( @@ -1317,10 +1317,10 @@ class ChartDataResponseResult(Schema): fields.Dict(), description="A list with rejected filters" ) from_dttm = fields.Integer( - desciption="Start timestamp of time range", required=False, allow_none=True + description="Start timestamp of time range", required=False, allow_none=True ) to_dttm = fields.Integer( - desciption="End timestamp of time range", required=False, allow_none=True + description="End timestamp of time range", required=False, allow_none=True ) diff --git a/superset/cli/importexport.py b/superset/cli/importexport.py index 1ddaf7cfc..6ca58e995 100755 --- a/superset/cli/importexport.py +++ b/superset/cli/importexport.py @@ -66,7 +66,7 @@ if feature_flags.get("VERSIONED_EXPORT"): @click.option( "--dashboard-file", "-f", - help="Specify the the file to export to", + help="Specify the file to export to", ) def export_dashboards(dashboard_file: Optional[str] = None) -> None: """Export dashboards to ZIP file""" @@ -101,7 +101,7 @@ if feature_flags.get("VERSIONED_EXPORT"): @click.option( "--datasource-file", "-f", - help="Specify the the file to export to", + help="Specify the file to export to", ) def export_datasources(datasource_file: Optional[str] = None) -> None: """Export datasources to ZIP file""" @@ -206,7 +206,7 @@ else: "--dashboard-file", "-f", default=None, - help="Specify the the file to export to", + help="Specify the file to export to", ) @click.option( "--print_stdout", @@ -236,7 +236,7 @@ else: "--datasource-file", "-f", default=None, - help="Specify the the file to export to", + help="Specify the file to export to", ) @click.option( "--print_stdout", diff --git a/superset/datasets/commands/importers/v0.py b/superset/datasets/commands/importers/v0.py index 74b9ca0a6..f706ecf38 100644 --- a/superset/datasets/commands/importers/v0.py +++ b/superset/datasets/commands/importers/v0.py @@ -139,7 +139,7 @@ def import_datasource( # pylint: disable=too-many-arguments ) -> int: """Imports the datasource from the object to the database. - Metrics and columns and datasource will be overrided if exists. + Metrics and columns and datasource will be overridden if exists. This function can be used to import/export datasources between multiple superset instances. Audit metadata isn't copies over. """ diff --git a/superset/examples/configs/dashboards/COVID_Vaccine_Dashboard.yaml b/superset/examples/configs/dashboards/COVID_Vaccine_Dashboard.yaml index fad874d60..a954e63a0 100644 --- a/superset/examples/configs/dashboards/COVID_Vaccine_Dashboard.yaml +++ b/superset/examples/configs/dashboards/COVID_Vaccine_Dashboard.yaml @@ -90,7 +90,7 @@ position: chartId: 3962 height: 82 sliceName: Vaccine Candidates per Approach & Stage - sliceNameOverride: Heatmap of Aproaches & Clinical Stages + sliceNameOverride: Heatmap of Approaches & Clinical Stages uuid: 0c953c84-0c9a-418d-be9f-2894d2a2cee0 width: 4 parents: diff --git a/superset/migrations/versions/2017-02-08_14-16_a99f2f7c195a_rewriting_url_from_shortner_with_new_.py b/superset/migrations/versions/2017-02-08_14-16_a99f2f7c195a_rewriting_url_from_shortner_with_new_.py index 5e1ae9a25..04a39a31f 100644 --- a/superset/migrations/versions/2017-02-08_14-16_a99f2f7c195a_rewriting_url_from_shortner_with_new_.py +++ b/superset/migrations/versions/2017-02-08_14-16_a99f2f7c195a_rewriting_url_from_shortner_with_new_.py @@ -14,7 +14,7 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -"""rewriting url from shortner with new format +"""rewriting url from shortener with new format Revision ID: a99f2f7c195a Revises: 53fc3de270ae diff --git a/superset/migrations/versions/2020-03-25_10-42_f9a30386bd74_cleanup_time_grainularity.py b/superset/migrations/versions/2020-03-25_10-42_f9a30386bd74_cleanup_time_grainularity.py index 055c51174..b45e7f9ad 100644 --- a/superset/migrations/versions/2020-03-25_10-42_f9a30386bd74_cleanup_time_grainularity.py +++ b/superset/migrations/versions/2020-03-25_10-42_f9a30386bd74_cleanup_time_grainularity.py @@ -14,7 +14,7 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -"""cleanup_time_grainularity +"""cleanup_time_granularity Revision ID: f9a30386bd74 Revises: b5998378c225 @@ -47,7 +47,7 @@ class Slice(Base): def upgrade(): """ - Remove any erroneous time grainularity fields from slices foor those visualization + Remove any erroneous time granularity fields from slices foor those visualization types which do not support time granularity. :see: https://github.com/apache/superset/pull/8674 @@ -59,7 +59,7 @@ def upgrade(): bind = op.get_bind() session = db.Session(bind=bind) - # Visualization types which support time grainularity (hence negate). + # Visualization types which support time granularity (hence negate). viz_types = [ "area", "bar", @@ -73,9 +73,9 @@ def upgrade(): "time_table", ] - # Erroneous time grainularity fields for either Druid NoSQL or SQL slices which do - # not support time grainularity. - erroneous = ["grainularity", "time_grain_sqla"] + # Erroneous time granularity fields for either Druid NoSQL or SQL slices which do + # not support time granularity. + erroneous = ["granularity", "time_grain_sqla"] for slc in session.query(Slice).filter(Slice.viz_type.notin_(viz_types)).all(): try: diff --git a/superset/migrations/versions/2020-09-28_17-57_b56500de1855_add_uuid_column_to_import_mixin.py b/superset/migrations/versions/2020-09-28_17-57_b56500de1855_add_uuid_column_to_import_mixin.py index c392c3e78..9ff117b1e 100644 --- a/superset/migrations/versions/2020-09-28_17-57_b56500de1855_add_uuid_column_to_import_mixin.py +++ b/superset/migrations/versions/2020-09-28_17-57_b56500de1855_add_uuid_column_to_import_mixin.py @@ -101,7 +101,7 @@ def update_position_json(dashboard, session, uuid_map): def update_dashboards(session, uuid_map): message = ( - "Updating dasboard position json with slice uuid.." + "Updating dashboard position json with slice uuid.." if uuid_map else "Cleaning up slice uuid from dashboard position json.." ) diff --git a/superset/migrations/versions/2021-08-31_11-37_021b81fe4fbb_add_type_to_native_filter_configuration.py b/superset/migrations/versions/2021-08-31_11-37_021b81fe4fbb_add_type_to_native_filter_configuration.py index 1a0e972fb..ae1b6c82e 100644 --- a/superset/migrations/versions/2021-08-31_11-37_021b81fe4fbb_add_type_to_native_filter_configuration.py +++ b/superset/migrations/versions/2021-08-31_11-37_021b81fe4fbb_add_type_to_native_filter_configuration.py @@ -91,7 +91,7 @@ def downgrade(): for dashboard in session.query(Dashboard).all(): logger.info( - "[RemoveTypeToNativeFilter] Updating Dashobard", + "[RemoveTypeToNativeFilter] Updating Dashboard", dashboard.id, ) if not dashboard.json_metadata: diff --git a/superset/migrations/versions/2022-01-28_16-03_5afbb1a5849b_add_embedded_dahshoard_table.py b/superset/migrations/versions/2022-01-28_16-03_5afbb1a5849b_add_embedded_dahshoard_table.py index 1f1c62782..5d415e159 100644 --- a/superset/migrations/versions/2022-01-28_16-03_5afbb1a5849b_add_embedded_dahshoard_table.py +++ b/superset/migrations/versions/2022-01-28_16-03_5afbb1a5849b_add_embedded_dahshoard_table.py @@ -14,7 +14,7 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -"""add_embedded_dahshoard_table +"""add_embedded_dashboard_table Revision ID: 5afbb1a5849b Revises: 5fd49410a97a diff --git a/superset/templates/tail_js_custom_extra.html b/superset/templates/tail_js_custom_extra.html index 598905402..92ad82761 100644 --- a/superset/templates/tail_js_custom_extra.html +++ b/superset/templates/tail_js_custom_extra.html @@ -18,7 +18,7 @@ #} {# - This file may be overriden in your custom deployment. + This file may be overridden in your custom deployment. It will be included in every view in superset and is a good place to include your custom frontend code, such as scripts to initialize google analytics, intercom, segment, etc. diff --git a/superset/translations/en/LC_MESSAGES/messages.po b/superset/translations/en/LC_MESSAGES/messages.po index ec9782437..6faf2b1c7 100644 --- a/superset/translations/en/LC_MESSAGES/messages.po +++ b/superset/translations/en/LC_MESSAGES/messages.po @@ -3522,7 +3522,7 @@ msgstr "" #: superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/components/ColumnConfigControl/constants.tsx:154 msgid "" "D3 number format for numbers between -1.0 and 1.0, useful when you want " -"to have different siginificant digits for small and large numbers" +"to have different significant digits for small and large numbers" msgstr "" #: superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/controlPanel.tsx:220 @@ -8597,7 +8597,7 @@ msgid "Position of column level subtotal" msgstr "" #: superset-frontend/plugins/plugin-chart-echarts/src/Tree/controlPanel.tsx:163 -msgid "Position of intermidiate node label on tree" +msgid "Position of intermediate node label on tree" msgstr "" #: superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/controlPanel.tsx:293 @@ -10412,7 +10412,7 @@ msgstr "" #: superset-frontend/plugins/plugin-chart-echarts/src/Treemap/index.ts:52 msgid "" -"Show hierarchical relationships of data, with with the value represented " +"Show hierarchical relationships of data, with the value represented " "by area, showing proportion and contribution to the whole." msgstr "" @@ -12138,7 +12138,7 @@ msgstr "" #: superset-frontend/src/explore/components/controls/ColorSchemeControl/index.jsx:127 msgid "" -"This color scheme is being overriden by custom label colors.\n" +"This color scheme is being overridden by custom label colors.\n" " Check the JSON metadata in the Advanced settings" msgstr "" @@ -13412,7 +13412,7 @@ msgstr "" #: superset-frontend/plugins/legacy-plugin-chart-country-map/src/index.js:27 msgid "" "Visualizes how a single metric varies across a country's principal " -"subdivisions (states, provinces, etc) on a chloropleth map. Each " +"subdivisions (states, provinces, etc) on a choropleth map. Each " "subdivision's value is elevated when you hover over the corresponding " "geographic boundary." msgstr "" diff --git a/superset/translations/messages.pot b/superset/translations/messages.pot index f5279935a..ad475ef1e 100644 --- a/superset/translations/messages.pot +++ b/superset/translations/messages.pot @@ -3528,7 +3528,7 @@ msgstr "" #: superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/components/ColumnConfigControl/constants.tsx:154 msgid "" "D3 number format for numbers between -1.0 and 1.0, useful when you want " -"to have different siginificant digits for small and large numbers" +"to have different significant digits for small and large numbers" msgstr "" #: superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/controlPanel.tsx:220 @@ -8604,7 +8604,7 @@ msgid "Position of column level subtotal" msgstr "" #: superset-frontend/plugins/plugin-chart-echarts/src/Tree/controlPanel.tsx:163 -msgid "Position of intermidiate node label on tree" +msgid "Position of intermediate node label on tree" msgstr "" #: superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/controlPanel.tsx:293 @@ -10418,7 +10418,7 @@ msgstr "" #: superset-frontend/plugins/plugin-chart-echarts/src/Treemap/index.ts:52 msgid "" -"Show hierarchical relationships of data, with with the value represented " +"Show hierarchical relationships of data, with the value represented " "by area, showing proportion and contribution to the whole." msgstr "" @@ -12144,7 +12144,7 @@ msgstr "" #: superset-frontend/src/explore/components/controls/ColorSchemeControl/index.jsx:127 msgid "" -"This color scheme is being overriden by custom label colors.\n" +"This color scheme is being overridden by custom label colors.\n" " Check the JSON metadata in the Advanced settings" msgstr "" @@ -13418,7 +13418,7 @@ msgstr "" #: superset-frontend/plugins/legacy-plugin-chart-country-map/src/index.js:27 msgid "" "Visualizes how a single metric varies across a country's principal " -"subdivisions (states, provinces, etc) on a chloropleth map. Each " +"subdivisions (states, provinces, etc) on a choropleth map. Each " "subdivision's value is elevated when you hover over the corresponding " "geographic boundary." msgstr "" diff --git a/superset/utils/core.py b/superset/utils/core.py index af6a2519e..6f86372f7 100644 --- a/superset/utils/core.py +++ b/superset/utils/core.py @@ -366,7 +366,7 @@ class RowLevelSecurityFilterType(str, Enum): class ColumnTypeSource(Enum): GET_TABLE = 1 - CURSOR_DESCRIPION = 2 + CURSOR_DESCRIPTION = 2 class ColumnSpec(NamedTuple): diff --git a/superset/views/base.py b/superset/views/base.py index ebccd0684..0d69f1482 100644 --- a/superset/views/base.py +++ b/superset/views/base.py @@ -364,7 +364,7 @@ def menu_data(user: User) -> Dict[str, Any]: }, "environment_tag": environment_tag, "navbar_right": { - # show the watermark if the default app icon has been overriden + # show the watermark if the default app icon has been overridden "show_watermark": ("superset-logo-horiz" not in appbuilder.app_icon), "bug_report_url": appbuilder.app.config["BUG_REPORT_URL"], "bug_report_icon": appbuilder.app.config["BUG_REPORT_ICON"], @@ -618,7 +618,7 @@ class YamlExportMixin: # pylint: disable=too-few-public-methods class DeleteMixin: # pylint: disable=too-few-public-methods def _delete(self: BaseView, primary_key: int) -> None: """ - Delete function logic, override to implement diferent logic + Delete function logic, override to implement different logic deletes the record with primary_key = primary_key :param primary_key: diff --git a/superset/views/core.py b/superset/views/core.py index d5cad13fa..94cabfa96 100755 --- a/superset/views/core.py +++ b/superset/views/core.py @@ -852,7 +852,7 @@ class Superset(BaseSupersetView): # pylint: disable=too-many-public-methods ) except SupersetException: datasource_id = None - # fallback unkonw datasource to table type + # fallback unknown datasource to table type datasource_type = SqlaTable.type datasource: Optional[BaseDatasource] = None diff --git a/tests/integration_tests/annotation_layers/fixtures.py b/tests/integration_tests/annotation_layers/fixtures.py index 52cb8ca2a..8243d7e47 100644 --- a/tests/integration_tests/annotation_layers/fixtures.py +++ b/tests/integration_tests/annotation_layers/fixtures.py @@ -73,7 +73,7 @@ def _insert_annotation( def create_annotation_layers(): """ Creates ANNOTATION_LAYERS_COUNT-1 layers with no annotations - and a final one with ANNOTATION_COUNT childs + and a final one with ANNOTATION_COUNT children :return: """ with app.app_context(): diff --git a/tests/integration_tests/core_tests.py b/tests/integration_tests/core_tests.py index deedfb5e5..f036f18bf 100644 --- a/tests/integration_tests/core_tests.py +++ b/tests/integration_tests/core_tests.py @@ -417,7 +417,7 @@ class TestCore(SupersetTestCase): @pytest.mark.usefixtures("load_energy_table_with_slice") def test_slices_V2(self): # Add explore-v2-beta role to admin user - # Test all slice urls as user with with explore-v2-beta role + # Test all slice urls as user with explore-v2-beta role security_manager.add_role("explore-v2-beta") security_manager.add_user( diff --git a/tests/integration_tests/db_engine_specs/base_engine_spec_tests.py b/tests/integration_tests/db_engine_specs/base_engine_spec_tests.py index 0d945f8ed..87de98db1 100644 --- a/tests/integration_tests/db_engine_specs/base_engine_spec_tests.py +++ b/tests/integration_tests/db_engine_specs/base_engine_spec_tests.py @@ -395,7 +395,7 @@ def test_get_time_grain_with_config(): app.config = config -def test_get_time_grain_with_unkown_values(): +def test_get_time_grain_with_unknown_values(): """Should concatenate from configs and then sort in the proper order putting unknown patterns at the end""" config = app.config.copy() diff --git a/tests/integration_tests/security/migrate_roles_tests.py b/tests/integration_tests/security/migrate_roles_tests.py index ad8d01691..a541f0095 100644 --- a/tests/integration_tests/security/migrate_roles_tests.py +++ b/tests/integration_tests/security/migrate_roles_tests.py @@ -76,7 +76,7 @@ def create_old_role(pvm_map: PvmMigrationMapType, external_pvms): @pytest.mark.parametrize( - "descriptiom, new_pvms, pvm_map, external_pvms, deleted_views, deleted_permissions", + "description, new_pvms, pvm_map, external_pvms, deleted_views, deleted_permissions", [ ( "Many to one readonly", @@ -178,7 +178,7 @@ def create_old_role(pvm_map: PvmMigrationMapType, external_pvms): (), ), ( - "Many to one with with old permission that gets deleted", + "Many to one with old permission that gets deleted", { "NewDummy": ( "can_read", @@ -239,12 +239,12 @@ def create_old_role(pvm_map: PvmMigrationMapType, external_pvms): ], ) def test_migrate_role( - descriptiom, new_pvms, pvm_map, external_pvms, deleted_views, deleted_permissions + description, new_pvms, pvm_map, external_pvms, deleted_views, deleted_permissions ): """ Permission migration: generic tests """ - logger.info(descriptiom) + logger.info(description) with create_old_role(pvm_map, external_pvms) as old_role: role_name = old_role.name session = db.session