Skip to content

Commit

Permalink
chore(backend): Spelling (apache#19677)
Browse files Browse the repository at this point in the history
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
Co-authored-by: Evan Rusackas <evan@preset.io>
(cherry picked from commit dec6ac4)
  • Loading branch information
jsoref authored and sadpandajoe committed Feb 28, 2023
1 parent 3d0ef88 commit fcef054
Show file tree
Hide file tree
Showing 40 changed files with 74 additions and 74 deletions.
2 changes: 1 addition & 1 deletion docs/docs/miscellaneous/chart-params.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Note not all fields are correctly categorized. The fields vary based on visualiz
| `columns` | _array(string)_ | The **Breakdowns** widget |
| `groupby` | _array(string)_ | The **Group by** or **Series** widget |
| `limit` | _number_ | The **Series Limit** widget |
| `metric`<br/>`metric_2`<br/>`metrics`<br/>`percent_mertics`<br/>`secondary_metric`<br/>`size`<br/>`x`<br/>`y` | _string_,_object_,_array(string)_,_array(object)_ | The metric(s) depending on the visualization type |
| `metric`<br/>`metric_2`<br/>`metrics`<br/>`percent_metrics`<br/>`secondary_metric`<br/>`size`<br/>`x`<br/>`y` | _string_,_object_,_array(string)_,_array(object)_ | The metric(s) depending on the visualization type |
| `order_asc` | _boolean_ | The **Sort Descending** widget |
| `row_limit` | _number_ | The **Row limit** widget |
| `timeseries_limit_metric` | _object_ | The **Sort By** widget |
Expand Down
2 changes: 1 addition & 1 deletion docs/static/resources/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -17285,7 +17285,7 @@
"type": "string"
},
"url": {
"description": "pemanent link.",
"description": "permanent link.",
"type": "string"
}
},
Expand Down
4 changes: 2 additions & 2 deletions helm/superset/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ postgresql:
## Enable PostgreSQL persistence using Persistent Volume Claims.
enabled: true
##
## Persistant class
## Persistent class
# storageClass: classname
##
## Access modes:
Expand Down Expand Up @@ -778,7 +778,7 @@ redis:
## Use a PVC to persist data.
enabled: false
##
## Persistant class
## Persistent class
# storageClass: classname
##
## Access mode:
Expand Down
2 changes: 1 addition & 1 deletion superset/cli/importexport.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ def import_dashboards(path: str, recursive: bool, username: str) -> None:
"-s",
"sync",
default="",
help="comma seperated list of element types to synchronize "
help="comma separated list of element types to synchronize "
'e.g. "metrics,columns" deletes metrics and columns in the DB '
"that are not specified in the YAML file",
)
Expand Down
2 changes: 1 addition & 1 deletion superset/cli/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def re_encrypt_secrets(previous_secret_key: Optional[str] = None) -> None:
except ValueError as exc:
click.secho(
f"An error occurred, "
f"probably an invalid previoud secret key was provided. Error:[{exc}]",
f"probably an invalid previous secret key was provided. Error:[{exc}]",
err=True,
)
sys.exit(1)
File renamed without changes.
2 changes: 1 addition & 1 deletion superset/common/query_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ def cache_key(self, **extra: Any) -> str:

# TODO: the below KVs can all be cleaned up and moved to `to_dict()` at some
# predetermined point in time when orgs are aware that the previously
# chached results will be invalidated.
# cached results will be invalidated.
if not self.apply_fetch_values_predicate:
del cache_dict["apply_fetch_values_predicate"]
if self.datasource:
Expand Down
4 changes: 2 additions & 2 deletions superset/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def _try_json_readsha(filepath: str, length: int) -> Optional[str]:
# SQLALCHEMY_DATABASE_URI = 'mysql://myapp@localhost/myapp'
# SQLALCHEMY_DATABASE_URI = 'postgresql://root:password@localhost/myapp'

# In order to hook up a custom password store for all SQLACHEMY connections
# In order to hook up a custom password store for all SQLALCHEMY connections
# implement a function that takes a single argument of type 'sqla.engine.url',
# returns a password and set SQLALCHEMY_CUSTOM_PASSWORD_STORE.
#
Expand Down Expand Up @@ -411,7 +411,7 @@ def _try_json_readsha(filepath: str, length: int) -> Optional[str]:
"ENABLE_TEMPLATE_REMOVE_FILTERS": False,
# Allow for javascript controls components
# this enables programmers to customize certain charts (like the
# geospatial ones) by inputing javascript in controls. This exposes
# geospatial ones) by inputting javascript in controls. This exposes
# an XSS security vulnerability
"ENABLE_JAVASCRIPT_CONTROLS": False,
"KV_STORE": False,
Expand Down
6 changes: 3 additions & 3 deletions superset/connectors/sqla/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,7 @@ def sql_url(self) -> str:
return self.database.sql_url + "?table_name=" + str(self.table_name)

def external_metadata(self) -> List[Dict[str, str]]:
# todo(yongjie): create a pysical table column type in seprated PR
# todo(yongjie): create a physical table column type in a separate PR
if self.sql:
return get_virtual_table_metadata(dataset=self) # type: ignore
return get_physical_table_metadata(
Expand Down Expand Up @@ -1249,7 +1249,7 @@ def get_sqla_query( # pylint: disable=too-many-arguments,too-many-locals,too-ma
if metrics_exprs:
main_metric_expr = metrics_exprs[0]
else:
main_metric_expr, label = literal_column("COUNT(*)"), "ccount"
main_metric_expr, label = literal_column("COUNT(*)"), "count"
main_metric_expr = self.make_sqla_column_compatible(main_metric_expr, label)

# To ensure correct handling of the ORDER BY labeling we need to reference the
Expand Down Expand Up @@ -1419,7 +1419,7 @@ def get_sqla_query( # pylint: disable=too-many-arguments,too-many-locals,too-ma

# Order by columns are "hidden" columns, some databases require them
# always be present in SELECT if an aggregation function is used
if not db_engine_spec.allows_hidden_ordeby_agg:
if not db_engine_spec.allows_hidden_orderby_agg:
select_exprs = remove_duplicates(select_exprs + orderby_exprs)

qry = sa.select(select_exprs)
Expand Down
2 changes: 1 addition & 1 deletion superset/dao/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class BaseDAO:
"""
base_filter: Optional[BaseFilter] = None
"""
Child classes can register base filtering to be aplied to all filter methods
Child classes can register base filtering to be applied to all filter methods
"""
id_column_name = "id"

Expand Down
2 changes: 1 addition & 1 deletion superset/dashboards/commands/importers/v1/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def update_id_refs( # pylint: disable=too-many-locals
]

if "filter_scopes" in metadata:
# in filter_scopes the key is the chart ID as a string; we need to udpate
# in filter_scopes the key is the chart ID as a string; we need to update
# them to be the new ID as a string:
metadata["filter_scopes"] = {
str(id_map[int(old_id)]): columns
Expand Down
2 changes: 1 addition & 1 deletion superset/dashboards/filter_sets/commands/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from flask_appbuilder.models.sqla import Model

from superset import security_manager
from superset.common.not_authrized_object import NotAuthorizedException
from superset.common.not_authorized_object import NotAuthorizedException
from superset.dashboards.commands.exceptions import DashboardNotFoundError
from superset.dashboards.dao import DashboardDAO
from superset.dashboards.filter_sets.commands.exceptions import (
Expand Down
6 changes: 3 additions & 3 deletions superset/db_engine_specs/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class TimestampExpression(
): # pylint: disable=abstract-method, too-many-ancestors
def __init__(self, expr: str, col: ColumnClause, **kwargs: Any) -> None:
"""Sqlalchemy class that can be can be used to render native column elements
respeting engine-specific quoting rules as part of a string-based expression.
respecting engine-specific quoting rules as part of a string-based expression.
:param expr: Sql expression with '{col}' denoting the locations where the col
object will be rendered.
Expand Down Expand Up @@ -331,9 +331,9 @@ class BaseEngineSpec: # pylint: disable=too-many-public-methods

# Whether ORDER BY clause must appear in SELECT
# if TRUE, then it doesn't have to.
allows_hidden_ordeby_agg = True
allows_hidden_orderby_agg = True

# Whether ORDER BY clause can use sql caculated expression
# Whether ORDER BY clause can use sql calculated expression
# if True, use alias of select column for `order by`
# the True is safely for most database
# But for backward compatibility, False by default
Expand Down
4 changes: 2 additions & 2 deletions superset/db_engine_specs/hive.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class HiveEngineSpec(PrestoEngineSpec):
engine_name = "Apache Hive"
max_column_name_length = 767
allows_alias_to_source_column = True
allows_hidden_ordeby_agg = False
allows_hidden_orderby_agg = False

# When running `SHOW FUNCTIONS`, what is the name of the column with the
# function names?
Expand Down Expand Up @@ -491,7 +491,7 @@ def get_url_for_impersonation(
:param username: Effective username
"""
# Do nothing in the URL object since instead this should modify
# the configuraiton dictionary. See get_configuration_for_impersonation
# the configuration dictionary. See get_configuration_for_impersonation
return url

@classmethod
Expand Down
2 changes: 1 addition & 1 deletion superset/db_engine_specs/impala.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def get_schema_names(cls, inspector: Inspector) -> List[str]:
def has_implicit_cancel(cls) -> bool:
"""
Return True if the live cursor handles the implicit cancelation of the query,
False otherise.
False otherwise.
:return: Whether the live cursor implicitly cancels the query
:see: handle_cursor
Expand Down
4 changes: 2 additions & 2 deletions superset/db_engine_specs/kylin.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ def convert_dttm(
if isinstance(sqla_type, types.Date):
return f"CAST('{dttm.date().isoformat()}' AS DATE)"
if isinstance(sqla_type, types.TIMESTAMP):
datetime_fomatted = dttm.isoformat(sep=" ", timespec="seconds")
return f"""CAST('{datetime_fomatted}' AS TIMESTAMP)"""
datetime_formatted = dttm.isoformat(sep=" ", timespec="seconds")
return f"""CAST('{datetime_formatted}' AS TIMESTAMP)"""
return None
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ position:
code: '## FreeCodeCamp New Coder Survey 2018
Every year, FCC surveys its user base (mostly budding softwware developers)
Every year, FCC surveys its user base (mostly budding software developers)
to learn more about their interests, backgrounds, goals, job status, and socioeconomic
features. This dashboard visualizes survey data from the 2018 survey.
Expand All @@ -529,7 +529,7 @@ position:
meta:
code: "# Demographics\n\nFreeCodeCamp is a completely-online community of people\
\ learning to code and consists of aspiring & current developers from all\
\ over the world. That doesn't necessarily mean that acccess to these types\
\ over the world. That doesn't necessarily mean that access to these types\
\ of opportunities are evenly distributed. \n\nThe following charts can begin\
\ to help us understand:\n\n- the original citizenship of the survey respondents\n\
- minority representation among both aspiring and current developers\n- their\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,7 @@ columns:
expression: null
description: null
python_date_format: null
- column_name: rsrc_pluralsght
- column_name: rsrc_pluralsight
verbose_name: null
is_dttm: false
is_active: null
Expand Down Expand Up @@ -1320,7 +1320,7 @@ columns:
expression: null
description: null
python_date_format: null
- column_name: curr_emplymnt_other
- column_name: curr_employment_other
verbose_name: null
is_dttm: false
is_active: null
Expand Down Expand Up @@ -1450,7 +1450,7 @@ columns:
expression: null
description: null
python_date_format: null
- column_name: curr_emplymnt
- column_name: curr_employment
verbose_name: null
is_dttm: false
is_active: null
Expand Down
2 changes: 1 addition & 1 deletion superset/examples/multiformat_time_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def load_multiformat_time_series( # pylint: disable=too-many-locals
for col in obj.columns:
dttm_and_expr = dttm_and_expr_dict[col.column_name]
col.python_date_format = dttm_and_expr[0]
col.dbatabase_expr = dttm_and_expr[1]
col.database_expression = dttm_and_expr[1]
col.is_dttm = True
db.session.merge(obj)
db.session.commit()
Expand Down
2 changes: 1 addition & 1 deletion superset/explore/permalink/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def post(self) -> Response:
description: The key to retrieve the permanent link data.
url:
type: string
description: pemanent link.
description: permanent link.
400:
$ref: '#/components/responses/400'
401:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def upgrade():

# Drop the datasource_name column and associated constraints. Note
# due to prior revisions (1226819ee0e3, 3b626e2a6783) there may
# incorectly be multiple duplicate constraints.
# incorrectly be multiple duplicate constraints.
names = generic_find_fk_constraint_names(
foreign, {"datasource_name"}, "datasources", insp
)
Expand All @@ -124,7 +124,7 @@ def upgrade():
logging.warning(
"Constraint drop failed, you may want to do this "
"manually on your database. For context, this is a known "
"issue around undeterministic contraint names on Postgres "
"issue around nondeterministic constraint names on Postgres "
"and perhaps more databases through SQLAlchemy."
)
logging.exception(ex)
Expand Down
2 changes: 1 addition & 1 deletion superset/models/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1620,7 +1620,7 @@ def get_sqla_query( # pylint: disable=too-many-arguments,too-many-locals,too-ma

# Order by columns are "hidden" columns, some databases require them
# always be present in SELECT if an aggregation function is used
if not db_engine_spec.allows_hidden_ordeby_agg:
if not db_engine_spec.allows_hidden_orderby_agg:
select_exprs = utils.remove_duplicates(select_exprs + orderby_exprs)

qry = sa.select(select_exprs)
Expand Down
2 changes: 1 addition & 1 deletion superset/reports/commands/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def __init__(self) -> None:

class ReportScheduleOnlyChartOrDashboardError(ValidationError):
"""
Marshmallow validation error for report schedule accept exlusive chart or dashboard
Marshmallow validation error for report schedule accept exclusive chart or dashboard
"""

def __init__(self) -> None:
Expand Down
2 changes: 1 addition & 1 deletion superset/security/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ def sync_role_definitions(self) -> None:

def _get_pvms_from_builtin_role(self, role_name: str) -> List[PermissionView]:
"""
Gets a list of model PermissionView permissions infered from a builtin role
Gets a list of model PermissionView permissions inferred from a builtin role
definition
"""
role_from_permissions_names = self.builtin_roles.get(role_name, [])
Expand Down
2 changes: 1 addition & 1 deletion superset/sql_parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def limit(self) -> Optional[int]:
return self._limit

def is_select(self) -> bool:
# make sure we strip comments; prevents a bug with coments in the CTE
# make sure we strip comments; prevents a bug with comments in the CTE
parsed = sqlparse.parse(self.strip_comments())
if parsed[0].get_type() == "SELECT":
return True
Expand Down
4 changes: 2 additions & 2 deletions superset/translations/en/LC_MESSAGES/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@
"Alert fired during grace period.": [""],
"Alert ended grace period.": [""],
"Alert on grace period": [""],
"Report Schedule sellenium user not found": [""],
"Report Schedule selenium user not found": [""],
"Report Schedule state not found": [""],
"Report schedule unexpected error": [""],
"Changing this report is forbidden": [""],
Expand Down Expand Up @@ -526,7 +526,7 @@
],
"Request Permissions": [""],
"Cancel": [""],
"Use the edit buttom to change this field": [""],
"Use the edit button to change this field": [""],
"Test Connection": [""],
"[Superset] Access to the datasource %(name)s was granted": [""],
"Unable to find such a holiday: [{}]": [""],
Expand Down
6 changes: 3 additions & 3 deletions superset/translations/en/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -7879,7 +7879,7 @@ msgstr ""
#: superset/views/core.py:2075
msgid ""
"One or more required fields are missing in the request. Please try again,"
" and if the problem persists conctact your administrator."
" and if the problem persists contact your administrator."
msgstr ""

#: superset-frontend/src/dashboard/components/SliceHeader/index.tsx:46
Expand Down Expand Up @@ -9228,7 +9228,7 @@ msgid "Report Schedule reached a working timeout."
msgstr ""

#: superset/reports/commands/exceptions.py:226
msgid "Report Schedule sellenium user not found"
msgid "Report Schedule selenium user not found"
msgstr ""

#: superset/reports/commands/exceptions.py:230
Expand Down Expand Up @@ -13112,7 +13112,7 @@ msgid ""
msgstr ""

#: superset/templates/superset/fab_overrides/list_with_checkboxes.html:82
msgid "Use the edit buttom to change this field"
msgid "Use the edit button to change this field"
msgstr ""

#: superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/index.tsx:176
Expand Down
4 changes: 2 additions & 2 deletions superset/translations/messages.pot
Original file line number Diff line number Diff line change
Expand Up @@ -7886,7 +7886,7 @@ msgstr ""
#: superset/views/core.py:2075
msgid ""
"One or more required fields are missing in the request. Please try again,"
" and if the problem persists conctact your administrator."
" and if the problem persists contact your administrator."
msgstr ""

#: superset-frontend/src/dashboard/components/SliceHeader/index.tsx:46
Expand Down Expand Up @@ -9235,7 +9235,7 @@ msgid "Report Schedule reached a working timeout."
msgstr ""

#: superset/reports/commands/exceptions.py:226
msgid "Report Schedule sellenium user not found"
msgid "Report Schedule selenium user not found"
msgstr ""

#: superset/reports/commands/exceptions.py:230
Expand Down
2 changes: 1 addition & 1 deletion superset/translations/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
def get_language_pack(locale: str) -> Optional[Dict[str, Any]]:
"""Get/cache a language pack
Returns the langugage pack from cache if it exists, caches otherwise
Returns the language pack from cache if it exists, caches otherwise
>>> get_language_pack('fr')['Dashboards']
"Tableaux de bords"
Expand Down
2 changes: 1 addition & 1 deletion superset/utils/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1700,7 +1700,7 @@ def get_column_name_from_metric(metric: Metric) -> Optional[str]:

def get_column_names_from_metrics(metrics: List[Metric]) -> List[str]:
"""
Extract the columns that a list of metrics are referencing. Expcludes all
Extract the columns that a list of metrics are referencing. Excludes all
SQL metrics.
:param metrics: Ad-hoc metric
Expand Down
2 changes: 1 addition & 1 deletion superset/utils/date_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def get_since_until( # pylint: disable=too-many-arguments,too-many-locals,too-m
"""Return `since` and `until` date time tuple from string representations of
time_range, since, until and time_shift.
This functiom supports both reading the keys separately (from `since` and
This function supports both reading the keys separately (from `since` and
`until`), as well as the new `time_range` key. Valid formats are:
- ISO 8601
Expand Down
Loading

0 comments on commit fcef054

Please sign in to comment.