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

Refactoring, add Kotlin Notebook #20

Merged
merged 10 commits into from
Nov 13, 2024
Merged

Refactoring, add Kotlin Notebook #20

merged 10 commits into from
Nov 13, 2024

Conversation

kpavlov
Copy link
Owner

@kpavlov kpavlov commented Nov 13, 2024

This pull request includes several changes to improve code consistency, add new features, and clean up the repository. The most important changes include the renaming of modules, updates to documentation, addition of linting tools, and removal of outdated test files.

Module Renaming:

  • Renamed langchain4j-core-kotlin module to langchain4j-kotlin and updated references in pom.xml and source files accordingly. [1] [2] [3] [4]

Documentation Updates:

  • Updated README.md to reflect the new artifact ID for Maven and Gradle dependencies. Also, added instructions for running linting before submitting changes. [1] [2] [3]

Linting Tools:

  • Added .editorconfig settings for XML files and Kotlin specific settings.
  • Introduced linting commands in Makefile and added external dependencies for linting in .idea/externalDependencies.xml. [1] [2]

Test Files Cleanup:

  • Removed outdated integration test files and environment configuration files. [1] [2] [3]

New Features:

  • Added a new Jupyter notebook for langchain4j-kotlin to demonstrate usage examples.

Konstantin Pavlov added 5 commits November 13, 2024 09:15
Included a new setting in .editorconfig to ignore ktlint function naming rules for functions annotated with @test. This will help in keeping test functions with descriptive names without triggering lint warnings.
Reorganized imports by changing package paths from `dev.langchain4j` to `me.kpavlov.langchain4j.kotlin`. Applied consistent formatting to improve code readability. No functional changes were made.
Refactor project structure by renaming all occurrences of langchain4j-core-kotlin to langchain4j-kotlin. This includes updates to file paths, Maven POM files, and module references to ensure consistency and clarity in the project hierarchy.
Integrated Finchly and JUnit dependencies to improve testing capabilities. Refactored TestEnvironment to utilize Finchly's BaseTestEnvironment for better environment variable handling. Updated tests to leverage the new TestEnvironment setup.
Include configuration for external dependencies in IntelliJ IDEA project. Update .editorconfig to standardize XML file indentation across the project.
@kpavlov kpavlov added documentation Improvements or additions to documentation enhancement New feature or request dependencies Update dependencies labels Nov 13, 2024
Updated the artifactId in the dependency examples within README.md from 'langchain4j-core-kotlin' to 'langchain4j-kotlin'. This ensures consistency with the actual naming conventions used in the project.
Copy link

codacy-production bot commented Nov 13, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
-6.11% (target: -1.00%) 3.85%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (0eb66ac) 23 5 21.74%
Head commit (4e5a050) 32 (+9) 5 (+0) 15.63% (-6.11%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#20) 26 1 3.85%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

Removed explicit slf4j version in dependency. Updated Makefile and README with lint commands. Enhanced pom.xml with project metadata and linting profile.
@kpavlov kpavlov marked this pull request as ready for review November 13, 2024 08:04
Konstantin Pavlov added 3 commits November 13, 2024 10:37
dotenv-kotlin dependency was removed to clean up unused dependencies. This change helps in reducing the build complexity and potential maintenance issues arising from redundant library versions.
This commit introduces a Jupyter notebook set up for LangChain4j in Kotlin, including dependencies and a simple demonstration of generating a joke using OpenAiChatModel. The notebook aims to provide a starting point for users to experiment with LangChain4j's capabilities in a Kotlin environment.
Revised the joke text to include Langchain4j and modified its punchline for better context. Adjusted the timestamps and execution counts of certain cells to reflect the latest execution time and sequence.
@kpavlov kpavlov changed the title Refactoring Refactoring, add Kotlin Notebook Nov 13, 2024
@kpavlov kpavlov merged commit cf1cdab into main Nov 13, 2024
4 of 5 checks passed
@kpavlov kpavlov deleted the refactoring branch November 13, 2024 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Update dependencies documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant