Skip to content
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
c1ef360
Add scrapper to check links
Hartorn Nov 21, 2023
8d5410a
Add doc checking to CI
Hartorn Nov 21, 2023
98becf3
Treat warnings as errors
Hartorn Nov 21, 2023
28fd93d
Fix missing quotes
Hartorn Nov 21, 2023
1a795fd
Regenerating pdm.lock
Nov 21, 2023
066a780
Cleaning up the docs
Hartorn Nov 21, 2023
7337393
Fix links in doc
Hartorn Nov 21, 2023
22e5797
Fix warnings in doc
Hartorn Nov 21, 2023
684c7e3
Disable validation temporary
Hartorn Nov 21, 2023
462453a
Merge branch 'main' of github.com:Giskard-AI/giskard into feature/gsk…
Hartorn Nov 22, 2023
f0b944e
Fix links in doc
Hartorn Nov 22, 2023
5f0a21a
Reformatting docstrings
mattbit Nov 7, 2023
e420b59
Update docstrings
mattbit Nov 7, 2023
893943e
Activate doc linting again
Hartorn Nov 22, 2023
93ea01c
Fix some more docs
Hartorn Nov 22, 2023
6c41540
Minor fixes on doc
Hartorn Nov 22, 2023
c392827
Fix doc links
Hartorn Nov 22, 2023
9921a39
Revert "Activate doc linting again"
Hartorn Nov 22, 2023
5a1fd13
Merge branch 'main' of github.com:Giskard-AI/giskard into feature/gsk…
Hartorn Nov 22, 2023
7322504
Merge branch 'main' into feature/gsk-2172-improve-documentation-ci
Hartorn Nov 23, 2023
4290fac
small fix
rabah-khalek Nov 24, 2023
159ef22
Merge branch 'main' into feature/gsk-2172-improve-documentation-ci
rabah-khalek Nov 24, 2023
6e9cf65
Merge branch 'main' of github.com:Giskard-AI/giskard into feature/gsk…
Hartorn Nov 24, 2023
c38feb5
Re organise cards
Hartorn Nov 27, 2023
cb78a09
Merge branch 'main' of github.com:Giskard-AI/giskard into feature/gsk…
Hartorn Nov 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 28 additions & 9 deletions .github/workflows/build-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,6 @@ jobs:
python-version: ${{ matrix.python-version }}
cache: true

- name: Set up Pandoc (needed for doc)
uses: r-lib/actions/setup-pandoc@v2
with:
pandoc-version: '3.1.7' # https://github.com/jgm/pandoc/releases

- name: Cache Giskard test resources
uses: actions/cache@v3
if: ${{ github.event_name == 'pull_request' || inputs.use-cache }}
Expand Down Expand Up @@ -191,10 +186,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

- name: Build doc
if : ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10'}}
run: pdm run doc

- name: Build
run: pdm build

Expand Down Expand Up @@ -300,3 +291,31 @@ jobs:
sed -i 's/^\(requires-python *= *\).*$/\1">=3.10,<3.12"/' pyproject.toml
pdm add "$(ls ../dist/*.whl)"
pdm run python -c "import giskard"
check-doc:
name: "Build and check doc"
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/[email protected]
with:
fetch-depth: 0

- name: Setup PDM
uses: pdm-project/setup-pdm@v3
with:
python-version: "3.10"
cache: true

- name: Set up Pandoc (needed for doc)
uses: r-lib/actions/setup-pandoc@v2
with:
pandoc-version: '3.1.7' # https://github.com/jgm/pandoc/releases

- name: Install dependencies
run: pdm install -G :all

- name: Build doc
run: pdm doc

- name: Check doc
run: pdm check-doc
5 changes: 0 additions & 5 deletions docs/README.md

This file was deleted.

Binary file added docs/assets/ngrok_aut.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/ngrok_aut2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions docs/cli/ngrok/index.rst
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
Setup a :code:`ngrok` account
======================
=============================

In order to expose the Giskard Hub to the internet, you would need to perform the following steps

1. Sign up `here <https://dashboard.ngrok.com/signup>`_
^^^^^^^^^^^^^^^^^^^^^^^
1. Sign up `here <https://dashboard.ngrok.com/signup>`__
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
You will be prompted by the following:

.. image:: ../../assets/ngrok_aut.png
:width: 400

You would need to have either :code:`Google Authenticator` or :code:`1Password` on your phone to generate codes.

2. Generate an API key `here <https://dashboard.ngrok.com/get-started/your-authtoken>`_
^^^^^^^^^^^^^^^^^^^^^^^
2. Generate an API key `here <https://dashboard.ngrok.com/get-started/your-authtoken>`__
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Copy the following key:

.. image:: ../../assets/ngrok_aut2.png
:width: 400


3. Expose the giskard hub
^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^
Now you can run :code:`giskard hub expose --ngrok-token <ngrok_API_key>` which should prompt you with the following instructions:::

Exposing Giskard Hub to the internet...
Expand Down
2 changes: 1 addition & 1 deletion docs/community/contribution_guidelines/dev-environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

After cloning the repository here are the useful commands to set up the local environment:

### Pre-commit hooks installation
## Pre-commit hooks installation
Pre-commit hooks ensure that the basic code quality checks are performed before the code is committed

The current pre-commit hool configuration is defined in `.pre-commit-config.yaml`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ description: Giskard process architecture
---

# Giskard architecture
![](<../assets/Architecture.jpg>)
![](<../../assets/Architecture.jpg>)
6 changes: 3 additions & 3 deletions docs/community/contribution_guidelines/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ Push your tests in the Giskard repo
* Clone the Giskard repository
* Create a GitHub branch with the base as main, starting with `test-contribution/name-of-your-branch`
* From the root of the cloned repo run `./gradlew generateProto`. This will generate the module`generated` that you will need to create your tests.
* 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.
* 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>`_.
* 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.
* 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>`__.

.. hint::
**Fixtures**

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

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.
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.

* Create a Pull Request

Expand Down
32 changes: 24 additions & 8 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,26 +140,39 @@ def linkcode_resolve(domain, info):

modname = info["module"]
fullname = info["fullname"]
print("##############")
print(f"modname:{modname}")
print(f"fullname:{fullname}")

submod = sys.modules.get(modname)
print(submod)
# print(submod)
if submod is None:
return None
print("##############")

return None
obj = submod
for part in fullname.split("."):
try:
obj = getattr(submod, part)
print(obj)
obj = getattr(obj, part)
print(f"obj:{obj}")

# print(obj)
except: # noqa: E722
print("##############")
return None

try:
fn = inspect.getsourcefile(obj.test_fn) # TODO: generalise for other objects!
print(fn)
fn = inspect.getsourcefile(
obj.test_fn if hasattr(obj, "test_fn") else obj
) # TODO: generalise for other objects!
# print(fn)
except: # noqa: E722
fn = None
if not fn:
print("##############")

return None
print(f"fn:{fn}")

try:
source, lineno = inspect.getsourcelines(obj)
Expand All @@ -170,6 +183,9 @@ def linkcode_resolve(domain, info):
linespec = "#L%d-L%d" % (lineno, lineno + len(source) - 1)
else:
linespec = ""
print(f"linespec:{linespec}")

filename = fn.split("giskard")[-1]
print("##############")

filename = fn.split("main", 1)[-1]
return f"https://github.com/Giskard-AI/giskard/blob/main/{filename}{linespec}"
return f"https://github.com/Giskard-AI/giskard/blob/main/giskard{filename}{linespec}"
26 changes: 0 additions & 26 deletions docs/deprecated_tutorials/data-types/index.md

This file was deleted.

58 changes: 0 additions & 58 deletions docs/deprecated_tutorials/data-types/tabular/index.md

This file was deleted.

Empty file.
121 changes: 0 additions & 121 deletions docs/deprecated_tutorials/index.md

This file was deleted.

Loading