diff --git a/python-lint/action.yml b/python-lint/action.yml index 2918e78..a47b0a6 100644 --- a/python-lint/action.yml +++ b/python-lint/action.yml @@ -1,15 +1,11 @@ name: "Linting and Type Checking" -description: "Run linting and type-checking tools like Black, Flake8, isort, and mypy using Poetry" +description: "Run linting(ruff) and type-checking(mypy) tools via uv" inputs: python-version: description: "The version of Python to use" required: true - poetry-version: - description: "The version of Poetry to use" - required: true - runs: using: "composite" @@ -17,46 +13,32 @@ runs: - name: Checkout repository uses: actions/checkout@v4 + - name: Install uv + uses: astral-sh/setup-uv@v5 + with: + version: "0.7.8" + enable-cache: true + - name: Setup Python uses: actions/setup-python@v5 with: python-version: ${{ inputs.python-version }} - - name: Install pipx - run: | - python -m pip install --upgrade pip - python -m pip install pipx - python -m pipx ensurepath - continue-on-error: true - - shell: bash - - - name: Install Poetry with pipx - run: pipx install poetry==${{ inputs.poetry-version }} - continue-on-error: true - shell: bash - - - name: Install dependencies - run: poetry install - continue-on-error: true - shell: bash - - - name: Run Black - run: poetry run black --check . - continue-on-error: true #Added so to provide lineance while lint + - name: Install the project + run: uv sync --locked --all-extras --dev shell: bash - - name: Run Flake8 - run: poetry run flake8 . - continue-on-error: true #Added so to provide lineance while lint + - name: Run Ruff format + run: uv run ruff format --check . + continue-on-error: true # Added so to provide lenience while linting shell: bash - - name: Run isort - run: poetry run isort --check . - continue-on-error: true #Added so to provide lineance while lint + - name: Sort imports + run: uv run ruff check --select I --diff . + continue-on-error: true # Added so to provide lenience while linting shell: bash - name: Run mypy - run: poetry run mypy . - continue-on-error: true #Added so to provide lineance while lint + run: uv run mypy . + continue-on-error: true # Added so to provide lenience while linting shell: bash diff --git a/python-test/action.yml b/python-test/action.yml index 229e3d5..2dc2584 100644 --- a/python-test/action.yml +++ b/python-test/action.yml @@ -5,9 +5,6 @@ inputs: python-version: description: "The version of Python used" required: true - poetry-version: - description: "The version of Poetry to install" - required: true runs: using: "composite" @@ -20,18 +17,16 @@ runs: with: python-version: ${{ inputs.python-version }} - - name: Install pipx - run: | - python -m pip install --upgrade pip - python -m pip install pipx - python -m pipx ensurepath - continue-on-error: true - shell: bash + - name: Install uv + uses: astral-sh/setup-uv@v5 + with: + version: "0.7.8" + enable-cache: true - - name: Install Poetry with pipx - run: pipx install poetry==${{ inputs.poetry-version }} - continue-on-error: true - shell: bash + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: ${{ inputs.python-version }} - name: Update pyproject.toml to fix NumPy path run: | @@ -39,12 +34,11 @@ runs: cat pyproject.toml # Optionally, verify the change shell: bash - - name: Install dependencies - run: poetry install - continue-on-error: true + - name: Install the project + run: uv sync --locked --all-extras --dev shell: bash - - name: Run Test - run: poetry run pytest - continue-on-error: true - shell: bash + - name: Run tests + run: uv run pytest + continue-on-error: false + shell: bash \ No newline at end of file