A Python library to parse codeowner files
Project description
codeowners
Python bindings to softprops's Rust codeowners library.
Why?
To allow Python users to parse codeowners files without having to rewrite an existing implementation.
Install
poetry add codeowners
Usage
from codeowners import CodeOwners
example_file = """\
# owners for js files
*.js @ghost
# python
*.py user@example.com
# misc
/build/logs/ @dmin
docs/* docs@example.com
"""
owners = CodeOwners(example_file)
assert owners.of("test.js") == [('USERNAME', '@ghost')]
Dev
poetry install
cargo test --no-default-features
# trying a build in Python
./.venv/bin/pyo3-pack develop
./.venv/bin/python -c "import codeowners; print(codeowners.CodeOwners)"
Releasing a New Version
# bump version in Cargo.toml
# build the macos version
./.venv/bin/pyo3-pack build --release
# build the linux versions
# Note: this is just the version for the builder container
TAG="sbdchd/codeowners-builder:0.1.2"
docker build -f build.Dockerfile . --tag "$TAG"
# Note: building the Python versions can take a while if you are running Docker inside a VM
docker run --rm -v $(pwd):/io "$TAG" build --release
# upload wheels to PyPi
# Note: this will prompt for PyPi creds
./.venv/bin/twine upload --skip-existing target/wheels/*
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distributions
Close
Hashes for codeowners-0.1.4-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad2e0a7395d6a4852e0f860ab01743ff282f14b1cf7b6ab5496044c6aae55604 |
|
MD5 | 8d9a58101b3452a7b713d861812a51eb |
|
BLAKE2b-256 | 8dff3fdb40d3a80006e3d407895f0b1a0df25f89ff5fd2c1af0f25ad412df446 |
Close
Hashes for codeowners-0.1.4-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 026ac869db112c474dd9fe3e293b24bf95e27e05e36a50afc5ddd0af04b8e60c |
|
MD5 | 7381901acc2ce1402d0a39d14e3f6abc |
|
BLAKE2b-256 | 147c22f07c01a9cdb2760fe201f168131c6047f8a4e0afa79576d9e9b39ce33b |
Close
Hashes for codeowners-0.1.4-cp37-cp37m-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b737f6e006cbe6c3ef95d4b5d2849a89aa441ef9fa804a3f315bd2fd1d525223 |
|
MD5 | 6ae00930ebdb29c2c897a27c88b29f15 |
|
BLAKE2b-256 | e6857e9e70917e7e3709fbcbef0d982b02d1f7b25f255a8723ffc129f7544df6 |
Close
Hashes for codeowners-0.1.4-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74075cced7424fead07a937d4208d10659137f2fc6436b52c8617c30aec85a5b |
|
MD5 | cae045c0335b48ce9c60dde421a04a80 |
|
BLAKE2b-256 | cdfa3b99336025939dd45e66ccbce84c12abf986c049baff89c634d10d4cd3a0 |
Close
Hashes for codeowners-0.1.4-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8788e291ffc1409ba7b6ca8dae26a30e526f3a171fdd0e2e94a9afb170a1697d |
|
MD5 | dd2b78eb7fde3ec02da7a21b0a4331e9 |
|
BLAKE2b-256 | 93c2d68bd5d685d8d2ba6877b4bdf71e985c22313ca9b8aa715dc25972c2744e |