Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recurring report series #5

Open
1 of 8 tasks
moul opened this issue Jan 26, 2023 · 2 comments
Open
1 of 8 tasks

Recurring report series #5

moul opened this issue Jan 26, 2023 · 2 comments
Assignees

Comments

@moul
Copy link
Member

moul commented Jan 26, 2023

Continues gnolang/gno#466

Context

The Gno technical core team (@gnolang/core-tech) will share what's going on with the community.

During this report, we'll try giving visibility on:

  • changelog: what was done by the team and the community,
  • backlog: what are the current topics and some next steps,
  • news: events, articles, partnerships, announcements, blog posts,
  • curation: what we heard about from the community (new tutorials, projects, etc),
  • feedback: the core team members will give their opinion on some specific points.

We will release the report by text. We are considering having a companion live update (audio, video).

To do

In order to make the process more efficient, we'll need various scripts to help us prebuild the report:

  • changelog: recent contributions,
  • backlog: new and updated PR/issues,
  • curation: updates in awesome-gno,
  • tips: tweets with the #gnotips hashtag? + "what are the tips you want to share" official thread
  • ...

Script(s) must be published in the https://github.com/gnolang/blog repo. If possible, in Go.


Tasks

  • initial version @gnolang/core-tech reports #7
  • improve output rendering: text should be shorter and more useful (i.e., no full URLs, but short links)
  • improve usage, i.e., "-since" is hard to use
  • aggregate some stats from Discord
  • aggregate open issues with new comments
  • add logging
  • fewer lines, but more labels: instead of having independent lists where a single PR can be seen multiple time; make a better list of topics and use multiple labels on the same PR new, hot, etc
  • identify PRs updating the examples folders, the ones updating docs, the ones updating the core engine
@yassinouider
Copy link

As part of community reporting, we may need engagement statistics on discord. But via the api, we can't get the history of this data at the moment.
So to have enough history it may be useful to start collecting these stats regularly to track the evolution of community engagement on Discord because you won't be able to get them afterwards.

1 - Define the information to collect that can be used for statistics:

  • How many new members join?
  • Total number of members over time
  • Most popular invites/referrals
  • Number of departures from the server over time
  • How many members have communicated ?
  • What are the most used text or voice channels ?
  • How many new members keep their activity on the discord the following week ?
  • etc.

2 - Where to store information (db, file, etc)

3 - Create a bot script dedicated to reporting and add it to the discord.

4 - Create a script that is run at regular intervals to retrieve the info or one that is always listening for events on the discord.

An example of a script to answer "Total number of members over time" by retrieving the number of members at a moment T. Must be completed with the rest of the information requirements.

package main

import (
	"encoding/csv"
	"log"
	"os"
	"strconv"
	"time"

	"github.com/bwmarrin/discordgo"
)

func main() {
	guildID := "" //gno server id
	token := "" // bot token
	discord, err := discordgo.New("Bot " + token)
	if err != nil {
		log.Fatal(err)
	}

	g, err := discord.Guild(guildID)
	if err != nil {
		log.Fatal(err)
	}

	ds := NewFileStore("discord.csv") // Replace with your implementation of ReportingDatastore
	if err := ds.SaveMemberCount(g.MemberCount, time.Now().UTC()); err != nil {
		log.Println(err)
	}
}

type ReportingDatastore interface {
	SaveMemberCount(total int, date time.Time) error
}

type FileStore struct {
	filename string
}

func NewFileStore(filename string) *FileStore {
	return &FileStore{filename: filename}
}

func (f *FileStore) SaveMemberCount(total int, date time.Time) error {
	file, err := os.OpenFile(f.filename, os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0644)
	if err != nil {
		return err
	}
	defer file.Close()

	writer := csv.NewWriter(file)
	defer writer.Flush()

	if err := writer.Write([]string{strconv.Itoa(total), date.Format(time.RFC3339)}); err != nil {
		return err
	}

	return nil
}

Generally speaking, I think it is easier to list the sources where the information is interesting for our reporting and to define the data to follow, in order to start the collection.

We have to make sure that the source (github, twitter, discord, etc) gives us a history. If not, treat the sources without history as a priority.

@moul
Copy link
Member Author

moul commented Mar 17, 2023

This issue moul/depviz#649 may unlock new possibilites.

@moul moul mentioned this issue Mar 17, 2023
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants