-
Notifications
You must be signed in to change notification settings - Fork 4
Use explicit api #124
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
Use explicit api #124
Conversation
Switch to [Explicit API](https://kotlinlang.org/docs/whatsnew14.html#explicit-api-mode-for-library-authors) mode
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR converts various API elements to use Kotlin’s explicit API mode by explicitly marking classes, functions, and type aliases as public or internal as appropriate. Key changes include updating test classes to internal visibility, adding public modifiers to public API components, and aligning extension functions and adapter classes with the explicit API requirements.
Reviewed Changes
Copilot reviewed 20 out of 21 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
ServiceWithSystemMessageProviderTest.kt | Changed test class to internal and added a Mockito annotation for clarity. |
ServiceWithPromptTemplatesTest.kt | Updated test class visibility to internal. |
SimpleTemplateRendererTest.kt | Updated test class visibility to internal. |
MetadataExtensionsTest.kt | Updated test class visibility to internal. |
ServiceWithFlowTest.kt | Changed test class visibility to internal and ensured proper Mockito usage. |
TestEnvironment.kt | Marked the object as internal. |
Documents.kt | Added public modifier to the API function. |
TemplateSystemMessageProvider.kt | Made the class, functions, and constructors public. |
SystemMessageProvider.kt | Made the interface and its members public. |
RenderablePromptTemplate.kt | Marked the class and its primary property as public. |
PromptTemplateSource.kt | Marked the interface method as public. |
PromptTemplate.kt | Added public modifiers to the interface and implementation functions. |
ChatRequestExtensions.kt | Updated functions with public modifiers in request builders and related extensions. |
StreamingChatLanguageModelExtensions.kt | Added public modifiers to extension functions and nested data classes. |
ChatLanguageModelExtensions.kt | Updated extension functions to be public. |
TokenStreamToStringFlowAdapter.kt | Added public modifiers to the class and its methods. |
TokenStreamToReplyFlowAdapter.kt | Added public modifiers and refined the type parameter check. |
TypeAliases.kt | Marked type aliases as public. |
Configuration.kt | Updated the object and its members to be public. |
Files not reviewed (1)
- langchain4j-kotlin/pom.xml: Language not supported
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferences |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #124 +/- ##
==========================================
- Coverage 89.73% 89.69% -0.04%
==========================================
Files 17 17
Lines 263 262 -1
Branches 33 32 -1
==========================================
- Hits 236 235 -1
Misses 12 12
Partials 15 15 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Switch to Explicit API mode