yapper

package module
v0.0.0-...-5b25ecd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 12, 2025 License: MIT Imports: 9 Imported by: 0

README

Yapper

Yapper is a tool for generating pairings for one-on-one meetings within a team.

Features

  • Generate each week or any number of weeks at a time.
  • Individuals can opt-in to a 1 week or 2 week cadence for meetings.
  • Deny lists for people you already meet with.
    • Can be individuals and/or squads.

Usage

The tool depends on Golang.

Generating pairings for the example config can be done with:

go run ./cmd/yapper -config testdata/validConfig.json

A JSON file is used to track the history of the last meeting time between people. By default the tool reads and writes to this data to history.json. An alternative path can be used:

go run ./cmd/yapper -config testdata/validConfig.json -history path-to-history.json

Instead of generating new pairings every week it is also possible to generate multiple weeks of pairings at a time.

go run ./cmd/yapper -config testdata/validConfig.json -weeks 5

Configuration file

The configuration file defines the people and their meeting preferences. See the test configuration for a comprehensive example.

A person at minimum requires an ID:

{
	"id": "Yoshi"
}

They can define people not to pair with if they already meet with them:

{
	"id": "Waluigi",
	"denyList": ["Luigi"]
}

The deny list can be supplemented or replaced with a squad. Any people with a matching squad will not be paired.

{
	"id": "Mario",
	"denyList": ["Wario", "Bowser"],
	"squad": "bros"
},
{
	"id": "Bowser",
	"squad": "koopas"
},

A cadence of one or two weeks is supported, with one week being the default. A two week cadence means that person will only be paired every second week.

{
	"id": "Monty Mole",
    "cadence": "two-weeks"
}

Development

Golangci-lint is used for formatting/linting and must be installed separately.

# Run tests
go test ./...

# Check for linter/formatter issues
golangci-lint run

# Fix any issues which are auto-fixable
golangci-lint run --fix

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cadence

type Cadence string
const (
	CadenceOneWeek  Cadence = "one-week"
	CadenceTwoWeeks Cadence = "two-weeks"
)

type Config

type Config struct {
	People []Person `json:"people"`
}

func NewConfigFromFile

func NewConfigFromFile(path string) (Config, error)

func (Config) GetPerson

func (c Config) GetPerson(id ID) (Person, error)

type ID

type ID string

type Pairings

type Pairings struct {
	// contains filtered or unexported fields
}

func GeneratePairings

func GeneratePairings(config Config, hist *history.History, weeks int) ([]Pairings, error)

func NewPairingsFromFile

func NewPairingsFromFile(path string) (Pairings, error)

NewPairingsFromFile constructs and returns Pairings.

func (*Pairings) Add

func (p *Pairings) Add(id1, id2 ID)

func (*Pairings) All

func (p *Pairings) All() iter.Seq2[ID, ID]

func (*Pairings) Export

func (p *Pairings) Export(writer io.Writer) error

Export writes the pairings to the given writer, typically a file.

type Person

type Person struct {
	ID       ID      `json:"id"`
	DenyList []ID    `json:"denyList"`
	Cadence  Cadence `json:"cadence"`
	Squad    string  `json:"squad"`
}

Directories

Path Synopsis
cmd
yapper command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL