ObjectNat 0.2.2__tar.gz → 0.2.3__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.3}/PKG-INFO +2 -1
  2. {objectnat-0.2.2 → objectnat-0.2.3}/pyproject.toml +2 -1
  3. {objectnat-0.2.2 → objectnat-0.2.3}/src/objectnat/_config.py +4 -0
  4. objectnat-0.2.3/src/objectnat/_version.py +1 -0
  5. {objectnat-0.2.2 → objectnat-0.2.3}/src/objectnat/methods/provision/provision.py +2 -2
  6. objectnat-0.2.2/src/objectnat/methods/provision/city_provision.py → objectnat-0.2.3/src/objectnat/methods/provision/provision_model.py +4 -3
  7. objectnat-0.2.2/src/objectnat/_version.py +0 -1
  8. {objectnat-0.2.2 → objectnat-0.2.3}/LICENSE.txt +0 -0
  9. {objectnat-0.2.2 → objectnat-0.2.3}/README.md +0 -0
  10. {objectnat-0.2.2 → objectnat-0.2.3}/src/objectnat/__init__.py +0 -0
  11. {objectnat-0.2.2 → objectnat-0.2.3}/src/objectnat/_api.py +0 -0
  12. {objectnat-0.2.2 → objectnat-0.2.3}/src/objectnat/methods/__init__.py +0 -0
  13. {objectnat-0.2.2 → objectnat-0.2.3}/src/objectnat/methods/balanced_buildings.py +0 -0
  14. {objectnat-0.2.2 → objectnat-0.2.3}/src/objectnat/methods/cluster_points_in_polygons.py +0 -0
  15. {objectnat-0.2.2 → objectnat-0.2.3}/src/objectnat/methods/coverage_zones.py +0 -0
  16. {objectnat-0.2.2 → objectnat-0.2.3}/src/objectnat/methods/isochrones.py +0 -0
  17. {objectnat-0.2.2 → objectnat-0.2.3}/src/objectnat/methods/living_buildings_osm.py +0 -0
  18. {objectnat-0.2.2 → objectnat-0.2.3}/src/objectnat/methods/provision/__init__.py +0 -0
  19. {objectnat-0.2.2 → objectnat-0.2.3}/src/objectnat/methods/provision/provision_exceptions.py +0 -0
  20. {objectnat-0.2.2 → objectnat-0.2.3}/src/objectnat/methods/visibility_analysis.py +0 -0
  21. {objectnat-0.2.2 → objectnat-0.2.3}/src/objectnat/utils/__init__.py +0 -0
  22. {objectnat-0.2.2 → objectnat-0.2.3}/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.3
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
@@ -14,6 +14,7 @@ Classifier: Programming Language :: Python :: 3.12
14
14
  Requires-Dist: geopandas (>=0.14.3,<0.15.0)
15
15
  Requires-Dist: iduedu (>=0.1.4,<0.2.0)
16
16
  Requires-Dist: joblib (>=1.4.2,<2.0.0)
17
+ Requires-Dist: jupyter (>=1.1.1,<2.0.0)
17
18
  Requires-Dist: networkit (>=11.0,<12.0)
18
19
  Requires-Dist: networkx (>=3.2.1,<4.0.0)
19
20
  Requires-Dist: numpy (>=1.23.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.3"
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>"]
@@ -22,6 +22,7 @@ population-restorator = "^0.2.3"
22
22
  iduedu = "^0.1.4"
23
23
  joblib = "^1.4.2"
24
24
  scikit-learn = "^1.4.0"
25
+ jupyter = "^1.1.1"
25
26
 
26
27
 
27
28
  [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.3"
@@ -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,
@@ -13,7 +13,7 @@ from .provision_exceptions import CapacityKeyError, DemandKeyError
13
13
  logger = config.logger
14
14
 
15
15
 
16
- class CityProvision:
16
+ class Provision:
17
17
  """
18
18
  Represents the logic for city provision calculations using a gravity or linear model.
19
19
 
@@ -25,7 +25,7 @@ class CityProvision:
25
25
  calculation_type (str, optional): Type of calculation ("gravity" or "linear"). Defaults to "gravity".
26
26
 
27
27
  Returns:
28
- CityProvision: The CityProvision object.
28
+ Provision: The CityProvision object.
29
29
 
30
30
  Raises: KeyError: If the 'demand' column is missing in the provided 'demanded_buildings' GeoDataFrame,
31
31
  or if the 'capacity' column is missing in the provided 'services' GeoDataFrame. ValueError: If the 'capacity'
@@ -46,7 +46,8 @@ class CityProvision:
46
46
  self.adjacency_matrix = self.delete_useless_matrix_rows_columns(adjacency_matrix, demanded_buildings, services)
47
47
  self.threshold = threshold
48
48
  self.check_crs(self.demanded_buildings, self.services)
49
- pandarallel.initialize(progress_bar=False, verbose=0)
49
+ print(config.pandarallel_use_file_system)
50
+ pandarallel.initialize(progress_bar=False, verbose=0, use_memory_fs=config.pandarallel_use_file_system)
50
51
 
51
52
  @staticmethod
52
53
  def ensure_buildings(v: gpd.GeoDataFrame) -> gpd.GeoDataFrame:
@@ -1 +0,0 @@
1
- VERSION = "0.2.2"
File without changes
File without changes