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: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ permissions:
env:
RUNNER: &runner "ubuntu-24.04"
JOB_TIMEOUT: &job_timeout 30
TOOL_PYTHON_VERSION: "3.12"
TOOL_PYTHON_VERSION: "3.10"
HATCH_VERSION: "1.18.0"
UV_VERSION: "0.12.5"
UV_VERSION: "0.12.13"
DISTRIBUTION_NAME: "spanwend"
IMPORT_NAME: "spanwend"
DOCS_ENABLED: "false"
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ Encoding and conversion preserve span boundaries and labels, and report when a t
`spanwend` requires Python 3.10 or later (see [compatibility and versioning](#compatibility-and-versioning)).
It has no runtime dependencies.

Install the latest release from [PyPI](https://pypi.org/project/spanwend/):
`spanwend` is available from [PyPI](https://pypi.org/project/quirer/).
Install it with your preferred Python package manager.
For example, using `pip`:

```shell
python -m pip install spanwend
Expand Down Expand Up @@ -196,8 +198,7 @@ Scheme name inputs are case-insensitive. spanwend supports the following schemes
| BMES | `bmes` | — | `B`, `M`, `E`, `S` | — |
| BMEOW / BMEWO | `bmeow` | `bmewo` | `B`, `M`, `E`, `W` | — |

The bare name `"iob"` is deliberately rejected because it is ambiguous: use
`"iob1"` for IOB1 or `"bio"`/`"iob2"` for BIO/IOB2.
The bare name `"iob"` is rejected because it is ambiguous: use `"iob1"` for IOB1 or `"bio"`/`"iob2"` for BIO/IOB2.

### Spans

Expand Down Expand Up @@ -307,7 +308,7 @@ For releases before `1.0.0`, the public API should be considered under developme

This project supports Python feature releases from their official final release until their official end-of-life (EOL).

Support for a new Python feature release is generally introduced in the first minor release of spanwend following the upstream Python release.
Support for a new Python feature release is generally introduced in the first minor release of this project following the upstream Python release.
Python feature releases may be dropped once they reach the end of their upstream support cycle.
The currently supported Python versions are declared in the package metadata.

Expand Down
11 changes: 3 additions & 8 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@ Thank you for considering making a contribution.
- `hatch>=1.17`
- Access to the internet for GitHub and installation of packages from PyPI

If `hatch` is not available in your development environment, install it by running

```shell
uv tool install "hatch>=1.17"
```
If Hatch is not available in your development environment, see the [Hatch installation instructions](https://hatch.pypa.io/latest/install/).

## Setup

Expand Down Expand Up @@ -60,15 +56,14 @@ The core package is intentionally dependency-free; a new runtime dependency requ

### Checks

Making a pull request normally triggers CI checks, which must pass before the pull request can be merged into main.
Pull requests must pass checks in CI before they can be merged into main.

Run these same checks in your development environment and fix any problems before opening a pull request:
Run the same checks in your development environment and fix any problems before opening a pull request

```shell
hatch check code --fix # Check and fix linting and formatting using ruff - Note that this mutates files
hatch check types # Check type annotations using pyrefly
hatch test --all # Run tests using pytest for all locally available versions of python in the matrix
hatch run docs:build # Build the Zensical documentation site
hatch run pre-commit:ci # Run all pre-commit hooks
```

Expand Down
14 changes: 12 additions & 2 deletions src/spanwend/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
"""Loss-aware operations for sequence tags and labelled spans."""
"""A library for working with sequence-tagging schemes."""

from importlib.metadata import PackageNotFoundError, version

from spanwend._api import (
check_conformance,
Expand All @@ -18,10 +20,17 @@
from spanwend._span import Span
from spanwend._syntax import DEFAULT_SYNTAX, TagSyntax

try:
__version__ = version("spanwend")
except PackageNotFoundError:
__version__ = "unknown"
finally:
del PackageNotFoundError, version

__all__ = [
"DEFAULT_SYNTAX",
"ConfiguredScheme",
"ConformanceResult",
"DEFAULT_SYNTAX",
"Diagnostic",
"DiagnosticCode",
"InvalidTagSequenceError",
Expand All @@ -36,6 +45,7 @@
"SpanwendError",
"TagSyntax",
"UnrepresentableError",
"__version__",
"check_conformance",
"check_representability",
"convert",
Expand Down