NeoBase 0.35__tar.gz → 0.35.1__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.
- {neobase-0.35/src/NeoBase.egg-info → neobase-0.35.1}/PKG-INFO +3 -3
- {neobase-0.35 → neobase-0.35.1}/README.rst +1 -1
- {neobase-0.35 → neobase-0.35.1}/pyproject.toml +5 -5
- {neobase-0.35 → neobase-0.35.1/src/NeoBase.egg-info}/PKG-INFO +3 -3
- neobase-0.35.1/src/NeoBase.egg-info/scm_version.json +8 -0
- {neobase-0.35 → neobase-0.35.1}/src/neobase/neobase.py +9 -16
- {neobase-0.35 → neobase-0.35.1}/tox.ini +2 -2
- neobase-0.35/src/NeoBase.egg-info/scm_version.json +0 -8
- {neobase-0.35 → neobase-0.35.1}/LICENSE +0 -0
- {neobase-0.35 → neobase-0.35.1}/MANIFEST.in +0 -0
- {neobase-0.35 → neobase-0.35.1}/_config.yml +0 -0
- {neobase-0.35 → neobase-0.35.1}/doc/Makefile +0 -0
- {neobase-0.35 → neobase-0.35.1}/doc/conf.py +0 -0
- {neobase-0.35 → neobase-0.35.1}/doc/index.rst +0 -0
- {neobase-0.35 → neobase-0.35.1}/doc/make.bat +0 -0
- {neobase-0.35 → neobase-0.35.1}/setup.cfg +0 -0
- {neobase-0.35 → neobase-0.35.1}/src/NeoBase.egg-info/SOURCES.txt +0 -0
- {neobase-0.35 → neobase-0.35.1}/src/NeoBase.egg-info/dependency_links.txt +0 -0
- {neobase-0.35 → neobase-0.35.1}/src/NeoBase.egg-info/entry_points.txt +0 -0
- {neobase-0.35 → neobase-0.35.1}/src/NeoBase.egg-info/scm_file_list.json +0 -0
- {neobase-0.35 → neobase-0.35.1}/src/NeoBase.egg-info/top_level.txt +0 -0
- {neobase-0.35 → neobase-0.35.1}/src/neobase/__init__.py +0 -0
- {neobase-0.35 → neobase-0.35.1}/src/neobase/__main__.py +0 -0
- {neobase-0.35 → neobase-0.35.1}/src/neobase/optd_por_public.csv +0 -0
- {neobase-0.35 → neobase-0.35.1}/src/neobase/version.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: NeoBase
|
|
3
|
-
Version: 0.35
|
|
3
|
+
Version: 0.35.1
|
|
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
|
|
@@ -9,7 +9,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
9
9
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
10
10
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
11
11
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
12
|
-
Requires-Python: >=3.
|
|
12
|
+
Requires-Python: >=3.11
|
|
13
13
|
Description-Content-Type: text/x-rst
|
|
14
14
|
License-File: LICENSE
|
|
15
15
|
Dynamic: license-file
|
|
@@ -30,7 +30,7 @@ Minimalist `GeoBases <https://github.com/opentraveldata/geobases/>`__
|
|
|
30
30
|
implementation:
|
|
31
31
|
|
|
32
32
|
- no dependencies
|
|
33
|
-
- compatible with Python 3.
|
|
33
|
+
- compatible with Python 3.11+, CPython and PyPy
|
|
34
34
|
- one data source:
|
|
35
35
|
`opentraveldata <https://github.com/opentraveldata/opentraveldata>`__
|
|
36
36
|
- one Python module for easier distribution on clusters (like Hadoop)
|
|
@@ -14,7 +14,7 @@ Minimalist `GeoBases <https://github.com/opentraveldata/geobases/>`__
|
|
|
14
14
|
implementation:
|
|
15
15
|
|
|
16
16
|
- no dependencies
|
|
17
|
-
- compatible with Python 3.
|
|
17
|
+
- compatible with Python 3.11+, CPython and PyPy
|
|
18
18
|
- one data source:
|
|
19
19
|
`opentraveldata <https://github.com/opentraveldata/opentraveldata>`__
|
|
20
20
|
- one Python module for easier distribution on clusters (like Hadoop)
|
|
@@ -10,7 +10,7 @@ readme = "README.rst"
|
|
|
10
10
|
authors = [
|
|
11
11
|
{name = "Alex Prengère", email = "alex.prengere@gmail.com"},
|
|
12
12
|
]
|
|
13
|
-
requires-python = ">=3.
|
|
13
|
+
requires-python = ">=3.11"
|
|
14
14
|
license-files = ["LICENSE"]
|
|
15
15
|
classifiers = [
|
|
16
16
|
"Development Status :: 5 - Production/Stable",
|
|
@@ -36,7 +36,7 @@ include = ["neobase*",]
|
|
|
36
36
|
[dependency-groups]
|
|
37
37
|
test = [
|
|
38
38
|
"pytz>=2024",
|
|
39
|
-
"pytest>=
|
|
39
|
+
"pytest>=9.0",
|
|
40
40
|
"pytest-cov>=5.0",
|
|
41
41
|
"pytest-benchmark>=5.1",
|
|
42
42
|
]
|
|
@@ -89,7 +89,7 @@ show_contexts = true
|
|
|
89
89
|
|
|
90
90
|
[tool.ruff]
|
|
91
91
|
line-length = 100
|
|
92
|
-
target-version = "
|
|
92
|
+
target-version = "py311"
|
|
93
93
|
extend-exclude = ["doc"]
|
|
94
94
|
|
|
95
95
|
[tool.ruff.lint]
|
|
@@ -122,11 +122,11 @@ ignore = [
|
|
|
122
122
|
"module-import-not-at-top-of-file",
|
|
123
123
|
"ambiguous-unicode-character-string",
|
|
124
124
|
"collection-literal-concatenation",
|
|
125
|
-
"
|
|
125
|
+
"mutable-class-default",
|
|
126
126
|
]
|
|
127
127
|
preview = true
|
|
128
128
|
|
|
129
129
|
[tool.black]
|
|
130
130
|
line-length = 88
|
|
131
|
-
target-version = ["
|
|
131
|
+
target-version = ["py311"]
|
|
132
132
|
force_exclude = "doc/*"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: NeoBase
|
|
3
|
-
Version: 0.35
|
|
3
|
+
Version: 0.35.1
|
|
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
|
|
@@ -9,7 +9,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
9
9
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
10
10
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
11
11
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
12
|
-
Requires-Python: >=3.
|
|
12
|
+
Requires-Python: >=3.11
|
|
13
13
|
Description-Content-Type: text/x-rst
|
|
14
14
|
License-File: LICENSE
|
|
15
15
|
Dynamic: license-file
|
|
@@ -30,7 +30,7 @@ Minimalist `GeoBases <https://github.com/opentraveldata/geobases/>`__
|
|
|
30
30
|
implementation:
|
|
31
31
|
|
|
32
32
|
- no dependencies
|
|
33
|
-
- compatible with Python 3.
|
|
33
|
+
- compatible with Python 3.11+, CPython and PyPy
|
|
34
34
|
- one data source:
|
|
35
35
|
`opentraveldata <https://github.com/opentraveldata/opentraveldata>`__
|
|
36
36
|
- one Python module for easier distribution on clusters (like Hadoop)
|
|
@@ -20,28 +20,17 @@ from importlib.resources import files
|
|
|
20
20
|
from os import getenv
|
|
21
21
|
import operator
|
|
22
22
|
from datetime import datetime
|
|
23
|
-
from collections import namedtuple
|
|
24
23
|
from math import pi, cos, sin, asin, sqrt, fsum
|
|
25
|
-
from itertools import starmap
|
|
24
|
+
from itertools import starmap, pairwise
|
|
25
|
+
from typing import NamedTuple
|
|
26
26
|
import csv
|
|
27
27
|
import heapq
|
|
28
|
+
from collections.abc import Callable, Sequence
|
|
28
29
|
|
|
29
30
|
from functools import partial
|
|
30
31
|
|
|
31
32
|
open_ = partial(open, encoding="utf-8")
|
|
32
33
|
|
|
33
|
-
try:
|
|
34
|
-
# This is only available for Python3.10+
|
|
35
|
-
from itertools import pairwise
|
|
36
|
-
except ImportError:
|
|
37
|
-
from itertools import tee
|
|
38
|
-
|
|
39
|
-
def pairwise(iterable):
|
|
40
|
-
# pairwise('ABCDEFG') --> AB BC CD DE EF FG
|
|
41
|
-
a, b = tee(iterable)
|
|
42
|
-
next(b, None)
|
|
43
|
-
return zip(a, b)
|
|
44
|
-
|
|
45
34
|
|
|
46
35
|
__all__ = ["OPTD_POR_URL", "LatLng", "NeoBase", "UnknownKeyError"]
|
|
47
36
|
|
|
@@ -52,7 +41,11 @@ OPTD_POR_URL = (
|
|
|
52
41
|
|
|
53
42
|
_DEF_OPTD_POR_FILE = "optd_por_public.csv"
|
|
54
43
|
_DEFAULT_RADIUS = 50
|
|
55
|
-
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
class LatLng(NamedTuple):
|
|
47
|
+
lat: float
|
|
48
|
+
lng: float
|
|
56
49
|
|
|
57
50
|
|
|
58
51
|
class UnknownKeyError(KeyError):
|
|
@@ -67,7 +60,7 @@ class NeoBase:
|
|
|
67
60
|
"""Main structure, a wrapper around a dict, with dict-like behavior."""
|
|
68
61
|
|
|
69
62
|
KEY = 0 # iata_code
|
|
70
|
-
FIELDS = (
|
|
63
|
+
FIELDS: Sequence[tuple[str, int, Callable | None]] = (
|
|
71
64
|
("iata_code", 0, None),
|
|
72
65
|
("name", 6, None),
|
|
73
66
|
("lat", 8, None),
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|