From 6c890a2ff2b382b47f3a8ebc0164b718ef663e5a Mon Sep 17 00:00:00 2001 From: Andres Rodriguez Date: Tue, 1 Apr 2025 11:38:16 -0700 Subject: [PATCH 1/3] Remove GH_TOKEN requirement --- .github/workflows/docs.yaml | 18 ++++++++---------- .github/workflows/quarto-docs.yaml | 24 +++++++++++------------- 2 files changed, 19 insertions(+), 23 deletions(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 8db50953f..299a952ab 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -7,15 +7,15 @@ on: push: branches: - main - - release-v1 + - cachafla/fix-docs-gh-action paths-ignore: - - 'docs/_build/**' + - "docs/_build/**" workflow_dispatch: inputs: note: - description: 'Provide a description of the changes' + description: "Provide a description of the changes" required: true - default: 'Update docs' + default: "Update docs" permissions: contents: write @@ -27,8 +27,6 @@ jobs: steps: - uses: actions/checkout@v4 - with: - token: ${{ secrets.GH_TOKEN }} - name: Install poetry run: pipx install poetry @@ -36,8 +34,8 @@ jobs: - name: Set up Python 3.11 uses: actions/setup-python@v5 with: - python-version: '3.11' - cache: 'poetry' + python-version: "3.11" + cache: "poetry" - name: Install Dependencies run: | @@ -53,5 +51,5 @@ jobs: uses: EndBug/add-and-commit@v9 with: default_author: github_actions - message: 'Generate docs' - add: 'docs/_build/' + message: "Generate docs" + add: "docs/_build/" diff --git a/.github/workflows/quarto-docs.yaml b/.github/workflows/quarto-docs.yaml index 70a2d7993..49ece1183 100644 --- a/.github/workflows/quarto-docs.yaml +++ b/.github/workflows/quarto-docs.yaml @@ -1,5 +1,5 @@ # This workflow will install Python dependencies and generate -# Quarto documentation using Griffe for API extraction and +# Quarto documentation using Griffe for API extraction and # Jinja2 templates for the docs and navigation. name: Python Library API docs for Quarto @@ -7,15 +7,15 @@ on: push: branches: - main - - release-v1 + - cachafla/fix-docs-gh-action paths-ignore: - - 'docs/**' + - "docs/**" workflow_dispatch: inputs: note: - description: 'Provide a description of the changes' + description: "Provide a description of the changes" required: true - default: 'Update quarto docs' + default: "Update quarto docs" permissions: contents: write @@ -27,8 +27,6 @@ jobs: steps: - uses: actions/checkout@v4 - with: - token: ${{ secrets.GH_TOKEN }} - name: Install poetry run: pipx install poetry @@ -36,8 +34,8 @@ jobs: - name: Set up Python 3.11 uses: actions/setup-python@v5 with: - python-version: '3.11' - cache: 'poetry' + python-version: "3.11" + cache: "poetry" - name: Install Dependencies run: | @@ -54,8 +52,8 @@ jobs: uses: EndBug/add-and-commit@v9 with: default_author: github_actions - message: 'Generate quarto docs' - add: 'docs/' - remove: 'docs/_build/' + message: "Generate quarto docs" + add: "docs/" + remove: "docs/_build/" pathspec_error_handling: ignore - push: true \ No newline at end of file + push: true From abf5b1871816c456b5b81a66f570e9bccf61ff18 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 1 Apr 2025 18:41:09 +0000 Subject: [PATCH 2/3] Generate quarto docs --- docs/_sidebar.yml | 2 +- docs/validmind.qmd | 2 +- docs/validmind/tests.qmd | 21 +++++++++------------ docs/validmind/version.qmd | 2 +- 4 files changed, 12 insertions(+), 15 deletions(-) diff --git a/docs/_sidebar.yml b/docs/_sidebar.yml index 716bbadb7..7caa48eb9 100644 --- a/docs/_sidebar.yml +++ b/docs/_sidebar.yml @@ -10,7 +10,7 @@ website: - text: "---" - text: "Python API" # Root level items from validmind.qmd - - text: "`2.8.14`" + - text: "`2.8.15`" file: validmind/validmind.qmd#version__ - text: "init" file: validmind/validmind.qmd#init diff --git a/docs/validmind.qmd b/docs/validmind.qmd index 880cfd6d8..197ea5087 100644 --- a/docs/validmind.qmd +++ b/docs/validmind.qmd @@ -44,7 +44,7 @@ After you have pasted the code snippet into your development source code and exe ::: {.signature} -2.8.14 +2.8.15 ::: diff --git a/docs/validmind/tests.qmd b/docs/validmind/tests.qmd index 290358a65..20c5c95e0 100644 --- a/docs/validmind/tests.qmd +++ b/docs/validmind/tests.qmd @@ -20,7 +20,7 @@ ValidMind Tests Module ::: {.signature} -deflist_tests(filter=None,task=None,tags=None,pretty=True,truncate=True): +deflist_tests(filter:Optional\[str\]=None,task:Optional\[str\]=None,tags:Optional\[List\[str\]\]=None,pretty:bool=True,truncate:bool=True)Union\[List\[str\], None\]: ::: @@ -36,17 +36,13 @@ List all tests in the tests directory. - `pretty (bool, optional)`: If True, returns a pandas DataFrame with a formatted table. Defaults to True. - `truncate (bool, optional)`: If True, truncates the test description to the first line. Defaults to True. (only used if pretty=True) -**Returns** - -- list or pandas.DataFrame: A list of all tests or a formatted table. - ## load_test ::: {.signature} -defload_test(test_id:str,test_func:callable=None,reload:bool=False): +defload_test(test_id:str,test_func:Optional\[Callable\[..., Any\]\]=None,reload:bool=False)Callable\[..., Any\]: ::: @@ -60,6 +56,7 @@ Test IDs are in the format `namespace.path_to_module.TestClassOrFuncName[:tag]`. - `test_id (str)`: The test ID in the format `namespace.path_to_module.TestName[:tag]` - `test_func (callable, optional)`: The test function to load. If not provided, the test will be loaded from the test provider. Defaults to None. +- `reload (bool, optional)`: If True, reload the test even if it's already loaded. Defaults to False. ## describe_test @@ -67,7 +64,7 @@ Test IDs are in the format `namespace.path_to_module.TestClassOrFuncName[:tag]`. ::: {.signature} -defdescribe_test(test_id:TestID (Union of validmind.data_validation.\*, validmind.model_validation.\*, validmind.prompt_validation.\* and str)=None,raw:bool=False,show:bool=True): +defdescribe_test(test_id:Optional\[TestID (Union of validmind.data_validation.\*, validmind.model_validation.\*, validmind.prompt_validation.\* and str)\]=None,raw:bool=False,show:bool=True)Union\[str, HTML, Dict\[str, Any\]\]: ::: @@ -131,13 +128,13 @@ This function is the main entry point for running tests. It can run simple unit ::: {.signature} -deflist_tags(): +deflist_tags()List\[str\]: ::: -List unique tags from all test classes. +List all unique available tags ## list_tasks @@ -145,13 +142,13 @@ List unique tags from all test classes. ::: {.signature} -deflist_tasks(): +deflist_tasks()List\[str\]: ::: -List unique tasks from all test classes. +List all unique available tasks ## list_tasks_and_tags @@ -159,7 +156,7 @@ List unique tasks from all test classes. ::: {.signature} -deflist_tasks_and_tags(as_json=False): +deflist_tasks_and_tags(as_json:bool=False)Union\[str, Dict\[str, List\[str\]\]\]: ::: diff --git a/docs/validmind/version.qmd b/docs/validmind/version.qmd index c371c8f2e..eb212ee14 100644 --- a/docs/validmind/version.qmd +++ b/docs/validmind/version.qmd @@ -9,6 +9,6 @@ sidebar: validmind-reference ::: {.signature} -2.8.14 +2.8.15 ::: From 9f0cd8d436dbd1745d2543da0c2042de5e477da3 Mon Sep 17 00:00:00 2001 From: Andres Rodriguez Date: Tue, 1 Apr 2025 11:57:21 -0700 Subject: [PATCH 3/3] Remove deprecated GitHub Actions workflow for documentation generation and update Quarto documentation workflow to exclude specific branch. --- .github/workflows/docs.yaml | 55 ------------------------------ .github/workflows/quarto-docs.yaml | 1 - 2 files changed, 56 deletions(-) delete mode 100644 .github/workflows/docs.yaml diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml deleted file mode 100644 index 299a952ab..000000000 --- a/.github/workflows/docs.yaml +++ /dev/null @@ -1,55 +0,0 @@ -# This workflow will install Python dependencies and generate Markdown -# documentation from docstrings using Sphinx. We generate the HTML -# documentation to keep it up to date with the Markdown files -name: Python Library API docs - -on: - push: - branches: - - main - - cachafla/fix-docs-gh-action - paths-ignore: - - "docs/_build/**" - workflow_dispatch: - inputs: - note: - description: "Provide a description of the changes" - required: true - default: "Update docs" - -permissions: - contents: write - -jobs: - docs: - runs-on: - group: ubuntu-vm-large - - steps: - - uses: actions/checkout@v4 - - - name: Install poetry - run: pipx install poetry - - - name: Set up Python 3.11 - uses: actions/setup-python@v5 - with: - python-version: "3.11" - cache: "poetry" - - - name: Install Dependencies - run: | - poetry env use python3.11 - poetry install -E huggingface -E llm - poetry run pip install torch==2.0.1 --extra-index-url https://download.pytorch.org/whl/cpu - poetry run pip install aequitas fairlearn vl-convert-python - - - name: Generate Docs - run: make docs - - - name: Commit changes - uses: EndBug/add-and-commit@v9 - with: - default_author: github_actions - message: "Generate docs" - add: "docs/_build/" diff --git a/.github/workflows/quarto-docs.yaml b/.github/workflows/quarto-docs.yaml index 49ece1183..286d39287 100644 --- a/.github/workflows/quarto-docs.yaml +++ b/.github/workflows/quarto-docs.yaml @@ -7,7 +7,6 @@ on: push: branches: - main - - cachafla/fix-docs-gh-action paths-ignore: - "docs/**" workflow_dispatch: