-
Notifications
You must be signed in to change notification settings - Fork 5
bug/medcat: CU-869bbj5u4 Fix core dependencies #251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…ort al its parts (or has explicit checks for optional extras)
|
Task linked: CU-869bbj5u4 Fix issues with base dependencies |
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| # NOTE: using oldest supported python version | ||
| - name: Install uv for Python 3.10 | ||
| uses: astral-sh/setup-uv@v7 | ||
| with: | ||
| python-version: 3.10 | ||
| enable-cache: true | ||
| cache-dependency-glob: "medcat-v2/uv.lock" | ||
| - name: Install the project | ||
| run: | | ||
| uv sync # NO extras | ||
| - name: Check that all packages / modules can be imported with default / no-extras install | ||
| run: | | ||
| uv run python tests/other/check_base_install_can_import_all.py medcat | ||
| types-lints-tests-regression: |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 12 hours ago
To resolve this issue, add a permissions: block specifying the minimum required permissions to either the root of the workflow file or to each job. Since neither job requires write access to the repository or other privileged resources, a root-level block with contents: read is sufficient. This will apply contents: read to all jobs unless overridden. The change should be placed immediately after the name: and before the on: block (commonly, after line 1).
-
Copy modified lines R2-R3
| @@ -1,4 +1,6 @@ | ||
| name: medcat-v2 - Test | ||
| permissions: | ||
| contents: read | ||
|
|
||
| on: | ||
| push: |
Currently, can't even import the base
medcatpackage from a raw install due to it importingmedcat.utils.check_for_updateswhich in turn usespackagingwhich isn't listed as a dep, let alone a core one.Going further than that, there's a few other deps that are missing:
medcat.utils.downloads_scriptsneedsrequestsmedcat.utils.legacy.convert_meta_catneeds to explicitly specify it needs MetaCATmedcat.utils.legacy.convert_rel_catneeds to explicitly specify it needs RelCATmedcat.utils.regression.checkingandmedcat.utils.regression.regression_checkerneedpyyamlSo this PR does the following:
medcat.utils.legacy.convert_meta_catandmedcat.utils.legacy.convert_rel_catpackagingpyyamlrequetsmedcat.utils.MissingDependenciesErrorupon import