Skip to content

Commit 52cced6

Browse files
committed
Add lookup_lrms to the pyi interface description.
Fixes #122 Signed-off-by: Tristram Gräbener <tristram+git@tristramg.eu>
1 parent 2847b5a commit 52cced6

File tree

6 files changed

+14
-5
lines changed

6 files changed

+14
-5
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "liblrs"
3-
version = "0.4.0"
3+
version = "0.4.1"
44
edition = "2024"
55
description = "Library to manipulate linear referencing systems"
66
license = "MIT"

python/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "liblrs_python"
33
description = "Python bindings for liblrs: a library to work with linear referencing systems"
4-
version = "0.4.0"
4+
version = "0.4.1"
55
edition = "2024"
66
license = "MIT"
77
repository = "https://github.com/OpenRailAssociation/liblrs/"

python/liblrs_python.pyi

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,15 @@ class Lrs:
245245
"""
246246
...
247247

248+
def lookup_lrms(self, point:Point) -> list<LrmProjection>:
249+
r"""
250+
Projects a [`Point`] on all applicable [`Traversal`]s nearby.
251+
The [`Point`] must be in the bounding box of the [`Curve`] of the [`Traversal`].
252+
The result is sorted by `orthogonal_offset`: the nearest [`Lrm`] to the [`Point`] is the first item.
253+
"""
254+
...
255+
256+
248257
def lrs_properties(self) -> dict[str, str]:
249258
r"""
250259
[`Properties`] of the lrs

python/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "liblrs_python"
3-
version = "0.4.0"
3+
version = "0.4.1"
44
requires-python = ">=3.12"
55
dependencies = ["pip>=25.2"]
66

wasm/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "liblrs-wasm"
3-
version = "0.4.0"
3+
version = "0.4.1"
44
edition = "2024"
55

66
[lib]

wasm/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"text-encoding": "^0.7.0"
2222
},
2323
"name": "liblrs",
24-
"version": "0.4.0",
24+
"version": "0.4.1",
2525
"repository": {
2626
"type": "git",
2727
"url": "git+https://github.com/OpenRailAssociation/liblrs.git"

0 commit comments

Comments
 (0)