ObjectNat 2.0.1__tar.gz → 2.1.0__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 (30) hide show
  1. {objectnat-2.0.1 → objectnat-2.1.0}/PKG-INFO +12 -6
  2. {objectnat-2.0.1 → objectnat-2.1.0}/README.rst +3 -0
  3. objectnat-2.1.0/objectnat/_version.py +1 -0
  4. {objectnat-2.0.1 → objectnat-2.1.0}/objectnat/methods/noise/noise_simulation.py +9 -11
  5. {objectnat-2.0.1 → objectnat-2.1.0}/pyproject.toml +15 -7
  6. objectnat-2.0.1/objectnat/_version.py +0 -1
  7. {objectnat-2.0.1 → objectnat-2.1.0}/.gitignore +0 -0
  8. {objectnat-2.0.1 → objectnat-2.1.0}/LICENSE.txt +0 -0
  9. {objectnat-2.0.1 → objectnat-2.1.0}/objectnat/__init__.py +0 -0
  10. {objectnat-2.0.1 → objectnat-2.1.0}/objectnat/_api.py +0 -0
  11. {objectnat-2.0.1 → objectnat-2.1.0}/objectnat/_config.py +0 -0
  12. {objectnat-2.0.1 → objectnat-2.1.0}/objectnat/methods/__init__.py +0 -0
  13. {objectnat-2.0.1 → objectnat-2.1.0}/objectnat/methods/accessibility/__init__.py +0 -0
  14. {objectnat-2.0.1 → objectnat-2.1.0}/objectnat/methods/accessibility/_utils.py +0 -0
  15. {objectnat-2.0.1 → objectnat-2.1.0}/objectnat/methods/accessibility/coverage.py +0 -0
  16. {objectnat-2.0.1 → objectnat-2.1.0}/objectnat/methods/accessibility/isochrones.py +0 -0
  17. {objectnat-2.0.1 → objectnat-2.1.0}/objectnat/methods/accessibility/radius.py +0 -0
  18. {objectnat-2.0.1 → objectnat-2.1.0}/objectnat/methods/noise/__init__.py +0 -0
  19. {objectnat-2.0.1 → objectnat-2.1.0}/objectnat/methods/noise/noise_init_data.py +0 -0
  20. {objectnat-2.0.1 → objectnat-2.1.0}/objectnat/methods/noise/noise_reduce.py +0 -0
  21. {objectnat-2.0.1 → objectnat-2.1.0}/objectnat/methods/noise/noise_simulation_simplified.py +0 -0
  22. {objectnat-2.0.1 → objectnat-2.1.0}/objectnat/methods/provision/__init__.py +0 -0
  23. {objectnat-2.0.1 → objectnat-2.1.0}/objectnat/methods/provision/provision.py +0 -0
  24. {objectnat-2.0.1 → objectnat-2.1.0}/objectnat/methods/provision/provision_calculating.py +0 -0
  25. {objectnat-2.0.1 → objectnat-2.1.0}/objectnat/methods/provision/provision_exceptions.py +0 -0
  26. {objectnat-2.0.1 → objectnat-2.1.0}/objectnat/methods/provision/provision_result.py +0 -0
  27. {objectnat-2.0.1 → objectnat-2.1.0}/objectnat/methods/utils/__init__.py +0 -0
  28. {objectnat-2.0.1 → objectnat-2.1.0}/objectnat/methods/utils/geom_utils.py +0 -0
  29. {objectnat-2.0.1 → objectnat-2.1.0}/objectnat/methods/visibility/__init__.py +0 -0
  30. {objectnat-2.0.1 → objectnat-2.1.0}/objectnat/methods/visibility/visibility_analysis.py +0 -0
@@ -1,17 +1,20 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: ObjectNat
3
- Version: 2.0.1
3
+ Version: 2.1.0
4
4
  Summary: ObjectNat is an open-source library for object-level geospatial analysis on city networks, developed by the IDU team.
5
5
  Author-email: DDonnyy <63115678+DDonnyy@users.noreply.github.com>
6
6
  License-Expression: BSD-3-Clause
7
7
  License-File: LICENSE.txt
8
- Requires-Python: <3.13,>=3.11
8
+ Requires-Python: <3.15,>=3.11
9
9
  Requires-Dist: geopandas<2.0.0,>=1.1.0
10
- Requires-Dist: iduedu<3.0.0,>=2.0.0
10
+ Requires-Dist: iduedu<3.0.0,>=2.2.0
11
11
  Requires-Dist: loguru<0.8.0,>=0.7.3
12
- Requires-Dist: numpy<3.0.0,>=2.4.0
13
- Requires-Dist: pandas<4.0.0,>=3.0.0
14
- Requires-Dist: scipy<2.0.0,>=1.17.0
12
+ Requires-Dist: numpy<3.0.0,>=2.0.0; python_version < '3.14'
13
+ Requires-Dist: numpy<3.0.0,>=2.4.0; python_version >= '3.14'
14
+ Requires-Dist: pandas<4.0.0,>=2.2.0; python_version < '3.14'
15
+ Requires-Dist: pandas<4.0.0,>=3.0.0; python_version >= '3.14'
16
+ Requires-Dist: scipy<2.0.0,>=1.16.0; python_version < '3.14'
17
+ Requires-Dist: scipy<2.0.0,>=1.17.0; python_version >= '3.14'
15
18
  Requires-Dist: tqdm<5.0.0,>=4.66.2
16
19
  Description-Content-Type: text/x-rst
17
20
 
@@ -153,6 +156,9 @@ Example usage::
153
156
  Installation
154
157
  ------------
155
158
 
159
+ ObjectNat supports Python 3.11–3.14 on Windows, macOS, and Linux. It installs
160
+ IduEdu 2.2.0 or newer within the 2.x series.
161
+
156
162
  **ObjectNat** can be installed via ``pip``::
157
163
 
158
164
  pip install ObjectNat
@@ -136,6 +136,9 @@ Example usage::
136
136
  Installation
137
137
  ------------
138
138
 
139
+ ObjectNat supports Python 3.11–3.14 on Windows, macOS, and Linux. It installs
140
+ IduEdu 2.2.0 or newer within the 2.x series.
141
+
139
142
  **ObjectNat** can be installed via ``pip``::
140
143
 
141
144
  pip install ObjectNat
@@ -0,0 +1 @@
1
+ VERSION = "2.1.0"
@@ -1,7 +1,7 @@
1
1
  import concurrent.futures
2
2
  import math
3
- import multiprocessing
4
3
  import time
4
+ from collections import deque
5
5
 
6
6
  import geopandas as gpd
7
7
  import pandas as pd
@@ -178,7 +178,7 @@ def simulate_noise(
178
178
  obstacles = obstacles[["absorb_ratio", "geometry"]]
179
179
 
180
180
  # creating initial task and simulating for each point
181
- task_queue = multiprocessing.Queue()
181
+ task_queue = deque()
182
182
  dead_area_dict = {}
183
183
  for ind, row in source_points.iterrows():
184
184
  source_point = row.geometry
@@ -208,7 +208,7 @@ def simulate_noise(
208
208
  "min_db": target_noise_db,
209
209
  "simulation_ind": ind,
210
210
  }
211
- task_queue.put((_noise_from_point_task, args, kwargs))
211
+ task_queue.append((_noise_from_point_task, args, kwargs))
212
212
  dead_area_dict[ind] = source_point.buffer(dead_area_r, quad_segs=2)
213
213
 
214
214
  noise_gdf = _recursive_simulation_queue(
@@ -544,11 +544,9 @@ def _noise_from_point_task(task, **kwargs) -> tuple[gpd.GeoDataFrame, list[tuple
544
544
  return noise_from_point, new_tasks
545
545
 
546
546
 
547
- def _recursive_simulation_queue(
548
- task_queue: multiprocessing.Queue, dead_area_dict: dict, dead_area_r: int, use_parallel: bool
549
- ):
547
+ def _recursive_simulation_queue(task_queue: deque, dead_area_dict: dict, dead_area_r: int, use_parallel: bool):
550
548
  results = []
551
- total_tasks = task_queue.qsize()
549
+ total_tasks = len(task_queue)
552
550
 
553
551
  with tqdm(total=total_tasks, desc="Simulating noise") as pbar:
554
552
  if use_parallel:
@@ -559,8 +557,8 @@ def _recursive_simulation_queue(
559
557
  max_workers = executor._max_workers # pylint: disable=protected-access
560
558
  future_to_task = {}
561
559
  while True:
562
- while not task_queue.empty() and len(future_to_task) < max_workers:
563
- func, task, kwargs = task_queue.get_nowait()
560
+ while task_queue and len(future_to_task) < max_workers:
561
+ func, task, kwargs = task_queue.popleft()
564
562
  future = executor.submit(func, task, **kwargs)
565
563
  future_to_task[future] = kwargs["simulation_ind"]
566
564
  done, _ = concurrent.futures.wait(future_to_task.keys(), return_when=concurrent.futures.FIRST_COMPLETED)
@@ -574,7 +572,7 @@ def _recursive_simulation_queue(
574
572
  for func, new_task, new_kwargs in new_tasks:
575
573
  new_point = new_task[0]
576
574
  if not local_dead_area.covers(new_point):
577
- task_queue.put((func, new_task, new_kwargs))
575
+ task_queue.append((func, new_task, new_kwargs))
578
576
  new_dead_area_points.append(new_point.buffer(dead_area_r, quad_segs=2))
579
577
  new_tasks_n += 1
580
578
  dead_area_dict[simulation_ind] = unary_union(new_dead_area_points)
@@ -584,6 +582,6 @@ def _recursive_simulation_queue(
584
582
  results.append(result)
585
583
  pbar.update(1)
586
584
  time.sleep(0.01)
587
- if not future_to_task and task_queue.empty():
585
+ if not future_to_task and not task_queue:
588
586
  break
589
587
  return results
@@ -3,7 +3,7 @@ name = "ObjectNat"
3
3
  dynamic = ["version"]
4
4
  description = "ObjectNat is an open-source library for object-level geospatial analysis on city networks, developed by the IDU team."
5
5
  readme = "README.rst"
6
- requires-python = ">=3.11,<3.13"
6
+ requires-python = ">=3.11,<3.15"
7
7
  license = "BSD-3-Clause"
8
8
  license-files = ["LICENSE.txt"]
9
9
  authors = [
@@ -11,11 +11,14 @@ authors = [
11
11
  ]
12
12
  dependencies = [
13
13
  "geopandas>=1.1.0,<2.0.0",
14
- "iduedu>=2.0.0,<3.0.0",
14
+ "iduedu>=2.2.0,<3.0.0",
15
15
  "loguru>=0.7.3,<0.8.0",
16
- "numpy>=2.4.0,<3.0.0",
17
- "pandas>=3.0.0,<4.0.0",
18
- "scipy>=1.17.0,<2.0.0",
16
+ "numpy>=2.0.0,<3.0.0; python_version < '3.14'",
17
+ "numpy>=2.4.0,<3.0.0; python_version >= '3.14'",
18
+ "pandas>=2.2.0,<4.0.0; python_version < '3.14'",
19
+ "pandas>=3.0.0,<4.0.0; python_version >= '3.14'",
20
+ "scipy>=1.16.0,<2.0.0; python_version < '3.14'",
21
+ "scipy>=1.17.0,<2.0.0; python_version >= '3.14'",
19
22
  "tqdm>=4.66.2,<5.0.0",
20
23
  ]
21
24
 
@@ -28,7 +31,6 @@ dev = [
28
31
  { include-group = "test" },
29
32
  { include-group = "viz" },
30
33
  "pre-commit>=4.2.0,<5.0.0",
31
- "pyarrow>=19.0.1,<20.0.0",
32
34
  ]
33
35
  docs = [
34
36
  "furo>=2025.9.25,<2026.0.0",
@@ -52,13 +54,18 @@ release = [
52
54
  "python-semantic-release>=9.15.0,<10.0.0",
53
55
  ]
54
56
  test = [
57
+ "matplotlib>=3.8.0,<4.0.0; python_version < '3.14'",
58
+ "matplotlib>=3.10.7,<4.0.0; python_version >= '3.14'",
59
+ "pyarrow>=18.1.0,<26.0.0; python_version < '3.14'",
60
+ "pyarrow>=22.0.0,<26.0.0; python_version >= '3.14'",
55
61
  "pytest>=8.3.5,<9.0.0",
56
62
  "pytest-cov>=6.0.0,<7.0.0",
57
63
  ]
58
64
  viz = [
59
65
  "folium>=0.19.5,<0.20.0",
60
66
  "mapclassify>=2.8.1,<3.0.0",
61
- "matplotlib>=3.10.1,<4.0.0",
67
+ "matplotlib>=3.8.0,<4.0.0; python_version < '3.14'",
68
+ "matplotlib>=3.10.7,<4.0.0; python_version >= '3.14'",
62
69
  ]
63
70
 
64
71
 
@@ -132,6 +139,7 @@ exclude_lines = [
132
139
 
133
140
  [tool.pytest.ini_options]
134
141
  testpaths = ["tests"]
142
+ markers = ["network: requires a live Overpass request to build an OSM graph"]
135
143
 
136
144
  # ---------------------------------------------------------------------------
137
145
  # Automated releases (python-semantic-release)
@@ -1 +0,0 @@
1
- VERSION = "2.0.1"
File without changes
File without changes
File without changes