Skip to content

Commit 7bc5d67

Browse files
authored
Merge pull request #113 from tcumby/mlint-handle
Mlint handle
2 parents d949494 + 5f67dc1 commit 7bc5d67

19 files changed

+2965
-3032
lines changed

.github/workflows/publish.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,24 @@ on:
88
types: [release-made]
99
jobs:
1010
deploy:
11-
runs-on: ubuntu-20.04
11+
runs-on: ubuntu-latest
1212
steps:
1313
- name: Checkout
1414
uses: actions/checkout@v4
1515
- name: Set up Python
1616
uses: actions/setup-python@v5
1717
with:
18-
python-version: 3.9
18+
python-version: 3.11
1919
- name: Install build meta-dependencies
2020
run: |
21-
pip install poetry tox
21+
pip install uv tox
2222
- name: Test with tox
2323
run: |
2424
tox -v
25-
- name: Build sdists and wheels with Poetry
25+
- name: Build sdists and wheels with uv
2626
run: |
27-
poetry build
28-
poetry install
27+
uv build
28+
uv pip install
2929
- name: Build the Docker image
3030
run: |
3131
docker build .
@@ -37,4 +37,4 @@ jobs:
3737
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3838
- name: Publish to PyPi
3939
run: |
40-
poetry publish -vv --username __token__ --password ${{ secrets.PYPI_TOKEN }}
40+
uv publish --verbose --username __token__ --password ${{ secrets.PYPI_TOKEN }}

.github/workflows/pull-test.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,12 @@ jobs:
1010
strategy:
1111
max-parallel: 1
1212
matrix:
13-
os: [ubuntu-20.04]
14-
python-version: ["3.9"]
13+
os: [ubuntu-latest, macos-latest, windows-latest]
14+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
1515
runs-on: "${{ matrix.os }}"
16+
defaults:
17+
run:
18+
shell: bash
1619
steps:
1720
- name: Checkout
1821
uses: actions/checkout@v4
@@ -22,7 +25,13 @@ jobs:
2225
python-version: "${{ matrix.python-version }}"
2326
- name: Install build meta-dependencies
2427
run: |
25-
pip install tox poetry
28+
pip install tox uv
29+
- name: compute env name
30+
id: compute-env-name
31+
run: |
32+
name=$(python -c "print('${{ matrix.python-version }}'.replace('.', ''))")
33+
echo "name=${name}" >> $GITHUB_OUTPUT
2634
- name: Test with tox
2735
run: |
28-
tox -v
36+
tox -v -e py${{ steps.compute-env-name.outputs.name }}
37+

.github/workflows/push-main.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ jobs:
99
strategy:
1010
max-parallel: 1
1111
matrix:
12-
os: [ubuntu-20.04]
13-
python-version: ["3.9"]
12+
os: [ubuntu-latest, macos-latest, windows-latest]
13+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
1414
runs-on: "${{ matrix.os }}"
1515
steps:
1616
- name: Checkout
@@ -26,10 +26,15 @@ jobs:
2626
python-version: "${{ matrix.python-version }}"
2727
- name: Install build meta-dependencies
2828
run: |
29-
pip install poetry tox
29+
pip install uv tox
30+
- name: compute env name
31+
id: compute-env-name
32+
run: |
33+
name=$(python -c "print('${{ matrix.python-version }}'.replace('.', ''))")
34+
echo "name=${name}" >> $GITHUB_OUTPUT
3035
- name: Test with tox
3136
run: |
32-
tox -v
37+
tox -v -e py${{ steps.compute-env-name.outputs.name }}
3338
- name: Build the Docker image
3439
run: |
3540
docker build .

.pre-commit-config.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,19 @@ repos:
3737
- id: check-yaml
3838
exclude: ^recipes/.*
3939
repo: https://github.com/pre-commit/pre-commit-hooks
40-
rev: v4.5.0
40+
rev: v4.6.0
4141

4242
# --- Commit msg checks ---
4343
- hooks:
4444
- id: commitizen
4545
stages: ["commit-msg"]
4646
repo: https://github.com/commitizen-tools/commitizen
47-
rev: v3.13.0
47+
rev: v3.29.0
4848

4949
# --- Linters ---
5050
- repo: https://github.com/astral-sh/ruff-pre-commit
5151
# Ruff version.
52-
rev: v0.1.9
52+
rev: v0.6.6
5353
hooks:
5454
# Run the linter.
5555
- id: ruff
@@ -62,18 +62,18 @@ repos:
6262
- hooks:
6363
- id: black
6464
repo: https://github.com/psf/black
65-
rev: 23.12.1
65+
rev: 24.8.0
6666
- repo: https://github.com/asottile/blacken-docs
67-
rev: 1.16.0
67+
rev: 1.18.0
6868
hooks:
6969
- id: blacken-docs
7070
- repo: https://github.com/asottile/pyupgrade
71-
rev: v3.15.0
71+
rev: v3.17.0
7272
hooks:
7373
- id: pyupgrade
7474
args: [--py36-plus, --py37-plus, --py38-plus]
7575
- repo: https://github.com/PyCQA/bandit
76-
rev: 1.7.6
76+
rev: 1.7.9
7777
hooks:
7878
- id: bandit
7979
exclude: ^test_*

Dockerfile

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,25 +28,22 @@ ENV PYTHONHASHSEED=random
2828
ENV PIP_NO_CACHE_DIR=off
2929
ENV PIP_DISABLE_PIP_VERSION_CHECK=on
3030
ENV PIP_DEFAULT_TIMEOUT=120
31-
ENV POETRY_VERSION=1.1.4
32-
33-
# Install system deps
34-
RUN pip install "poetry==$POETRY_VERSION"
31+
# Install uv
32+
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
3533

3634
# Copy only requirements to cache them in docker layer
3735
WORKDIR /code
38-
COPY poetry.lock pyproject.toml /code/
36+
COPY uv.lock pyproject.toml /code/
3937

40-
# Install with poetry
41-
# pip install would probably work, too, but we'd have to make sure it's a recent enough pip
42-
# Don't bother creating a virtual env -- significant performance increase
43-
RUN poetry config virtualenvs.create false \
44-
&& poetry install --no-interaction --no-ansi
38+
# Install with uv
39+
RUN uv sync --frozen --no-dev
4540

4641
# Copy everything (code) to our workdir
47-
# Our .dockerignore file should be good enough that we don't have extra stuff
4842
COPY . /code
4943

44+
# Install the project
45+
RUN uv pip install .
46+
5047

5148
# --------------------------------------
5249
# --------------- Run! -----------------

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@ Licensed under the terms of the [MIT License](https://spdx.org/licenses/MIT.html
4848
[New issues](https://github.com/tcumby/pre-commit-matlab-lint/issues) and pull requests are welcome.
4949
Please refer to the [contributing guide](https://github.com/tcumby/pre-commit-matlab-lint/blob/main/CONTRIBUTING.md)
5050
and [security policy](https://github.com/tcumby/pre-commit-matlab-lint/blob/main/SECURITY.md).
51-
Generated with [Tyrannosaurus](https://github.com/dmyersturnbull/tyrannosaurus).
51+
Generated with [Tyrannosaurus](https://github.com/dmyersturnbull/tyrannosaurus) and converted to use [uv](https://github.com/astral-sh/uv).

docs/conf.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,14 @@ def find(key: str, default: Optional[T] = None, as_type: Type[T] = str) -> Optio
3939

4040
# Basic information, used by Sphinx
4141
# Leave language as None unless you have multiple translations
42-
language = None
43-
project = find("tool.poetry.name")
44-
version = find("tool.poetry.version")
42+
language = 'en'
43+
project = find("project.name")
44+
version = find("project.version")
4545
release = version
46-
author = ", ".join(find("tool.poetry.authors", as_type=list))
47-
46+
author = find("project.authors")
4847
# Copyright string (for documentation)
4948
# It's not clear whether we're supposed to, but we'll add the license
50-
copyright = find("tool.tyrannosaurus.sources.copyright")
51-
_license = find("tool.tyrannosaurus.sources.doc_license")
52-
_license_url = find("tool.tyrannosaurus.sources.doc_license_url")
49+
_license = find("project.license")
5350

5451
# Load extensions
5552
# These should be in docs/requirements.txt

0 commit comments

Comments
 (0)