santiment / san-sdk

Code samples for working with Santiment's API and libraries
https://academy.santiment.net
MIT License
22 stars 13 forks source link

development activity call empty for siacoin #11

Closed josefansinger closed 4 years ago

josefansinger commented 4 years ago

siacoin is a viable slug according to allProjects(). But any development activity calls are empty.

{
  devActivity(slug: "siacoin", from: "2019-01-01T00:00:00Z", to: "2020-01-01T00:00:00Z", interval: "1d", transform: "movingAverage", movingAverageIntervalBase: 50) {
    datetime
    activity
  }
}

and

{
  getMetric(
    metric: "dev_activity") {
      availableSince(
        slug: "siacoin")
    }
}
josefansinger commented 4 years ago

Sia archived their repository in 2018. But you could report simply report 0, see your API for Tezos. They moved from GitHub to GitLab.

IvanIvanoff commented 4 years ago

Thanks for the report!

The issue here was that siacoin had no github organization associated with it, so it returned no data instead of only zeroes. I've now added this organization to the project and all the historical data is now available.

josefansinger commented 4 years ago

@IvanIvanoff Thanks for the quick fix.

But why does the API now report plenty of GitHub activity, although the code frequency is zero since mid 2018?

IvanIvanoff commented 4 years ago

In our approach we follow not a single repository but the whole github organization https://github.com/NebulousLabs. In some sense we're measuring the dev activity of the whole team and not the dev activity put into a single repo. In almost all cases the work is spread in more repositories.

In the case of siacoin there are a few repos that had activity in the past 24 hours, so that's where the activity comes from. In your example graphql query you're using a moving average with a big window which can show some dev activity where there is none (i.e. the number for today would include some activity that happened 49 days ago).

Check this query: https://tinyurl.com/qwsek7f With it we see that there are 2-3 events per month. On our projects' page here: https://app.santiment.net/assets/all the 100th project ranked by dev activity has activity around 12. This means that for the past 30 days they averaged 12 per day - that makes 360 per month. Now when you compare that to the activity of siacoin of 2-3 per month it really shows that siacoin have close to zero dev activity.

josefansinger commented 4 years ago

Makes sense. Thank you. Great support.

Hope you soon include GitLab repositories. A number of projects (Tezos, Sia, who else?) have moved by now.

josefansinger commented 4 years ago

@IvanIvanoff Maybe better remove devActivity from availableMetrics for tezos and siacoin? The metric is rather misleading since you do not cover GitLab. Right now I have no idea which other coins besides tezos and siacoin have an artificially low dev activity.

{
  projectBySlug(slug: "tezos"){
    availableQueries
    availableMetrics
  }
}