Skip to content

rapidsai/roc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

roc

rapids-ops-cli

roc (rapids-ops-cli) is a command-line tool for the RAPIDS Ops team to add a bit of automation and convenience to routine manual tasks related to the RAPIDSAI GitHub org.

The subcommands that are currently implemented are:

  • prcommitmsg: Formats a commit message according to the style set in the ops-bot AutoMerger

    Example usage:

    $ roc prcommitmsg cudf 10008
    This PR replaces custom CUDA bindings that are provided by RMM, with official CUDA Python bindings. This PR should be merged after the RMM PR  https://github.com/rapidsai/rmm/pull/930
    
    Authors:
       - Ashwin Srinath (https://github.com/shwina)
    
    Approvers:
       - Jordan Jacobelli (https://github.com/Ethyling)
       - Vyas Ramasubramani (https://github.com/vyasr)
    

Authentication with GitHub

This tool authentications with an Oauth flow similar to gh and r3. When using the tool for the first time, it will launch your browser and make you follow an interactive authentication procedure:

Code structure

The code is structured like a typical modern Go project:

├── cmd
│   └── roc
│       ├── formatPRCommitMessage.go
│       └── main.go
├── internal
│   ├── build
│   │   └── build.go
│   └── ghcli
│       └── ghcli.go
└── pkg
    └── github
        ├── commitmessage.go
        ├── commitmessage_test.go
        └── github.go

The project uses Cobra and Viper, popular Go cli libraries, and the initial code and code structure was cribbed from r3 and rvc.

Commands

cmd contains the command-line tool roc. If it makes sense to house different cli tools within this code base, they can be added as new directories under cmd.

Internal helper libraries

internal contains some internal utilities that shouldn't be consumed by outside users, e.g. build-time variables for exposing the version and build time.

External helper libraries

pkg contains parts of rapids-ops-cli that may be useful for consumption by outside users. For example, the github package consists of some utilities for creating an authenticated go-github Client and the PR commit message formatting code, which was originally copied from ops-bot and may be useful in other places.

TODOs

This project is fresh and needs the following:

  • Proper versioning using git tags or some other mechanism (after the first commit merge)
  • CI/CD and releases uploaded somewhere (S3? GitHub releases?) to be easily downloaded by RAPIDS Ops
  • Compilation for OSX and/or Windows (depending on how confident we are that RAPIDS Ops uses primarily Linux, this may be less important)
  • Look into goreleaser for a streamlined release process

About

GitHub utilities for the RAPIDS Ops team

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published