diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index be54ba4..473497a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,30 +2,27 @@ name: CI on: pull_request: branches: - - main + - main push: branches: - - main + - main release: - types: [published] + types: [ published ] jobs: build: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.9, '3.10', '3.11', '3.12', '3.13'] + python-version: [ '3.9', '3.10', '3.11', '3.12', '3.13' ] steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - name: Set up Poetry - uses: abatilo/actions-poetry@v3 - - name: Check package setup - run: poetry check - - name: Install dependencies - run: poetry install --with test - - name: Test - run: poetry run pytest --doctest-modules + - name: Checkout + uses: actions/checkout@v4 + - name: Install uv and set the python version + uses: astral-sh/setup-uv@v5 + with: + python-version: ${{ matrix.python-version }} + enable-cache: true + - name: Install the project + run: uv sync + - name: Test + run: uv run pytest --doctest-modules diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4d3d8a4..7b77e3f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,20 +1,17 @@ name: Publish on: release: - types: [created] + types: [ created ] jobs: deploy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: 3.x - - name: Set up Poetry - uses: abatilo/actions-poetry@v3 - - name: Build and publish - env: - POETRY_HTTP_BASIC_PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }} - POETRY_HTTP_BASIC_PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: poetry publish --build + - uses: actions/checkout@v4 + - name: Install uv + uses: astral-sh/setup-uv@v5 + - name: Set up Python + run: uv python install + - name: Build + run: uv build + - name: Publish + run: uv publish diff --git a/.gitignore b/.gitignore index 831897e..ab325c0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ -build dist # codespaces: pythonenv3.9 -poetry.lock +uv.lock diff --git a/pyproject.toml b/pyproject.toml index cb25241..66b71f2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,15 +1,19 @@ -[tool.poetry] +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] name = "krippendorff" -version = "0.8.1-dev" +version = "0.8.1.dev0" description = "Fast computation of the Krippendorff's alpha measure." -authors = ["Santiago Castro "] +authors = [ + { name = "Santiago Castro", email = "sacastro@fing.edu.uy" }, +] license = "GPL-3.0-or-later" +license-files = ["LICENSE.txt"] readme = "README.md" -homepage = "https://github.com/pln-fing-udelar/fast-krippendorff" -repository = "https://github.com/pln-fing-udelar/fast-krippendorff" - keywords = ["Krippendorff", "alpha", "agreement", "reliability", "coding", "coders", "units", "values"] classifiers = [ "Development Status :: 4 - Beta", @@ -27,16 +31,17 @@ classifiers = [ "Topic :: Scientific/Engineering :: Artificial Intelligence", ] -[tool.poetry.dependencies] -python = "^3.9" -numpy = ">=1.21" # For NumPy Typing. - -[tool.poetry.group.test] -optional = true +requires-python = ">=3.9" +dependencies = [ + "numpy>=1.21", # For NumPy Typing. +] -[tool.poetry.group.test.dependencies] -pytest = ">=7,<9" +[dependency-groups] +dev = ["pytest>=7,<9"] -[build-system] -requires = ["poetry_core"] -build-backend = "poetry.core.masonry.api" +[project.urls] +Homepage = "https://github.com/pln-fing-udelar/fast-krippendorff" +Documentation = "https://github.com/pln-fing-udelar/fast-krippendorff" +Repository = "https://github.com/pln-fing-udelar/fast-krippendorff" +"Bug Tracker" = "https://github.com/pln-fing-udelar/fast-krippendorff/issues" +Changelog = "https://github.com/pln-fing-udelar/fast-krippendorff/releases"