Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,25 @@ on:
push:
branches:
- master
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.13']
python-version: ["3.13"]
steps:
- uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v4
with:
# Tags are needed to compute the current version number
fetch-depth: 0
lfs: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install tox
run: |
pip install --upgrade pip
pip install tox
- name: Run tests
run: |
tox
uv run tox
19 changes: 8 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,19 @@ jobs:
runs-on: ubuntu-latest
environment: release
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v4
with:
# Tags are needed to compute the current version number
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install Python build
run: |
pip install --upgrade pip
pip install build
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Build the Python distribution
run: |
python -m build
uv build
- name: Publish the Python distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
run: |
uv publish --trusted-publishing=always
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.13
6 changes: 0 additions & 6 deletions MANIFEST.in

This file was deleted.

10 changes: 8 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ Repository = "https://github.com/ImageMarkup/isic-challenge-scoring"
isic-challenge-scoring = "isic_challenge_scoring.__main__:cli"

[dependency-groups]
dev = [
"tox",
"tox-uv",
]
lint = [
"flake8",
"flake8-black",
Expand All @@ -60,8 +64,7 @@ format = [
type = [
"mypy",
"pandas-stubs",
"microsoft-python-type-stubs @ git+https://github.com/microsoft/python-type-stubs.git",
{include-group = "test"},
"microsoft-python-type-stubs",
]
test = [
"pytest",
Expand All @@ -76,6 +79,9 @@ packages = [
[tool.hatch.version]
source = "vcs"

[tool.uv.sources]
microsoft-python-type-stubs = { git = "https://github.com/microsoft/python-type-stubs.git" }

[tool.black]
line-length = 100
skip-string-normalization = true
Expand Down
10 changes: 6 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
[tox]
min_version = 4.22
requires =
tox-uv
env_list =
lint,
type,
test,

[testenv]
# Building and installing wheels is significantly faster
package = wheel
runner = uv-venv-lock-runner

[testenv:lint]
package = skip
Expand All @@ -25,10 +26,9 @@ commands =
black .

[testenv:type]
# Editable ensures dependencies are installed, but full packaging isn't necessary
package = editable
dependency_groups =
type
test
commands =
mypy {posargs}

Expand All @@ -50,3 +50,5 @@ ignore =
W503,
# Missing docstring in *
D10,
extend-exclude =
.venv,
840 changes: 840 additions & 0 deletions uv.lock

Large diffs are not rendered by default.