Skip to content
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
bdc1009
CU-869anj8ub: Add initial commit of WWC conversion
mart-r Sep 30, 2025
e04eb76
CU-869anj8ub: Update dependency for medcat-den. Use PyPI version
mart-r Oct 1, 2025
98458c8
Merge branch 'main' into feat/medcat-scripts/CU-869anj8ub-add-medcat-…
mart-r Oct 22, 2025
321a8dc
CU-869anj8ub: Update permissions for workflow (minimal)
mart-r Oct 22, 2025
86173e3
CU-869anj8ub: Update dependency to medcat 2.2
mart-r Oct 23, 2025
c41f8d3
CU-869anj8ub: Update workflow to drop 3.9 and add 3.13
mart-r Oct 23, 2025
c1fc061
CU-869anj8ub: Fix most typing issues
mart-r Oct 23, 2025
5f24b6e
CU-869anj8ub: Add dunder init files for test folders
mart-r Oct 23, 2025
375d032
CU-869anj8ub: Add CAT-included tests for MCT analysis
mart-r Oct 23, 2025
d6e8e52
CU-869anj8ub: Fix CAT-included tests for MCT analysis
mart-r Oct 23, 2025
0ae7c44
CU-869anj8ub: Remove accidental line
mart-r Oct 23, 2025
de53689
CU-869anj8ub: Fix conditionals in mct export
mart-r Oct 23, 2025
61e730d
CU-869anj8ub: Simplify meta-cat eval by using built in method (kind of)
mart-r Oct 23, 2025
c362bee
CU-869anj8ub: Small typos in comments
mart-r Oct 23, 2025
d697f5e
CU-869anj8ub: Force testing against current version of MedCAT on CI
mart-r Oct 23, 2025
3f145a0
CU-869anj8ub: Install based on latest state without editable flag
mart-r Oct 23, 2025
f328310
Merge branch 'main' into feat/medcat-scripts/CU-869anj8ub-add-medcat-…
mart-r Oct 28, 2025
bf5b8f2
CU-869anj8ub: Add simple README
mart-r Oct 28, 2025
9a5244b
CU-869anj8ub: Add example data for MetaCAT training
mart-r Oct 28, 2025
3c5ed3e
CU-869anj8ub: Add meta-annotation training
mart-r Oct 28, 2025
d2c799f
CU-869anj8ub: Fix issue with category mapping
mart-r Oct 28, 2025
de82ef5
CU-869anj8ub: Simplfiy alternative category names somewhat
mart-r Oct 28, 2025
86c6571
CU-869anj8ub: Fix trainer export passing to MetaCAT train method
mart-r Oct 28, 2025
6239602
CU-869anj8ub: Remove 3rd class from example
mart-r Oct 28, 2025
5b8172a
CU-869anj8ub: Fix category name issue
mart-r Oct 28, 2025
f61a0b3
CU-869anj8ub: Fix example for meta-cat on its own
mart-r Oct 28, 2025
147b8b1
CU-869anj8ub: Fix save dir path for meta cat
mart-r Oct 28, 2025
72ec0a8
CU-869anj8ub: Avoid running less supported MetaCAT-only workflow
mart-r Oct 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions .github/workflows/medcat-scripts_main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: medcat-scripts - Test

on:
push:
branches: [ main ]
pull_request:
paths:
- 'medcat-scripts/**'
- '.github/workflows/medcat-scripts**'

defaults:
run:
working-directory: ./medcat-scripts

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
matrix:
python-version: [ '3.10', '3.11', '3.12', '3.13' ]
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
# reinstall MedCAT from local to test against changes in core lib
uv pip install "../medcat-v2[spacy,deid,meta-cat,rel-cat]"
- 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
16 changes: 16 additions & 0 deletions medcat-scripts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# medcat-scripts

This project contains the relevant tools and notebooks to help users work with MedCAT models.
This includes instructions on finetuning models in an unsupervised or supervised manner as well as evaluating MedCATtrainer exports and run models on data.

# Setup

To gain access to these scripts you simply:
```
git clone https://github.com/CogStack/cogstack-nlp.git
cd cogstack-nlp/medcat-scripts
```
You may subsequently need to install the relevant requirements
```
python -m pip install -r requirements.txt
```
1 change: 1 addition & 0 deletions medcat-scripts/data/mct_exports/example_mct_export.json

Large diffs are not rendered by default.

Loading