Skip to content

ASB-31862 remove unused functions from base.py #732

ASB-31862 remove unused functions from base.py

ASB-31862 remove unused functions from base.py #732

Workflow file for this run

name: CI Suite
on:
push:
pull_request:
workflow_dispatch:
inputs:
clear_pip_cache:
description: 'Clear pip cache'
required: false # set true only when you want to clear pip cache, otherwise set false
default: 'false'
jobs:
lint_doc_and_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Print working directory
run: pwd
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
cache-dependency-path: '**/pyproject.toml'
- name: Clear pip cache (debug mode only)
if: github.event.inputs.clear_pip_cache == 'true'
run: |
pip cache purge
- name: Cache pip dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ".[dev,test,docs]"
python -m spacy download en_core_web_sm
- name: Run linter and formatter
run: |
# stop the build if there are Python syntax errors or undefined names
ruff check . --config=pyproject.toml --statistics --exit-zero --fix # if you want to automatically fix errors.
# exit-zero treats all errors as warnings.
ruff check . --config=pyproject.toml --ignore=C901
- name: Download NLTK wordnet resource
run: |
python -m nltk.downloader wordnet
- name: Create required output directory
run: mkdir -p /home/runner/output/llms/openai_gpt-4o-mini # prevent OSError in GitHub CI env.
- name: Run tests
# run: pytest --ignore=bibcat/tests/llm/
run: pytest bibcat/tests/llm/
- name: Generate API Docs
run: sphinx-apidoc -o docs/api/ bibcat bibcat/tests/* # Generate API Docs from the docstring except test scripts
- name: Build documentation
run: make -C docs html
# you can download the artifact from the workflow summary in the GitHub Actions interface.
- name: Upload Documentation as Artifact
uses: actions/upload-artifact@v4
with:
name: sphinx-docs
path: docs/_build/html