Joss paper #3994
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Type Coverage | |
| on: | |
| push: | |
| branches: [ main, master, develop ] | |
| pull_request: | |
| branches: [ main, master, develop ] | |
| workflow_dispatch: | |
| jobs: | |
| type-coverage: | |
| name: Check Type Coverage | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| timeout-minutes: 2 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.10" | |
| timeout-minutes: 3 | |
| - name: Install uv | |
| run: curl -LsSf https://astral.sh/uv/install.sh | sh | |
| timeout-minutes: 5 | |
| - name: Install dependencies | |
| run: | | |
| uv venv .venv | |
| source .venv/bin/activate | |
| uv pip install mypy lxml types-six | |
| # Install minimal dependencies for type checking | |
| uv pip install numpy scipy networkx matplotlib rdflib tqdm bitarray pandas | |
| timeout-minutes: 8 | |
| - name: Check type coverage | |
| run: | | |
| source .venv/bin/activate | |
| cd docfiles | |
| python3 check_type_coverage.py --json ../type-coverage.json --verbose | |
| timeout-minutes: 5 | |
| - name: Display coverage | |
| run: | | |
| echo "Type Coverage Results:" | |
| cat type-coverage.json | python3 -c "import sys, json; data = json.load(sys.stdin); print(f\"Total LOC: {data['total_loc']}\"); print(f\"Precise: {data['precise_loc']} ({data['precise_percent']:.2f}%)\"); print(f\"Imprecise: {data['imprecise_loc']} ({data['imprecise_percent']:.2f}%)\")" | |
| timeout-minutes: 1 | |
| - name: Upload coverage report | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: type-coverage-report | |
| path: type-coverage.json | |
| retention-days: 90 | |
| timeout-minutes: 2 |