Skip to content

CLI interface and Python package to parse and validate CODEOWNERS files used by GitHub and GitLab (not tested with BitBucket yet)

License

Notifications You must be signed in to change notification settings

andreoliwa/python-cdown

Repository files navigation

Overview

docs Documentation Status
tests

Coverage Status
package

(this project is a work in progress, still in alpha state)

CLI interface and Python package to parse and validate CODEOWNERS files used by GitHub and GitLab (not tested with BitBucket yet).

Each CLI command tries to follow Unix's philosophy of "Do one thing and do it well".

The commands mimic the interface of well-known tools like grep, ls, git ls-files. The very name of the project is a reference to chown.

  • Free software: MIT license

Installation

pip install cdown

You can also install the in-development version with:

pip install https://github.com/andreoliwa/python-cdown/archive/master.zip

Documentation

https://python-cdown.readthedocs.io/

Motivation

Why build yet another project instead of contributing to an existing one? There are other code owners tools, but none of them had all the features I'd like to use.

Below are alternatives to cdown with some of their features.

To the creators of these tools: thanks for the inspiration!

Repository Language Features
beaugunderson/codeowners JavaScript
  • Print files and its owners
  • List unowned files
  • Verify users/teams own a specific path
mszostok/codeowners-validator Go
  • Validator
  • GitHub action
  • Runs on Docker
toptal/codeowners-checker Ruby
  • List all the changes grouped by an owner
  • Filter changes by owner
hmarr/codeowners Go
  • Homebrew
  • Filter results by owner
  • Limit the files the tool looks at
hairyhenderson/go-codeowners Go
  • Go package without a CLI interface
timoschinkel/codeowners PHP
  • PHP package without a CLI interface

Development

To run all the tests run:

tox

Note, to combine the coverage data from all the tox environments run:

Windows
set PYTEST_ADDOPTS=--cov-append
tox
Other
PYTEST_ADDOPTS=--cov-append tox