Skip to content

Adapted skills:check and skills:install and added reusable tests - #966

Open
jana-selva wants to merge 8 commits into
mainfrom
feature/963-multi-skill-support
Open

jana-selva wants to merge 8 commits into
mainfrom
feature/963-multi-skill-support

Conversation

@jana-selva

Copy link
Copy Markdown
Contributor

Fixes #963

Checklist

Note: If any of the items in the checklist are not relevant to your PR, just check the box.

For any Pull Request

Is the following correct:

  • the title of the Pull Request?
  • the title of the corresponding issue?
  • there are no other open Pull Requests for the same update/change?
  • that the issue which this Pull Request fixes ("Fixes...") is mentioned?

When Changes Were Made

Did you:

  • update the changelog?
  • update the cookiecutter-template?
  • update the implementation?
  • check coverage and add tests: unit tests and, if relevant, integration tests?
  • update the User Guide & other documentation?
  • resolve any failing CI criteria (incl. Sonar quality gate)?

When Preparing a Release

Have you:

  • thought about version number (major, minor, patch)?
  • checked Exasol packages for updates and resolved open vulnerabilities, if easily possible?

@jana-selva jana-selva changed the title Implement packaged skill support Adapted skills:check and skills:install and add reusable tests Sep 29, 2026
@jana-selva jana-selva changed the title Adapted skills:check and skills:install and add reusable tests Adapted skills:check and skills:install and added reusable tests Sep 29, 2026
@jana-selva
jana-selva deployed to manual-approval September 29, 2026 08:05 — with GitHub Actions Active
@jana-selva
jana-selva deployed to manual-approval September 29, 2026 08:05 — with GitHub Actions Active
@jana-selva
jana-selva deployed to manual-approval September 29, 2026 08:15 — with GitHub Actions Active
@jana-selva
jana-selva deployed to manual-approval September 29, 2026 08:15 — with GitHub Actions Active
Comment thread doc/changes/unreleased.md Outdated
Comment thread doc/changes/unreleased.md Outdated
Comment thread doc/user_guide/features/agent_skills/index.rst
Comment thread doc/user_guide/features/agent_skills/index.rst
Comment thread doc/user_guide/features/agent_skills/index.rst
Comment thread exasol/toolbox/nox/tasks.py
Comment thread test/unit/nox/_skills_test.py Outdated
Comment thread test/unit/util/skill_test.py
Comment thread test/unit/util/skill_test.py
Comment thread test/unit/skills_test.py Outdated
@sonarqubecloud

Copy link
Copy Markdown

❌ The last analysis has failed.

See analysis details on SonarQube Cloud

Comment thread doc/developer_guide/agent_skills.rst
Comment thread test/unit/nox/_documentation_test.py Outdated
Comment thread test/unit/nox/_documentation_test.py Outdated
build.assert_called_once_with(nox_session, config)


def test_build_docs_command(config):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

These kinds of tests are require lots of maintenance, if the code is changed.

Comment thread test/unit/nox/_documentation_test.py Outdated
Comment thread test/unit/nox/_documentation_test.py Outdated
Comment thread test/unit/nox/_documentation_test.py Outdated
@ArBridgeman
ArBridgeman force-pushed the feature/963-multi-skill-support branch from 9ec363f to b81a6eb Compare October 5, 2026 11:10
@sonarqubecloud

sonarqubecloud Bot commented Oct 5, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
75.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@ArBridgeman

Copy link
Copy Markdown
Collaborator

Quality Gate Failed Quality Gate failed

Failed conditions 75.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

Ah, please add a test for project:check

Comment thread test/unit/skills_test.py
lambda data: data["cases"][0]["expected"].update(must_not_include=[""]),
"case 0 must_not_include must contain non-empty strings",
)
@pytest.fixture

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This will actually load each time the fixture is called. If we wanted to do it once, we should set the scope.

Suggested change
@pytest.fixture
@pytest.fixture(scope="module")

Comment thread test/unit/skills_test.py
"case 0 must_not_include must contain non-empty strings",
)
@pytest.fixture
def eval_cases(self, skill_name):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks! In general, this looks much cleaner.

I'll let you decide, but realized today that I think long-term it'd be better if we introduced a Pydantic model that we validate against. This way, we can share the model in the documentation (via the API) and link it where appropriate. Then, we can just validate against it in the tests. Below is just a mock up for it - I didn't evaluate it extensively or iterate on the names much

NonBlankString = Annotated[str, Field(pattern=r"\S")]


class ExpectedResponse(BaseModel):
    model_config = ConfigDict(extra="forbid")

    must_include: list[NonBlankString] = Field(min_length=1)
    must_not_include: list[NonBlankString] = Field(min_length=1)


class EvalCase(BaseModel):
    model_config = ConfigDict(extra="forbid")

    id: NonBlankString
    category: NonBlankString
    prompt: NonBlankString
    expected: ExpectedResponse


class PackagedSkillEvalCases(BaseModel):
    model_config = ConfigDict(extra="forbid")

    version: Literal[1]
    skill: NonBlankString
    cases: list[EvalCase] = Field(min_length=1)

This branch is waiting to be deployed

1 waiting deployment
manual-approval — b81a6eb3 Waiting Oct 5, 2026 by ArBridgeman via Merge Gate / Extension / Approve Running Slow Tests? #2847
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.

Adapt skills:check and skills:install and add reusable tests

2 participants