diff --git a/lib/sanbase/alerts/evaluator/scheduler.ex b/lib/sanbase/alerts/evaluator/scheduler.ex index 69e9451b90..0320f70d88 100644 --- a/lib/sanbase/alerts/evaluator/scheduler.ex +++ b/lib/sanbase/alerts/evaluator/scheduler.ex @@ -378,7 +378,7 @@ defmodule Sanbase.Alert.Scheduler do # Update all triggered_at regardless if the send to the channel succeed # because the alert will be stored in the timeline events. # Keep count of the total alerts triggered and the number of alerts - # that were not sent succesfully. Reasons can be: + # that were not sent successfully. Reasons can be: # - missing email/telegram linked when such channel is chosen; # - webhook failed to be sent; # - daily alerts limit is reached; diff --git a/lib/sanbase/dashboards/dashboards.ex b/lib/sanbase/dashboards/dashboards.ex index f406ea08b2..7be7aef1f2 100644 --- a/lib/sanbase/dashboards/dashboards.ex +++ b/lib/sanbase/dashboards/dashboards.ex @@ -85,7 +85,7 @@ defmodule Sanbase.Dashboards do end defp get_dashboard_queries_with_mapping_id(dashboard_id) do - # Get the queries for the dashboard and add the the mapping id + # Get the queries for the dashboard and add the mapping id # as dashboard_query_mapping_id Query virtual field DashboardQueryMapping.dashboard_id_rows(dashboard_id) |> Repo.all() diff --git a/lib/sanbase/discord_bot/command_handler.ex b/lib/sanbase/discord_bot/command_handler.ex index 60d89addff..f1b0eff051 100644 --- a/lib/sanbase/discord_bot/command_handler.ex +++ b/lib/sanbase/discord_bot/command_handler.ex @@ -607,7 +607,7 @@ defmodule Sanbase.DiscordBot.CommandHandler do end def generic_error_message(interaction) do - content = "An errror occured. Please try again" + content = "An error occurred. Please try again" Utils.edit_interaction_response(interaction, content, []) end diff --git a/lib/sanbase/event_bus/event_emitter.ex b/lib/sanbase/event_bus/event_emitter.ex index 5bfe803828..c069d84042 100644 --- a/lib/sanbase/event_bus/event_emitter.ex +++ b/lib/sanbase/event_bus/event_emitter.ex @@ -38,7 +38,7 @@ defmodule Sanbase.EventBus.EventEmitter do @doc ~s""" Emit an event built from the provided arguments. - If no error, occured, the first argument is returned as-is, so the function + If no error occurred, the first argument is returned as-is, so the function can be used inside pipelines. If changeset param is passed in the args it emits event only if there are actual changes in the changeset. @@ -58,7 +58,7 @@ defmodule Sanbase.EventBus.EventEmitter do arg end - # In test enviroment, if the test ends before the subscribers successfully + # In test environment, if the test ends before the subscribers successfully # handled the event, there will be errors. @wait_count 5 case Application.compile_env(:sanbase, :env) do diff --git a/lib/sanbase/external_services/coinmarketcap/ticker_fetcher.ex b/lib/sanbase/external_services/coinmarketcap/ticker_fetcher.ex index 4cc8c1a56c..f8a64ea77a 100644 --- a/lib/sanbase/external_services/coinmarketcap/ticker_fetcher.ex +++ b/lib/sanbase/external_services/coinmarketcap/ticker_fetcher.ex @@ -90,7 +90,7 @@ defmodule Sanbase.ExternalServices.Coinmarketcap.TickerFetcher do def work(opts \\ []) do Logger.info("[CMC] Fetching realtime data from coinmarketcap") # Fetch current coinmarketcap data for many tickers - # It fetches data for the the first N projects, where N is specified in + # It fetches data for the first N projects, where N is specified in # the COINMARKETCAP_API_PROJECTS_NUMBER env var tickers = case Ticker.fetch_data(opts) do diff --git a/lib/sanbase/menu/menus.ex b/lib/sanbase/menu/menus.ex index 6d75a52a07..ef65a49610 100644 --- a/lib/sanbase/menu/menus.ex +++ b/lib/sanbase/menu/menus.ex @@ -194,7 +194,7 @@ defmodule Sanbase.Menus do Each item has a `position`. If no position is specified, it will be appended at the end. If a position is specified, all the positions bigger than it will be bumped by 1 in order - to accomodate the new item. + to accommodate the new item. """ @spec create_menu_item(create_menu_item_params, user_id) :: {:ok, Menu.t()} | {:error, String.t()} diff --git a/lib/sanbase/metric/metric.ex b/lib/sanbase/metric/metric.ex index 72ee292104..08780b4f8f 100644 --- a/lib/sanbase/metric/metric.ex +++ b/lib/sanbase/metric/metric.ex @@ -98,7 +98,7 @@ defmodule Sanbase.Metric do hard_deprecate_after = Map.get(Helper.deprecated_metrics_map(), metric) # The metric is deprecated if `hard_deprecate_after` is nil - # or if the the date is in the future + # or if the date is in the future case hard_deprecate_after do nil -> false diff --git a/lib/sanbase/queries/authorization.ex b/lib/sanbase/queries/authorization.ex index 24b93ab5b1..ea96750d9f 100644 --- a/lib/sanbase/queries/authorization.ex +++ b/lib/sanbase/queries/authorization.ex @@ -167,7 +167,7 @@ defmodule Sanbase.Queries.Authorization do %{queries_executed_hour: count} when count >= query_executions_limit.hour -> - {:error, "The user with id #{user_id} has executed more queries than allowed in a hour."} + {:error, "The user with id #{user_id} has executed more queries than allowed in an hour."} %{queries_executed_day: count} when count >= query_executions_limit.day -> diff --git a/lib/sanbase/signal/signal.ex b/lib/sanbase/signal/signal.ex index 50d87b2e86..d73a271391 100644 --- a/lib/sanbase/signal/signal.ex +++ b/lib/sanbase/signal/signal.ex @@ -135,10 +135,10 @@ defmodule Sanbase.Signal do for every signal are returned without combining them with the data of other signals. If the `signals` argument has the atom value :all, then all available signals - that occured in the given from-to interval are returned. + that occurred in the given from-to interval are returned. If the `signals` arguments has a list of signals as a value, then all of those - signals that occured in the given from-to interval are returned. + signals that occurred in the given from-to interval are returned. """ @spec raw_data(signals, raw_signals_selector, datetime, datetime) :: Type.raw_data_result() def raw_data(signals, selector, from, to) do diff --git a/lib/sanbase/transfers/eth_transfers.ex b/lib/sanbase/transfers/eth_transfers.ex index ab2af01a37..bdd732b045 100644 --- a/lib/sanbase/transfers/eth_transfers.ex +++ b/lib/sanbase/transfers/eth_transfers.ex @@ -16,7 +16,7 @@ defmodule Sanbase.Transfers.EthTransfers do @doc ~s""" Return the biggest transfers for a list of wallets and time period. - The `type` argument control wheteher only incoming, outgoing or all transactions + The `type` argument controls whether only incoming, outgoing or all transactions are included. """ @spec top_wallet_transfers( diff --git a/lib/sanbase/utils/math.ex b/lib/sanbase/utils/math.ex index fa8465926e..1e304dd58b 100644 --- a/lib/sanbase/utils/math.ex +++ b/lib/sanbase/utils/math.ex @@ -10,7 +10,7 @@ defmodule Sanbase.Math do def round_float(i) when is_integer(i), do: round(i * 1.0) @doc ~s""" - Calculate the % change that occured between the first and the second arguments + Calculate the % change that occurred between the first and the second arguments ## Examples @@ -203,7 +203,7 @@ defmodule Sanbase.Math do mean = Enum.sum(values) / length(values) # In case the precision is not provided, round the according - # to some predfined rules (use more precision for smaller numbers) + # to some predefined rules (use more precision for smaller numbers) case Keyword.get(opts, :precision) do nil -> mean |> round_float() precision -> Float.round(mean, precision) @@ -313,7 +313,7 @@ defmodule Sanbase.Math do @doc ~s""" Compute the Z score over the list of numbers. Returns error if the numbers have standard deviation of 0 as Z score is computed only on - data with a probablistic distribution (not all numbers are equal) + data with a probabilistic distribution (not all numbers are equal) ## Examples iex> Sanbase.Math.zscore([1,2,3,4,5,6,7,8,9,10]) diff --git a/lib/sanbase_web/controllers/telegram_controller.ex b/lib/sanbase_web/controllers/telegram_controller.ex index acfb0a0ea1..8a036e965f 100644 --- a/lib/sanbase_web/controllers/telegram_controller.ex +++ b/lib/sanbase_web/controllers/telegram_controller.ex @@ -31,7 +31,7 @@ defmodule SanbaseWeb.TelegramController do ~s""" 🤖Beep boop, Santiment Alerts bot here! - You've succesfully connected your Sanbase and Telegram accounts. + You've successfully connected your Sanbase and Telegram accounts. To receive alerts in this chat, enable the Telegram channel in an alert settings. diff --git a/lib/sanbase_web/endpoint.ex b/lib/sanbase_web/endpoint.ex index 956c65cb2e..085434dfe8 100644 --- a/lib/sanbase_web/endpoint.ex +++ b/lib/sanbase_web/endpoint.ex @@ -65,7 +65,7 @@ defmodule SanbaseWeb.Endpoint do parsers: [:urlencoded, :multipart, :json, Absinthe.Plug.Parser], pass: ["*/*"], json_decoder: Jason, - # To accomodate bigger files for reports uploaded via admin panel + # To accommodate bigger files for reports uploaded via admin panel # The file store is configured to allow bigger files for the admin pod # and lower for the web pod length: parser_length diff --git a/lib/sanbase_web/graphql/absinthe_before_send.ex b/lib/sanbase_web/graphql/absinthe_before_send.ex index 152264d6ab..7fa5cd017c 100644 --- a/lib/sanbase_web/graphql/absinthe_before_send.ex +++ b/lib/sanbase_web/graphql/absinthe_before_send.ex @@ -430,7 +430,7 @@ defmodule SanbaseWeb.Graphql.AbsintheBeforeSend do {Inflex.camelize(alias, :lower), tuple} end) - # Rename aliases to the query name itself, or in case of getMetric and getSignal -- the the whole tuple. + # Rename aliases to the query name itself, or in case of getMetric and getSignal -- the whole tuple. # The tuple is used in export_api_call_data/1 to construct the query name (like getMetric|price_usd) and # the selector that has been provided (like {"slugs": ["bitcoin", "ethereum"]}) rename_mapper = fn list -> diff --git a/lib/sanbase_web/graphql/cache/cache.ex b/lib/sanbase_web/graphql/cache/cache.ex index 9e17b01157..e0de5b92d5 100644 --- a/lib/sanbase_web/graphql/cache/cache.ex +++ b/lib/sanbase_web/graphql/cache/cache.ex @@ -48,7 +48,7 @@ defmodule SanbaseWeb.Graphql.Cache do 2. If the function is anonymous or a different name should be used, a second parameter with that name must be passed. - Just like `resolve` comming from Absinthe, `cache_resolve` supports the `{:ok, value}` + Just like `resolve` coming from Absinthe, `cache_resolve` supports the `{:ok, value}` and `{:error, reason}` result tuples. The `:ok` tuples are cached while the `:error` tuples are not. diff --git a/lib/sanbase_web/graphql/resolvers/file_resolver.ex b/lib/sanbase_web/graphql/resolvers/file_resolver.ex index 59c3215ae0..d64ea3c9c3 100644 --- a/lib/sanbase_web/graphql/resolvers/file_resolver.ex +++ b/lib/sanbase_web/graphql/resolvers/file_resolver.ex @@ -5,7 +5,7 @@ defmodule SanbaseWeb.Graphql.Resolvers.FileResolver do @doc ~s""" Receives a list of `%Plug.Upload{}` representing the images and uploads them. - The files are first uploaded to an AWS S3 bucket and then then the image url, + The files are first uploaded to an AWS S3 bucket and then the image url, the content hash and used hash algorithm are stored in postgres. """ def upload_image(_root, %{images: images}, _resolution) do diff --git a/lib/sanbase_web/graphql/resolvers/project/project_transfers_resolver.ex b/lib/sanbase_web/graphql/resolvers/project/project_transfers_resolver.ex index 2fad6b6a69..70dd082b1c 100644 --- a/lib/sanbase_web/graphql/resolvers/project/project_transfers_resolver.ex +++ b/lib/sanbase_web/graphql/resolvers/project/project_transfers_resolver.ex @@ -252,7 +252,7 @@ defmodule SanbaseWeb.Graphql.Resolvers.ProjectTransfersResolver do error -> Logger.warning( - "Cannot calculate ETH spent over time for for #{Project.describe(project)}. Reason: #{inspect(error)}" + "Cannot calculate ETH spent over time for #{Project.describe(project)}. Reason: #{inspect(error)}" ) {:nocache, {:ok, []}} diff --git a/lib/sanbase_web/graphql/schema/queries/menu_queries.ex b/lib/sanbase_web/graphql/schema/queries/menu_queries.ex index 27e2d25143..aeee0721bf 100644 --- a/lib/sanbase_web/graphql/schema/queries/menu_queries.ex +++ b/lib/sanbase_web/graphql/schema/queries/menu_queries.ex @@ -34,7 +34,7 @@ defmodule SanbaseWeb.Graphql.Schema.MenuQueries do If :parent_id is provided, position is used to determine the position of the menu is the parent menu. If not provided, it will be appended to the end of the list. If a position is provided, all menu items with the same or bigger position in the same - menu will get their position increased by 1 in order to accomodate the new menu item. + menu will get their position increased by 1 in order to accommodate the new menu item. """ arg(:position, :integer, default_value: nil) diff --git a/lib/sanbase_web/graphql/schema/types/project_types.ex b/lib/sanbase_web/graphql/schema/types/project_types.ex index 35ac53497d..393c49004a 100644 --- a/lib/sanbase_web/graphql/schema/types/project_types.ex +++ b/lib/sanbase_web/graphql/schema/types/project_types.ex @@ -127,7 +127,7 @@ defmodule SanbaseWeb.Graphql.ProjectTypes do Returns a list of available signals. Every one of the signals in the list can be passed as the `metric` argument of the `getMetric` query. - For example, any of of the signals from the query: + For example, any of the signals from the query: ``` { projectBySlug(slug: "ethereum"){ availableSignals } @@ -157,7 +157,7 @@ defmodule SanbaseWeb.Graphql.ProjectTypes do Returns a list of available metrics. Every one of the metrics in the list can be passed as the `metric` argument of the `getMetric` query. - For example, any of of the metrics from the query: + For example, any of the metrics from the query: ``` { projectBySlug(slug: "ethereum"){ availableMetrics } @@ -431,7 +431,7 @@ defmodule SanbaseWeb.Graphql.ProjectTypes do without duplicating the data (like computing the total marketcap of a watchlist that has a-tether, o-tether and arb-tether in it). - Assets like bitcoin and the the Ethereum token wrapped-bitcoin are not considered + Assets like bitcoin and the Ethereum token wrapped-bitcoin are not considered the same project/asset. """ field(:multichain_project_group_key, :string) diff --git a/lib/sanbase_web/plug/basic_auth.ex b/lib/sanbase_web/plug/basic_auth.ex index bed0227aba..dfcd839193 100644 --- a/lib/sanbase_web/plug/basic_auth.ex +++ b/lib/sanbase_web/plug/basic_auth.ex @@ -1,6 +1,6 @@ defmodule SanbaseWeb.Plug.BasicAuth do @moduledoc ~s""" - Checks the path if it is really comming from telegram. The endpoint is a secret + Checks the path if it is really coming from telegram. The endpoint is a secret and is only known by telegram. """ diff --git a/lib/sanbase_web/plug/bot_login_plug.ex b/lib/sanbase_web/plug/bot_login_plug.ex index 58f5804237..ed785670a8 100644 --- a/lib/sanbase_web/plug/bot_login_plug.ex +++ b/lib/sanbase_web/plug/bot_login_plug.ex @@ -1,6 +1,6 @@ defmodule SanbaseWeb.Plug.BotLoginPlug do @moduledoc ~s""" - Checks the path if it is really comming from the sanbase bot. The endpoint is a secret + Checks the path if it is really coming from the sanbase bot. The endpoint is a secret and is only known by the bot. """ diff --git a/lib/sanbase_web/plug/telegram_match_plug.ex b/lib/sanbase_web/plug/telegram_match_plug.ex index 6b51933e26..3f43aa9a74 100644 --- a/lib/sanbase_web/plug/telegram_match_plug.ex +++ b/lib/sanbase_web/plug/telegram_match_plug.ex @@ -1,6 +1,6 @@ defmodule SanbaseWeb.Plug.TelegramMatchPlug do @moduledoc ~s""" - Checks the path if it is really comming from telegram. The endpoint is a secret + Checks the path if it is really coming from telegram. The endpoint is a secret and is only known by telegram. """