NeoBase 0.36__tar.gz → 0.36.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. {neobase-0.36/src/NeoBase.egg-info → neobase-0.36.2}/PKG-INFO +1 -1
  2. {neobase-0.36 → neobase-0.36.2/src/NeoBase.egg-info}/PKG-INFO +1 -1
  3. {neobase-0.36 → neobase-0.36.2}/src/NeoBase.egg-info/scm_file_list.json +14 -14
  4. neobase-0.36.2/src/NeoBase.egg-info/scm_version.json +8 -0
  5. {neobase-0.36 → neobase-0.36.2}/src/neobase/neobase.py +8 -7
  6. {neobase-0.36 → neobase-0.36.2}/src/neobase/optd_por_public.csv +9125 -9118
  7. neobase-0.36/src/NeoBase.egg-info/scm_version.json +0 -8
  8. {neobase-0.36 → neobase-0.36.2}/LICENSE +0 -0
  9. {neobase-0.36 → neobase-0.36.2}/MANIFEST.in +0 -0
  10. {neobase-0.36 → neobase-0.36.2}/README.rst +0 -0
  11. {neobase-0.36 → neobase-0.36.2}/_config.yml +0 -0
  12. {neobase-0.36 → neobase-0.36.2}/doc/Makefile +0 -0
  13. {neobase-0.36 → neobase-0.36.2}/doc/conf.py +0 -0
  14. {neobase-0.36 → neobase-0.36.2}/doc/index.rst +0 -0
  15. {neobase-0.36 → neobase-0.36.2}/doc/make.bat +0 -0
  16. {neobase-0.36 → neobase-0.36.2}/pyproject.toml +0 -0
  17. {neobase-0.36 → neobase-0.36.2}/setup.cfg +0 -0
  18. {neobase-0.36 → neobase-0.36.2}/src/NeoBase.egg-info/SOURCES.txt +0 -0
  19. {neobase-0.36 → neobase-0.36.2}/src/NeoBase.egg-info/dependency_links.txt +0 -0
  20. {neobase-0.36 → neobase-0.36.2}/src/NeoBase.egg-info/entry_points.txt +0 -0
  21. {neobase-0.36 → neobase-0.36.2}/src/NeoBase.egg-info/top_level.txt +0 -0
  22. {neobase-0.36 → neobase-0.36.2}/src/neobase/__init__.py +0 -0
  23. {neobase-0.36 → neobase-0.36.2}/src/neobase/__main__.py +0 -0
  24. {neobase-0.36 → neobase-0.36.2}/src/neobase/py.typed +0 -0
  25. {neobase-0.36 → neobase-0.36.2}/src/neobase/version.py +0 -0
  26. {neobase-0.36 → neobase-0.36.2}/tox.ini +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: NeoBase
3
- Version: 0.36
3
+ Version: 0.36.2
4
4
  Summary: Python library to manipulate OpenTravelData
5
5
  Author-email: Alex Prengère <alex.prengere@gmail.com>
6
6
  Project-URL: Homepage, https://github.com/alexprengere/neobase
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: NeoBase
3
- Version: 0.36
3
+ Version: 0.36.2
4
4
  Summary: Python library to manipulate OpenTravelData
5
5
  Author-email: Alex Prengère <alex.prengere@gmail.com>
6
6
  Project-URL: Homepage, https://github.com/alexprengere/neobase
@@ -1,27 +1,27 @@
1
1
  {
2
2
  "files": [
3
- "tox.ini",
3
+ ".github/workflows/pre-commit.yml",
4
+ ".github/workflows/python-package.yml",
5
+ ".gitignore",
4
6
  ".pre-commit-config.yaml",
7
+ "LICENSE",
5
8
  "MANIFEST.in",
6
9
  "README.rst",
7
- "update_data.sh",
8
10
  "_config.yml",
9
- "pyproject.toml",
10
- "LICENSE",
11
- ".gitignore",
12
- ".github/workflows/pre-commit.yml",
13
- ".github/workflows/python-package.yml",
14
- "tests/test_neobase.py",
15
- "tests/conftest.py",
16
- "doc/index.rst",
17
- "doc/conf.py",
18
11
  "doc/Makefile",
12
+ "doc/conf.py",
13
+ "doc/index.rst",
19
14
  "doc/make.bat",
20
- "src/neobase/optd_por_public.csv",
15
+ "pyproject.toml",
16
+ "src/neobase/__init__.py",
17
+ "src/neobase/__main__.py",
21
18
  "src/neobase/neobase.py",
19
+ "src/neobase/optd_por_public.csv",
22
20
  "src/neobase/py.typed",
23
- "src/neobase/__init__.py",
24
21
  "src/neobase/version.py",
25
- "src/neobase/__main__.py"
22
+ "tests/conftest.py",
23
+ "tests/test_neobase.py",
24
+ "tox.ini",
25
+ "update_data.sh"
26
26
  ]
27
27
  }
@@ -0,0 +1,8 @@
1
+ {
2
+ "tag": "0.36.2",
3
+ "distance": 0,
4
+ "node": "gd8b212abe2eca7be074eb968671cd8bea49d05d0",
5
+ "dirty": false,
6
+ "branch": "HEAD",
7
+ "node_date": "2026-08-18"
8
+ }
@@ -45,6 +45,7 @@ FieldValue: TypeAlias = Any
45
45
  PointData: TypeAlias = dict[str, FieldValue]
46
46
  Splitter: TypeAlias = Callable[[str], FieldValue]
47
47
  DistanceResult: TypeAlias = tuple[float, str]
48
+ LatLngTuple: TypeAlias = tuple[float, float]
48
49
 
49
50
 
50
51
  class LatLng(NamedTuple):
@@ -346,8 +347,8 @@ class NeoBase:
346
347
 
347
348
  @staticmethod
348
349
  def distance_between_locations(
349
- l0: LatLng | None,
350
- l1: LatLng | None,
350
+ l0: LatLngTuple | None,
351
+ l1: LatLngTuple | None,
351
352
  ) -> float | None:
352
353
  """Great circle distance
353
354
 
@@ -412,7 +413,7 @@ class NeoBase:
412
413
 
413
414
  def _build_distances(
414
415
  self,
415
- lat_lng_ref: LatLng | None,
416
+ lat_lng_ref: LatLngTuple | None,
416
417
  keys: Iterable[str | None],
417
418
  ) -> Iterator[DistanceResult]:
418
419
  """
@@ -421,7 +422,7 @@ class NeoBase:
421
422
  geocodes will not appear in the results.
422
423
 
423
424
  >>> b = NeoBase()
424
- >>> list(b._build_distances((0,0), ['ORY', 'CDG']))
425
+ >>> list(b._build_distances((0, 0), ['ORY', 'CDG']))
425
426
  [(5422.74..., 'ORY'), (5455.45..., 'CDG')]
426
427
  """
427
428
  if lat_lng_ref is None:
@@ -437,7 +438,7 @@ class NeoBase:
437
438
  if d is None:
438
439
  continue
439
440
  try:
440
- lat_lng = LatLng(
441
+ lat_lng = (
441
442
  float(cast("str", d["lat"])),
442
443
  float(cast("str", d["lng"])),
443
444
  )
@@ -450,7 +451,7 @@ class NeoBase:
450
451
 
451
452
  def find_near_location(
452
453
  self,
453
- lat_lng: LatLng | None,
454
+ lat_lng: LatLngTuple | None,
454
455
  radius: float = _DEFAULT_RADIUS,
455
456
  from_keys: Iterable[str | None] | None = None,
456
457
  ) -> Iterator[DistanceResult]:
@@ -515,7 +516,7 @@ class NeoBase:
515
516
 
516
517
  def find_closest_from_location(
517
518
  self,
518
- lat_lng: LatLng | None,
519
+ lat_lng: LatLngTuple | None,
519
520
  N: int = 1,
520
521
  from_keys: Iterable[str | None] | None = None,
521
522
  ) -> Iterator[DistanceResult]: