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
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ permissions:
env:
RUNNER: &runner "ubuntu-24.04"
JOB_TIMEOUT: &job_timeout 30
TOOL_PYTHON_VERSION: "3.10"
TOOL_PYTHON_VERSION: "3.11"
HATCH_VERSION: "1.18.1"
UV_VERSION: "0.13.4"
DISTRIBUTION_NAME: "spanmark"
Expand Down Expand Up @@ -52,6 +52,8 @@ jobs:
run: uv tool install "hatch==$HATCH_VERSION"

- name: Run pre-commit
env:
GH_TOKEN: ${{ github.token }}
run: hatch run pre-commit:ci

discover-tests:
Expand Down
15 changes: 10 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
default_language_version:
python: python3.10
python: python3.11

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
Expand All @@ -21,16 +21,21 @@ repos:
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]

- repo: https://github.com/tox-dev/pyproject-fmt
rev: v2.30.3
hooks:
- id: pyproject-fmt

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.16.6 # keep consistent with hatch config
rev: v0.17.1 # keep consistent with hatch config
hooks:
# Run the linter
- id: ruff-check
types_or: [python, pyi, jupyter]
types_or: [python, pyi, jupyter, markdown]
args: [--fix, --config=pyproject.toml]
# Run the formatter
- id: ruff-format
types_or: [python, pyi, jupyter]
types_or: [python, pyi, jupyter, markdown]
args: [--config=pyproject.toml]

- repo: https://github.com/rhysd/actionlint
Expand All @@ -39,7 +44,7 @@ repos:
- id: actionlint

- repo: https://github.com/zizmorcore/zizmor-pre-commit
rev: v1.29.0
rev: v1.31.1
hooks:
- id: zizmor

Expand Down
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Such datasets are needed for the training and evaluation of **span recognition**

## Installation

`spanmark` requires Python 3.10 or later (see [compatibility and versioning](#compatibility-and-versioning)).
`spanmark` requires Python 3.11 or later (see [compatibility and versioning](#compatibility-and-versioning)).

Install the latest release from [PyPI](https://pypi.org/project/spanmark/):

Expand Down Expand Up @@ -159,19 +159,19 @@ Prepare a sequence of documents:

```python
{
"id": "doc-1",
"text": "Alice joined Acme.",
"meta": {
"source": "demo"
},
"suggestions": [
{
"start": 0,
"end": 5,
"label": "PERSON",
"score": 0.97
}
]
"id": "doc-1",
"text": "Alice joined Acme.",
"meta": {
"source": "demo",
},
"suggestions": [
{
"start": 0,
"end": 5,
"label": "PERSON",
"score": 0.97,
}
],
}
```

Expand Down Expand Up @@ -273,7 +273,7 @@ The output JSONL contains one document record per line, for example:
{"start": 13, "end": 17, "label": "ORG", "source": "user"}
],
"answer": "accept",
"flagged": false
"flagged": false,
}
}
```
Expand Down
4 changes: 4 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## [Unreleased]

### Removed

- Support for Python 3.10, making Python 3.11 the minimum supported version

## [0.1.1] - 2026-09-10

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ For code contributions you will need:
- A GitHub account
- A development environment with:

- Python 3.10 (the minimum version of Python supported)
- Python 3.11 (the minimum version of Python supported)
- `hatch>=1.17`
- Access to the internet for GitHub and installation of packages from PyPI

Expand Down Expand Up @@ -99,7 +99,7 @@ Only the checks and definition-of-done items relevant to the change need to appl
hatch test tests/test_foo.py # One file
hatch test tests/test_foo.py::test_bar # One test
hatch test -k roundtrip # Tests matching an expression
hatch test --python 3.10 tests/test_foo.py # One file, one Python version
hatch test --python 3.11 tests/test_foo.py # One file, one Python version
```

Use these commands for a fast iterative development loop.
Expand Down
Loading
Loading