Skip to content

Conversation

@b-long
Copy link
Owner

@b-long b-long commented Sep 24, 2025

Cleanup, to align well with the Roadmap published in #111 .


The following placeholder interfaces and classes were removed:

Service Client Interfaces (Removed)

  • AttributesServiceClientInterface
  • NamespaceServiceClientInterface
  • SubjectMappingServiceClientInterface
  • ResourceMappingServiceClientInterface
  • AuthorizationServiceClientInterface
  • KeyAccessServerRegistryServiceClientInterface

Infrastructure Placeholders (Removed)

  • ProtocolClient class
  • Interceptor class
  • TrustManager class

SDK Constructor Parameters (Removed)

  • trust_manager parameter
  • auth_interceptor parameter
  • platform_services_client parameter

Services Interface Methods (Removed)

  • attributes() method
  • namespaces() method
  • subject_mappings() method
  • resource_mappings() method
  • authorization() method
  • kas_registry() method

SDK Getter Methods (Removed)

  • get_trust_manager()
  • get_auth_interceptor()
  • get_platform_services_client()

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @b-long, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on a significant cleanup of the otdf_python SDK by removing placeholder code that was never fully implemented or is no longer needed. This streamlines the API, reduces unnecessary complexity, and ensures that the codebase only contains active and relevant components, improving maintainability and clarity.

Highlights

  • Code Cleanup: Removed numerous placeholder class definitions for service client interfaces, ProtocolClient, Interceptor, and TrustManager that were previously stubs for future implementation.
  • API Simplification: Eliminated methods from the Services class (e.g., attributes(), namespaces()) that returned instances of the unimplemented service clients, streamlining the API.
  • SDK Constructor Refinement: Removed trust_manager, auth_interceptor, and platform_services_client parameters from the SDK class constructor and their corresponding getter methods, reducing unnecessary complexity.
  • Test Updates: Modified test_sdk.py to remove assertions related to the trust_manager and auth_interceptor attributes, reflecting the changes in the SDK class.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request aims to clean up the codebase by removing several placeholder classes, methods, and parameters. While this is a good cleanup effort, the changes are incomplete and introduce several issues. Most critically, the SDKBuilder.build method in src/otdf_python/sdk_builder.py now makes an invalid call to the SDK constructor, which will cause a TypeError and break the build. This file must be updated as part of this PR. Additionally, there are issues with an outdated docstring in sdk.py and a failing test in test_sdk.py due to incomplete removal of related code. Please see the detailed comments for suggestions on how to fix these.

@b-long b-long mentioned this pull request Sep 27, 2025
@b-long
Copy link
Owner Author

b-long commented Sep 27, 2025

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request performs a cleanup by removing several placeholder interfaces, classes, and methods, which aligns the SDK with the published roadmap. The changes are well-contained and correctly remove the unused code from the SDK, builder, and tests. I've found one minor issue where the docstring for SDK.__init__ was not fully updated after removing some parameters, which could lead to confusion.

@b-long
Copy link
Owner Author

b-long commented Oct 3, 2025

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request effectively removes a significant amount of placeholder code, including interfaces, classes, and methods, which cleans up the SDK and aligns it with the project's roadmap. The changes are consistent across the codebase, and the tests have been updated accordingly to reflect the removals.

While the cleanup is beneficial, there are some remaining pieces of related code that were not removed. For instance, in src/otdf_python/sdk_builder.py, the _create_auth_interceptor() method is still called within _create_services(), but its result is unused. Similarly, the auth_headers parameter in KAS.__init__ within src/otdf_python/sdk.py is also unused. Removing this leftover code in a subsequent pull request would complete the refactoring and further improve code maintainability.

* fix: use AuthHeaders, cleanup others

* chore: run 'pre-commit autoupdate'

* fix: place import at top (PEP 8 style)
@b-long
Copy link
Owner Author

b-long commented Oct 4, 2025

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request provides a significant cleanup by removing numerous placeholder interfaces, classes, and methods, which greatly improves the clarity and focus of the SDK. The changes are well-aligned with the project's roadmap. I appreciate the thoroughness of removing related code from tests and mocks, ensuring consistency. The refactoring to introduce the AuthHeaders class with its to_dict method is a nice improvement for handling authentication headers in a more structured way, and it's good to see it's backed by new unit tests.

@b-long b-long merged commit 46f0685 into main Oct 4, 2025
9 checks passed
@b-long b-long deleted the chore/remove-placeholders branch October 4, 2025 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants