ObjectNat 0.2.2__tar.gz → 0.2.4__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.

Potentially problematic release.


This version of ObjectNat might be problematic. Click here for more details.

Files changed (22) hide show
  1. {objectnat-0.2.2 → objectnat-0.2.4}/PKG-INFO +3 -3
  2. {objectnat-0.2.2 → objectnat-0.2.4}/pyproject.toml +3 -3
  3. {objectnat-0.2.2 → objectnat-0.2.4}/src/objectnat/_config.py +4 -0
  4. objectnat-0.2.4/src/objectnat/_version.py +1 -0
  5. {objectnat-0.2.2 → objectnat-0.2.4}/src/objectnat/methods/provision/provision.py +2 -2
  6. objectnat-0.2.2/src/objectnat/methods/provision/city_provision.py → objectnat-0.2.4/src/objectnat/methods/provision/provision_model.py +6 -7
  7. objectnat-0.2.2/src/objectnat/_version.py +0 -1
  8. {objectnat-0.2.2 → objectnat-0.2.4}/LICENSE.txt +0 -0
  9. {objectnat-0.2.2 → objectnat-0.2.4}/README.md +0 -0
  10. {objectnat-0.2.2 → objectnat-0.2.4}/src/objectnat/__init__.py +0 -0
  11. {objectnat-0.2.2 → objectnat-0.2.4}/src/objectnat/_api.py +0 -0
  12. {objectnat-0.2.2 → objectnat-0.2.4}/src/objectnat/methods/__init__.py +0 -0
  13. {objectnat-0.2.2 → objectnat-0.2.4}/src/objectnat/methods/balanced_buildings.py +0 -0
  14. {objectnat-0.2.2 → objectnat-0.2.4}/src/objectnat/methods/cluster_points_in_polygons.py +0 -0
  15. {objectnat-0.2.2 → objectnat-0.2.4}/src/objectnat/methods/coverage_zones.py +0 -0
  16. {objectnat-0.2.2 → objectnat-0.2.4}/src/objectnat/methods/isochrones.py +0 -0
  17. {objectnat-0.2.2 → objectnat-0.2.4}/src/objectnat/methods/living_buildings_osm.py +0 -0
  18. {objectnat-0.2.2 → objectnat-0.2.4}/src/objectnat/methods/provision/__init__.py +0 -0
  19. {objectnat-0.2.2 → objectnat-0.2.4}/src/objectnat/methods/provision/provision_exceptions.py +0 -0
  20. {objectnat-0.2.2 → objectnat-0.2.4}/src/objectnat/methods/visibility_analysis.py +0 -0
  21. {objectnat-0.2.2 → objectnat-0.2.4}/src/objectnat/utils/__init__.py +0 -0
  22. {objectnat-0.2.2 → objectnat-0.2.4}/src/objectnat/utils/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ObjectNat
3
- Version: 0.2.2
3
+ Version: 0.2.4
4
4
  Summary: ObjectNat is an open-source library created for geospatial analysis created by IDU team
5
5
  License: BSD-3-Clause
6
6
  Author: DDonnyy
@@ -12,9 +12,9 @@ Classifier: Programming Language :: Python :: 3.10
12
12
  Classifier: Programming Language :: Python :: 3.11
13
13
  Classifier: Programming Language :: Python :: 3.12
14
14
  Requires-Dist: geopandas (>=0.14.3,<0.15.0)
15
- Requires-Dist: iduedu (>=0.1.4,<0.2.0)
15
+ Requires-Dist: iduedu (>=0.2.0,<0.3.0)
16
16
  Requires-Dist: joblib (>=1.4.2,<2.0.0)
17
- Requires-Dist: networkit (>=11.0,<12.0)
17
+ Requires-Dist: jupyter (>=1.1.1,<2.0.0)
18
18
  Requires-Dist: networkx (>=3.2.1,<4.0.0)
19
19
  Requires-Dist: numpy (>=1.23.5,<2.0.0)
20
20
  Requires-Dist: pandarallel (>=1.6.5,<2.0.0)
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "ObjectNat"
3
- version = "0.2.2"
3
+ version = "0.2.4"
4
4
  description = "ObjectNat is an open-source library created for geospatial analysis created by IDU team"
5
5
  license = "BSD-3-Clause"
6
6
  authors = ["DDonnyy <63115678+DDonnyy@users.noreply.github.com>"]
@@ -16,12 +16,12 @@ geopandas = "^0.14.3"
16
16
  tqdm = "^4.66.2"
17
17
  pandarallel = "^1.6.5"
18
18
  networkx = "^3.2.1"
19
- networkit = "^11.0"
20
19
  pulp = "^2.8.0"
21
20
  population-restorator = "^0.2.3"
22
- iduedu = "^0.1.4"
21
+ iduedu = "^0.2.0"
23
22
  joblib = "^1.4.2"
24
23
  scikit-learn = "^1.4.0"
24
+ jupyter = "^1.1.1"
25
25
 
26
26
 
27
27
  [tool.poetry.group.dev.dependencies]
@@ -44,6 +44,7 @@ class Config:
44
44
  self.enable_tqdm_bar = enable_tqdm_bar
45
45
  self.logger = logger
46
46
  self.iduedu_config = iduedu_config
47
+ self.pandarallel_use_file_system = False
47
48
 
48
49
  def change_logger_lvl(self, lvl: Literal["TRACE", "DEBUG", "INFO", "WARN", "ERROR"]):
49
50
  self.logger.remove()
@@ -62,6 +63,9 @@ class Config:
62
63
  self.enable_tqdm_bar = enable
63
64
  self.iduedu_config.set_enable_tqdm(enable)
64
65
 
66
+ def set_pandarallel_use_file_system(self, enable: bool):
67
+ self.pandarallel_use_file_system = enable
68
+
65
69
 
66
70
  config = Config()
67
71
  config.change_logger_lvl("INFO")
@@ -0,0 +1 @@
1
+ VERSION = "0.2.4"
@@ -4,7 +4,7 @@ import geopandas as gpd
4
4
  import numpy as np
5
5
  import pandas as pd
6
6
 
7
- from .city_provision import CityProvision
7
+ from .provision_model import Provision
8
8
 
9
9
 
10
10
  def get_service_provision(
@@ -34,7 +34,7 @@ def get_service_provision(
34
34
  buildings["demand"] = buildings[buildings_demand_column]
35
35
  services["capacity"] = services[services_capacity_column]
36
36
 
37
- provision_buildings, provision_services, provision_links = CityProvision(
37
+ provision_buildings, provision_services, provision_links = Provision(
38
38
  services=services,
39
39
  demanded_buildings=buildings,
40
40
  adjacency_matrix=adjacency_matrix,
@@ -4,8 +4,9 @@ from typing import Tuple
4
4
  import geopandas as gpd
5
5
  import numpy as np
6
6
  import pandas as pd
7
- from shapely import LineString
8
7
  from pandarallel import pandarallel
8
+ from shapely import LineString
9
+
9
10
  from objectnat import config
10
11
 
11
12
  from .provision_exceptions import CapacityKeyError, DemandKeyError
@@ -13,7 +14,7 @@ from .provision_exceptions import CapacityKeyError, DemandKeyError
13
14
  logger = config.logger
14
15
 
15
16
 
16
- class CityProvision:
17
+ class Provision:
17
18
  """
18
19
  Represents the logic for city provision calculations using a gravity or linear model.
19
20
 
@@ -25,7 +26,7 @@ class CityProvision:
25
26
  calculation_type (str, optional): Type of calculation ("gravity" or "linear"). Defaults to "gravity".
26
27
 
27
28
  Returns:
28
- CityProvision: The CityProvision object.
29
+ Provision: The CityProvision object.
29
30
 
30
31
  Raises: KeyError: If the 'demand' column is missing in the provided 'demanded_buildings' GeoDataFrame,
31
32
  or if the 'capacity' column is missing in the provided 'services' GeoDataFrame. ValueError: If the 'capacity'
@@ -46,7 +47,8 @@ class CityProvision:
46
47
  self.adjacency_matrix = self.delete_useless_matrix_rows_columns(adjacency_matrix, demanded_buildings, services)
47
48
  self.threshold = threshold
48
49
  self.check_crs(self.demanded_buildings, self.services)
49
- pandarallel.initialize(progress_bar=False, verbose=0)
50
+ print(config.pandarallel_use_file_system)
51
+ pandarallel.initialize(progress_bar=False, verbose=0, use_memory_fs=config.pandarallel_use_file_system)
50
52
 
51
53
  @staticmethod
52
54
  def ensure_buildings(v: gpd.GeoDataFrame) -> gpd.GeoDataFrame:
@@ -112,9 +114,6 @@ class CityProvision:
112
114
  self.threshold,
113
115
  )
114
116
 
115
- # self.demanded_buildings['provision_value'] = self.demanded_buildings['provision_value'].fillna(0)
116
- # self.services = self.services.fillna(0)
117
-
118
117
  return (
119
118
  self.demanded_buildings,
120
119
  self.services,
@@ -1 +0,0 @@
1
- VERSION = "0.2.2"
File without changes
File without changes