Skip to content

Commit 8133869

Browse files
authored
Merge pull request #1836 from Giskard-AI/feature/gsk-2937-update-docs-after-moving-non-ml-worker-code-outside
[GSK-2937] Update docs after moving non-ML worker code outside
2 parents 8faeef8 + 00132a9 commit 8133869

File tree

1 file changed

+7
-8
lines changed
  • docs/community/contribution_guidelines

1 file changed

+7
-8
lines changed

‎docs/community/contribution_guidelines/index.rst‎

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,15 @@ Push your tests in the Giskard repo
2020

2121
* Clone the Giskard repository
2222
* Create a GitHub branch with the base as main, starting with `test-contribution/name-of-your-branch`
23-
* From the root of the cloned repo run `./gradlew generateProto`. This will generate the module`generated` that you will need to create your tests.
24-
* Write your test inside one of the classes (`MetamorphicTests`, `HeuristicTests`, `PerformanceTests` or `DriftTests`) inside this `repo <https://github.com/Giskard-AI/giskard/tree/main/giskard-ml-worker/ml\_worker/testing>`__. If your test does not fit these classes, you can also create a custom class in a new file.
25-
* We recommend writing unit tests for your test functions: this is the way you can execute and debug your test! Unit tests should be placed in `this directory <https://github.com/Giskard-AI/giskard/tree/main/giskard-ml-worker/test>`__.
23+
* Write your test inside one of the classes (`MetamorphicTests`, `HeuristicTests`, `PerformanceTests` or `DriftTests`) inside this `repo <https://github.com/Giskard-AI/giskard/tree/main/giskard/testing>`__. If your test does not fit these classes, you can also create a custom class in a new file.
24+
* We recommend writing unit tests for your test functions: this is the way you can execute and debug your test! Unit tests should be placed in `this directory <https://github.com/Giskard-AI/giskard/tree/main/tests>`__.
2625

2726
.. hint::
2827
**Fixtures**
2928

3029
A unit test is executed with a *test model* and *test data* provided as fixtures.
3130

32-
For example, in `test_precision <https://github.com/Giskard-AI/giskard/blob/main/giskard-ml-worker/test/test\_performance.py#L73>`_ function, we use *german_credit_data* and *german_credit_model* as fixtures. If necessary, you can create your own fixtures; check `this directory <https://github.com/Giskard-AI/giskard/tree/main/giskard-ml-worker/test/fixtures>`__ to know how.
31+
For example, in `test_precision <https://github.com/Giskard-AI/giskard/blob/main/giskard/testing/tests/performance.py>`_ function, we use *german_credit_data* and *german_credit_model* as fixtures. If necessary, you can create your own fixtures; check `this directory <https://github.com/Giskard-AI/giskard/tree/main/tests/fixtures>`__ to know how.
3332

3433
* Create a Pull Request
3534

@@ -38,9 +37,9 @@ Push your tests in the Giskard repo
3837

3938
Let us guide you with an **example where you want to create a heuristic test function**:
4039

41-
* Since you are writing a heuristic test, you will select heuristic\_tests.py from the list of files under https://github.com/Giskard-AI/giskard/tree/main/giskard-ml-worker/ml\_worker/testing
40+
* Since you are writing a heuristic test, you will select heuristic\_tests.py from the list of files under https://github.com/Giskard-AI/giskard/tree/main/giskard/testing
4241
* In heuristic\_tests.py, write your code under **class HeuristicTests(AbstractTestCollection) after the existing codes**
43-
* To write the unit test we select test\_heuristic.py under the list of files https://github.com/Giskard-AI/giskard/tree/main/giskard-ml-worker/test
42+
* To write the unit test we select test\_heuristic.py under the list of files https://github.com/Giskard-AI/giskard/tree/main/tests
4443
* Follow the pattern of parameterizing the inputs which helps you to test the function using different fixtures. You can read more about parameterizing unit tests here https://docs.pytest.org/en/7.1.x/example/parametrize.html
45-
* If you want to create your own dataset, You can create your own fixture python file under https://github.com/Giskard-AI/giskard/tree/main/giskard-ml-worker/test/fixtures
46-
* You can use https://github.com/Giskard-AI/giskard/blob/main/giskard-ml-worker/test/fixtures/german\_credit\_scoring.py for your reference. Make sure you return the model, data(with target) and test\_data(without target) in the expected format.
44+
* If you want to create your own dataset, You can create your own fixture python file under https://github.com/Giskard-AI/giskard/tree/main/tests
45+
* You can use https://github.com/Giskard-AI/giskard/tree/main/tests/fixtures/german\_credit\_scoring.py for your reference. Make sure you return the model, data(with target) and test\_data(without target) in the expected format.

0 commit comments

Comments
 (0)