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

python: merge python-kadmin-rs into kadmin #61

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ jobs:
environment: pypi
permissions:
id-token: write
if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags/python-kadmin-rs/version/')
if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags/kadmin/version/')
steps:
- uses: actions/download-artifact@v4
with:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ on:
options:
- kadmin-sys
- kadmin
- python-kadmin-rs
version:
description: Version to release
required: true
Expand Down
6 changes: 3 additions & 3 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ build:

python:
install:
- requirements: python-kadmin-rs/docs/requirements.txt
- requirements: python/docs/requirements.txt
- method: pip
path: .

# Build documentation in the "docs/" directory with Sphinx
# Build documentation in the "python/docs/" directory with Sphinx
sphinx:
builder: html
configuration: python-kadmin-rs/docs/conf.py
configuration: python/docs/conf.py
fail_on_warning: true
91 changes: 42 additions & 49 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[workspace]
members = ["kadmin-sys", "kadmin", "python-kadmin-rs"]
members = ["kadmin-sys", "kadmin"]
resolver = "2"

[workspace.package]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ As far as I can tell, libkadm5 APIs are **not** thread safe. As such, the types
## python-kadmin-rs

![PyPI - Version](https://img.shields.io/pypi/v/python-kadmin-rs)
![Read the Docs](https://img.shields.io/readthedocs/python-kadmin-rs)
![Read the Docs](https://img.shields.io/readthedocs/kadmin-rs)

These are Python bindings to the above Rust library, using the `kadmin::sync` interface to ensure thread safety. It provides two Python modules: `kadmin` for remote operations, and `kadmin_local` for local operations.

Expand Down
26 changes: 11 additions & 15 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,26 @@ default:
# Auto format code
lint-fix:
cargo fmt
black python-kadmin-rs
ruff check --fix python-kadmin-rs
black .
ruff check --fix .
[private]
ci-lint-rustfmt:
cargo fmt --check
[private]
ci-lint-black:
black --check python-kadmin-rs
black --check .
[private]
ci-lint-ruff:
ruff check python-kadmin-rs
ruff check .

# Lint code
lint-rust:
cd kadmin-sys && cargo clippy --features client
cd kadmin-sys && cargo clippy --no-default-features --features server
cd kadmin && cargo clippy
cd kadmin && cargo clippy --features python
cd kadmin && cargo clippy --no-default-features --features local
cd python-kadmin-rs && cargo clippy
cd python-kadmin-rs && cargo clippy --no-default-features --features local
cd kadmin && cargo clippy --no-default-features --features local,python
[private]
ci-lint-clippy: ci-build-deps
RUSTFLAGS="-Dwarnings" just lint-rust
Expand All @@ -49,9 +49,9 @@ build-rust:
cd kadmin-sys && cargo build --features client
cd kadmin-sys && cargo build --no-default-features --features server
cd kadmin && cargo build
cd kadmin && cargo build --features python
cd kadmin && cargo build --no-default-features --features local
cd python-kadmin-rs && cargo build
cd python-kadmin-rs && cargo build --no-default-features --features local
cd kadmin && cargo build --no-default-features --features local,python
[private]
ci-build-deps:
sudo apt-get update
Expand Down Expand Up @@ -82,13 +82,9 @@ test-kadmin:
cd kadmin && cargo test
cd kadmin && cargo test --no-default-features --features local

test-python-kadmin-rs:
cd python-kadmin-rs && cargo test
cd python-kadmin-rs && cargo test --no-default-features --features local

alias t := test-rust
# Test all rust crates
test-rust: test-kadmin-sys test-kadmin test-python-kadmin-rs
test-rust: test-kadmin-sys test-kadmin
[private]
ci-test-deps:
sudo apt-get install -y --no-install-recommends valgrind
Expand All @@ -113,7 +109,7 @@ ci-test-sanity: ci-test-deps-mit
just test-sanity

_test-python:
python -m unittest python-kadmin-rs/tests/test_*.py
python -m unittest python/tests/test_*.py
# Test python bindings
test-python: install-python _test-python
[private]
Expand All @@ -133,7 +129,7 @@ _install-python:
install-python: clean-python build-python _install-python

docs-python: install-python
cd python-kadmin-rs/docs && sphinx-build -M html . _build
cd python/docs && sphinx-build -M html . _build

# Cleanup rust build directory
clean-rust:
Expand Down
Loading
Loading