You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(proto-gen): fix buf plugin path replacement, GIT_TAG, and generated_dir (#135)
* fix(proto-gen): fix buf plugin path replacement, GIT_TAG, and generated_dir
- Replace silent str.replace() with re.sub() so the protoc-gen-connect-python
path in buf.gen.yaml is correctly updated regardless of whether it contains
a relative path, absolute path, or underscore/hyphen naming variant
- Make GIT_TAG overridable via --tag CLI argument; default bumped to service/v0.12.0
- Fix generated_dir to point at src/otdf_python_proto/ (the actual buf output
location) instead of the non-existent generated/ directory
- Remove unreachable return False after finally block in copy_opentdf_proto_files()
- Implement setup_connect_rpc.py (was empty in source control)
Fixes#133
* test(proto-gen): add unit tests and CI job for generate_connect_proto.py
- 25 unit tests covering all bugs from #133 (fixed) and #134 (open);
tests for #134 intentionally fail to document the known issue
- Add pytest to otdf-python-proto dev dependencies
- Add proto-unit-tests CI job to test-suite.yaml, running in parallel
after lint-check with working-directory: otdf-python-proto
- Fix regex from \S+ to \S* so it also matches bare plugin name (no path prefix)
* chore: fix ruff linting issues in test_generate_connect_proto.py
Remove unused imports (call, pytest) and sort import block.
* fix(proto-gen): recurse into nested subdirs when creating __init__.py files
create_init_files() was only walking one level deep, leaving nested packages
like authorization/v2/ and policy/attributes/ without __init__.py files,
causing ImportError on a clean generation run.
Fixes#134
* chore(proto-gen): update uv.lock with pytest dev dependency
* fix(proto-gen): restore default GIT_TAG to service/v0.7.2
* tidy comments
* fix(proto-gen): address Gemini review comments
- Add argparse import and replace fragile manual sys.argv parsing with
argparse in generate_connect_proto.py
- Use lambda in re.sub replacement to avoid backslash interpretation in
paths on Windows
- Relax regex to use \s+ and \S* so plugin path prefix is optional
- Replace `uv add` with `uv sync` in setup_connect_rpc.py to avoid
modifying pyproject.toml/uv.lock for all users
* chore: apply ruff formatting to generate_connect_proto.py
* refactor(proto-gen): replace subprocess rm -rf with shutil.rmtree
Removes shell-out to rm -rf for temp directory cleanup, using the
stdlib shutil.rmtree instead. Updates tests to assert the directory
no longer exists rather than inspecting subprocess calls.
* test(proto-gen): test real argparse parser in TestArgParsing
Replace the private _parse_tag helper (which tested a hand-rolled parser
that no longer exists) with _get_parser(), which replicates the
ArgumentParser setup from main() and calls parse_args() directly.
* fix(build-script): update build_connect_proto.sh for new output directory
- Replace all references to generated/ with src/otdf_python_proto/,
which is where buf generate now writes files
- Drop the mkdir -p generated/ call (no longer needed)
- Switch uv sync --dev (deprecated flag) to plain uv sync
- Replace silent uv add fallback with a hard error pointing to
setup_connect_rpc.py, so missing dependencies are caught early
* docs: fix broken link and stale setup instruction
- DEVELOPING.md: replace reference to non-existent PROTOBUF_SETUP.md
with the correct CONNECT_RPC.md
- otdf-python-proto/README.md: replace `uv add connect-python[compiler]`
troubleshooting step with `uv run python scripts/setup_connect_rpc.py`,
which is the correct setup path now that setup_connect_rpc.py exists
* fix: clarify error message and test name from PR review feedback
Improve the connect-python missing error message to accurately state the
dependency is absent (not just unsynced), and rename the test to reflect
what it actually asserts.
0 commit comments