Add support for automated testing with Github Actions #69
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes multiple changes to improve automated testing, enhance documentation, and refine code functionality. The most important changes include adding a GitHub Actions workflow for automated testing, updating the
README.md
with development instructions, modifying theBaseChunker
class, and adding conditional skips for tests that require an OpenAI API key.Automated Testing:
.github/workflows/tests.yml
: Added a GitHub Actions workflow to automate testing on push events. This includes steps to check out the repository, set up Python, install dependencies, and run tests.Documentation:
README.md
: Added a new "Development" section with instructions on how to clone the repository, set up a virtual environment, install dependencies, and run tests.Code Enhancements:
src/chonkie/chunker/base.py
: Modified theBaseChunker
class to rename thetokenizer
parameter totokenizer_or_token_counter
for clarity and updated the initialization logic accordingly.Testing Improvements:
tests/chunker/test_semantic_chunker.py
,tests/embeddings/test_openai_embeddings.py
: Addedpytest.mark.skipif
decorators to conditionally skip tests that require theOPENAI_API_KEY
environment variable if it is not defined. [1] [2] [3] [4] [5]Configuration:
pyproject.toml
: Addedpythonpath
configuration forpytest
and updatedruff
settings to includeDOC
in theselect
list.