Skip to content

Conversation

mart-r
Copy link
Collaborator

@mart-r mart-r commented Sep 30, 2025

This is the working_with_cogstack replacement.

It will use medcat_den under the hood for centralised model storage.

  • Convert relevant parts from working_with_cogstack
  • Add workflows for scripts and notebooks
  • Depend on PyPI-based medcat-den

@tomolopolis
Copy link
Member

Comment on lines +17 to +57
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.9', '3.10', '3.11', '3.12' ]
max-parallel: 4
steps:
- uses: actions/checkout@v5
- name: Install uv for Python ${{ matrix.python-version }}
uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python-version }}
enable-cache: true
- name: Install the project
run: |
uv venv .venv
source .venv/bin/activate
uv run python -m ensurepip
uv pip install -r requirements.txt
uv pip install -r requirements-dev.txt
- name: Check types
run: |
# NOTE: Only testing against .py files in this folder
uv run python -m mypy `git ls-tree --full-tree --name-only -r HEAD | grep ".py$" | grep "^medcat-scripts" | grep -v "tests/" | sed 's|^medcat-scripts/||'` --explicit-package-bases --follow-imports=normal

- name: Setup for notebook tests
run: |
# NOTE: this will make sure there's something in the den to work with below
uv run python tests/setup_for_tests.py

- name: Install IPython kernel
run: |
uv run python -m ipykernel install --name smoketests --user

- name: Run tests
run: |
uv run pytest tests

- name: Test notebooks
run: |
uv run pytest --collect-only --nbmake **/*.ipynb
uv run pytest --nbmake -n=auto --nbmake-kernel=smoketests --nbmake-timeout=1800 **/*.ipynb No newline at end of file

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants