Conversation
Commands `mcp:tool:execute`, `mcp:tool:schema`, `mcp:citations`, and `mcp:reset` were commented out of release v0.4.2 of Hatchling for instability. This makes sure that the regression test deoesn't look for them.
The integration tests for OpenAI all require the API key at test setup when creating the LLM provider instance. Hence we must add the appropriate tag for skipping them when no api keys are available (i.e. often during automation).
The methods `hatchling_to_llm_tool_call` and `hatchling_to_provider_tool_result` were added in the previous update, so the tests checking the integrity of the implementation of this interface were failing. We add the expected implementations.
We were before implementing a custom system to manage versions automatically. We moved to `semantic-release`, so we must adapt the regression tests associated to the versioning system.
Testing the way an OpenAI provider handles events required an api key. Minor: deleted useless import statements
Tests/fixing for v0.4.2
`tomli` is the library actually referenced in the dependencies of `Hatchling` instead of `toml`. Hence, trying to run the tests after simply installing `Hatchling` from the `pyproject.toml`'s definition would fail when trying to use `toml` for other setting file load. test: some forgotten `toml` usage
We cannot expect the running ci to have access to LLM API keys for all the tests. There are some protections by default in how the tests are written but, to be sure, we explicitly indicate that we skip these.
Tests/fixing for v0.4.2
Expected IO mode is binary.
test: fixing expected IO mode for `tomli.load`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 introduces several updates focused on improving test coverage, refining semantic-release configuration validation, and ensuring proper handling of provider settings and API keys. The changes enhance regression and integration tests, update dependency versions, and add/adjust mock implementations for provider methods.
Semantic-release configuration and regression testing:
tests/regression_test_versioning.pyto focus on validating semantic-release configuration, required plugins, branch setup, and semantic versioning format inpyproject.tomlandpackage.json. Previous unit tests forVersionManagerwere removed in favor of regression tests that verify project-level release configuration.Provider and API key handling in tests:
.envfiles usingdotenv, and skip tests if the required environment variable is not set. This ensures reliability of tests that require external API access.@requires_api_keydecorator to relevant integration tests intests/integration_test_openai.pyto enforce API key presence. [1] [2] [3]Mock implementations and test coverage:
hatchling_to_llm_tool_callandhatchling_to_provider_tool_resultto provider test classes in both feature and registry tests, improving test coverage for provider tool call/result conversion logic. [1] [2] [3]Dependency and workflow updates:
hatchdependency inpyproject.tomlto use a stable release version (v0.5.1) instead of a feature branch.Minor test and import cleanups: