Skip to content

Conversation

@kevinmessiaen
Copy link
Member

@kevinmessiaen kevinmessiaen commented Jan 16, 2024

Description

Updated Suite.upload() method to upload modifications to existing suite

Example usages:

Add test to a Suite:

import giskard
client = giskard.GiskardClient(
    url="http://localhost:9000",  # URL of your Giskard instance
    key="gsk-...")

suite = giskard.Suite.download(client, 'test', 52)

from giskard.testing.tests.data_quality import test_data_uniqueness

suite.add_test(test_data_uniqueness())
suite.upload(client, 'test')

Edit a test from a Suite:

import giskard
client = giskard.GiskardClient(
    url="http://localhost:9000",  # URL of your Giskard instance
    key="gsk-...")

suite = giskard.Suite.download(client, 'test', 52)

suite.update_test_params(len(suite.tests) - 1, threshold=0.2) # Not ideal by index but will be changed in another PR
suite.upload(client, 'test')

Remove test from a Suite:

import giskard
client = giskard.GiskardClient(
    url="http://localhost:9000",  # URL of your Giskard instance
    key="gsk-...")

suite = giskard.Suite.download(client, 'test', 52)

from giskard.testing.tests.data_quality import test_data_uniqueness

suite.remove_test(test_data_uniqueness())
suite.upload(client, 'test')

Related Issue

Type of Change

  • 📚 Examples / docs / tutorials / dependencies update
  • 🔧 Bug fix (non-breaking change which fixes an issue)
  • 🥂 Improvement (non-breaking change which improves an existing feature)
  • 🚀 New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to change)
  • 🔐 Security fix

Checklist

  • I've read the CODE_OF_CONDUCT.md document.
  • I've read the CONTRIBUTING.md guide.
  • I've updated the code style using make codestyle.
  • I've written tests for all new methods and classes that I created.
  • I've written the docstring in Google format for all the methods and classes that I used.
@kevinmessiaen kevinmessiaen marked this pull request as ready for review January 16, 2024 08:14
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions

68.0% Coverage on New Code (required ≥ 70%)

See analysis details on SonarCloud

@andreybavt andreybavt merged commit 854f443 into main Jan 17, 2024
@andreybavt andreybavt deleted the GSK-2545 branch January 17, 2024 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants