Skip to content

Commit

Permalink
ci: display warnings on doc-building CI check and make the job fail (#…
Browse files Browse the repository at this point in the history
…1492)

Co-authored-by: theodu <[email protected]>
  • Loading branch information
theodu and theodu authored Sep 28, 2023
1 parent ede2d08 commit 3ad585c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
13 changes: 12 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,15 @@ jobs:
pip install -e ".[dev]"
- name: Build
run: mkdocs build
run: |
mkdocs build 2>&1 | tee doc-build.log
- name: Look for Warnings
run: |
if grep -q "WARNING" doc-build.log; then
echo $(grep "WARNING" doc-build.log)
echo "::error::Documentation build completed with warnings"
exit 1
else
echo "Documentation build completed successfully"
fi
2 changes: 1 addition & 1 deletion src/kili/entrypoints/mutations/label/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def append_to_labels(
label_type: LabelType = "DEFAULT",
project_id: Optional[str] = None,
seconds_to_label: Optional[int] = 0,
):
) -> Dict[Literal["id"], str]:
"""!!! danger "[DEPRECATED]"
append_to_labels method is deprecated. Please use append_labels instead.
This new function allows to import several labels 10 times faster.
Expand Down
6 changes: 3 additions & 3 deletions src/kili/entrypoints/queries/plugins/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import json
from datetime import datetime
from typing import Optional
from typing import Dict, List, Optional

from typeguard import typechecked

Expand Down Expand Up @@ -95,7 +95,7 @@ def get_plugin_status(
self,
plugin_name: str,
verbose: bool = True,
):
) -> str:
"""Update a plugin with new code.
Args:
Expand All @@ -116,7 +116,7 @@ def get_plugin_status(
def list_plugins(
self,
fields: ListOrTuple[str] = ("name", "projectIds", "id", "createdAt", "updatedAt"),
):
) -> List[Dict]:
# pylint: disable=line-too-long
"""List all plugins from your organization.
Expand Down

0 comments on commit 3ad585c

Please sign in to comment.