diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml index c2f7e71..a9c2e93 100644 --- a/.github/workflows/pre-commit.yaml +++ b/.github/workflows/pre-commit.yaml @@ -9,6 +9,6 @@ jobs: pre-commit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v3 - - uses: pre-commit/action@v3.0.0 + - uses: actions/checkout@v6 + - uses: actions/setup-python@v6 + - uses: pre-commit/action@v3.0.1 diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 281a27c..6ad01b9 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -14,16 +14,12 @@ jobs: permissions: id-token: write # IMPORTANT: this permission is mandatory for trusted publishing steps: - # taken from https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ - - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v4 + - uses: actions/checkout@v6 + - name: Set up uv + uses: astral-sh/setup-uv@v7 with: - python-version: "3.11" - - name: Install pypa/build - run: python3 -m pip install build --user + python-version: "3.14" - name: Build a binary wheel and a source tarball - run: python3 -m build --sdist --wheel --outdir dist/ . - # retrieve your distributions here + run: uv build - name: Publish package distributions to PyPI uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 74e74cc..70fed23 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -10,29 +10,19 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] steps: - - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + - uses: actions/checkout@v6 + - name: Set up uv + uses: astral-sh/setup-uv@v7 with: python-version: ${{ matrix.python-version }} - name: Install dependencies - run: | - python -m pip install --upgrade pip - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi + run: uv sync --dev - name: Lint with ruff run: | - # stop the build if there are Python syntax errors or undefined names - ruff check --select=E9,F63,F7,F82 --target-version=py39 . - # default set of ruff rules with GitHub Annotations - ruff check --target-version=py39 . + uv run ruff check --select=E9,F63,F7,F82 . + uv run ruff check . - name: Test with pytest - run: | - pytest - # - name: Upload coverage reports to Codecov - # uses: codecov/codecov-action@v4 - # with: - # token: ${{ secrets.CODECOV_TOKEN }} + run: uv run pytest diff --git a/.github/workflows/try-build.yaml b/.github/workflows/try-build.yaml index 062f10c..f5246b5 100644 --- a/.github/workflows/try-build.yaml +++ b/.github/workflows/try-build.yaml @@ -7,12 +7,12 @@ jobs: name: Tries to build the package and import it runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - name: Set up uv + uses: astral-sh/setup-uv@v5 with: - python-version: "3.11" + python-version: "3.14" - name: Install locally - run: python3 -m pip install . + run: uv pip install . - name: Test library import - run: cd / && python3 -c "from crpy import RegistryInfo" + run: cd / && uv run python -c "from crpy import RegistryInfo" diff --git a/pyproject.toml b/pyproject.toml index 9884a14..8220add 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,13 +9,14 @@ readme = "README.md" authors = [ { name = "Brunno Vanelli", email = "brunnovanelli@gmail.com" } ] -requires-python = ">=3.9.0" +requires-python = ">=3.10.0" dependencies = [ - "async-lru>=2", + "async-lru==2.1.0", "aiohttp>=3", - "async-lru>=2", "rich>=13.5", ] +keywords = ["docker", "oci", "container-registry", "api"] +dynamic = ["version"] classifiers = [ "Programming Language :: Python", "Programming Language :: Python :: 3", @@ -24,9 +25,15 @@ classifiers = [ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", +] + +[dependency-groups] +dev = [ + "pytest>=8", + "pytest-asyncio>=1", + "ruff>=0.12", ] -keywords = ["docker", "oci", "container-registry", "api"] -dynamic = ["version"] [project.urls] Homepage = "https://github.com/bvanelli/crpy" diff --git a/requirements-dev.txt b/requirements-dev.txt deleted file mode 100644 index 66c9786..0000000 --- a/requirements-dev.txt +++ /dev/null @@ -1,3 +0,0 @@ -pytest-asyncio>=1 -ruff>=0.12 -pytest>=8 diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 8d15c24..0000000 --- a/requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -requests>=2 -async-lru>=2 -aiohttp>=3 -async-lru>=2 -rich>=13.5