diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aa8262e..3687bf4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,50 +1,61 @@ name: CI -'on': +"on": push: branches: - master tags: - - 'v*' + - "v*" pull_request: branches: - master jobs: + Build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.13" + - uses: astral-sh/setup-uv@v3.2.0 + - run: uv build . + - uses: actions/upload-artifact@v4 + with: + name: dist + path: dist/ Test: - runs-on: '${{ matrix.os }}' + runs-on: "${{ matrix.os }}" strategy: matrix: os: - ubuntu-22.04 python-version: - - '3.7' - - '3.8' - - '3.9' - - '3.10' + - "3.7" + - "3.8" + - "3.9" + - "3.10" + - "3.11" + - "3.12" + - "3.13" steps: - - uses: actions/checkout@v3 - - name: 'Set up Python ${{ matrix.python-version }}' - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - name: "Set up Python ${{ matrix.python-version }}" + uses: actions/setup-python@v5 with: - python-version: '${{ matrix.python-version }}' + python-version: "${{ matrix.python-version }}" - run: pip install -U build pytest pytest-cov - run: py.test -vvv --cov . - - run: python -m build . - - uses: actions/upload-artifact@v3 - with: - name: dist - path: dist/ Lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: - python-version: '3.11' - - uses: pre-commit/action@v3.0.0 + python-version: "3.13" + - uses: pre-commit/action@v3.0.1 Publish: if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') needs: - - Test + - Build name: Upload release to PyPI runs-on: ubuntu-latest environment: @@ -53,7 +64,7 @@ jobs: permissions: id-token: write steps: - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: dist path: dist/ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8489bfe..602a3ef 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,24 +2,21 @@ minimum_pre_commit_version: 2.15.0 ci: autofix_prs: false repos: - - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.0.272 + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.7.1 hooks: - id: ruff args: - --fix - - repo: https://github.com/psf/black - rev: 23.3.0 - hooks: - - id: black + - id: ruff-format - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v5.0.0 hooks: - id: debug-statements - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.3.0 + rev: v1.13.0 hooks: - id: mypy additional_dependencies: diff --git a/LICENSE b/LICENSE index fa71b26..8753e4c 100644 --- a/LICENSE +++ b/LICENSE @@ -1,7 +1,7 @@ The MIT License (MIT) -Copyright (c) 2021 Valohai +Copyright (c) 2021-2024 Valohai Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/pyproject.toml b/pyproject.toml index 59c34ef..3279db2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ name = "gitignorant" dynamic = ["version"] description = "A parser for gitignore files" readme = "README.md" -license = "" +license = "MIT" requires-python = ">=3.7" authors = [ { name = "Aarni Koskela", email = "aarni@valohai.com" }, @@ -33,8 +33,6 @@ include = [ [tool.ruff] ignore = [] line-length = 88 -select = [ - "E", - "F", - "W", -] + +[tool.ruff.lint] +select = ["E", "F", "W"]