Skip to content

Commit

Permalink
Update RunExamples to accomodate xrp and github fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanIvanoff committed Aug 9, 2023
1 parent 39754fb commit f3e6700
Showing 1 changed file with 41 additions and 10 deletions.
51 changes: 41 additions & 10 deletions lib/sanbase/run_examples.ex
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ defmodule Sanbase.RunExamples do
break_if_production()

original_level = Application.get_env(:logger, :level)
max_concurrency = 2 * System.schedulers()
max_concurrency = 4
timeout_minutes = 10

IO.puts("""
Expand Down Expand Up @@ -168,7 +168,7 @@ defmodule Sanbase.RunExamples do
end

defp do_run(:trending_words) do
{:ok, [_ | _]} =
{:ok, _} =
Sanbase.SocialData.TrendingWords.get_project_trending_history(
"bitcoin",
~U[2023-01-23 00:00:00Z],
Expand Down Expand Up @@ -427,6 +427,30 @@ defmodule Sanbase.RunExamples do
nil
)

{:ok, %{"santiment" => _}} =
Sanbase.Clickhouse.Github.total_dev_activity_contributors_count(
["santiment"],
@from,
@to
)

{:ok, [_ | _]} =
Sanbase.Clickhouse.Github.github_activity_contributors_count(
["santiment"],
@from,
@to,
"1d",
"None",
nil
)

{:ok, %{"santiment" => _}} =
Sanbase.Clickhouse.Github.total_github_activity_contributors_count(
["santiment"],
@from,
@to
)

for metric <- ["dev_activity", "dev_activity_contributors_count"] do
{:ok, [_ | _]} =
Sanbase.Metric.timeseries_data(
Expand Down Expand Up @@ -454,14 +478,21 @@ defmodule Sanbase.RunExamples do
end

defp do_run(:historical_balance) do
{:ok, [_ | _]} =
Sanbase.Clickhouse.HistoricalBalance.historical_balance(
%{slug: "ethereum"},
@null_address,
@from,
@to,
"1d"
)
for {slug, address} <- [
{"ethereum", @null_address},
{"santiment", @null_address},
{"xrp", "rMQ98K56yXJbDGv49ZSmW51sLn94Xe1mu1"},
{"bitcoin", "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa"}
] do
{:ok, [_ | _]} =
Sanbase.Clickhouse.HistoricalBalance.historical_balance(
%{slug: slug},
address,
@from,
@to,
"1d"
)
end

{:ok, [_ | _]} =
Sanbase.Clickhouse.HistoricalBalance.balance_change(
Expand Down

0 comments on commit f3e6700

Please sign in to comment.