sibi-dst 0.3.47__tar.gz → 0.3.49__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 (81) hide show
  1. {sibi_dst-0.3.47 → sibi_dst-0.3.49}/PKG-INFO +7 -6
  2. {sibi_dst-0.3.47 → sibi_dst-0.3.49}/README.md +3 -3
  3. {sibi_dst-0.3.47 → sibi_dst-0.3.49}/pyproject.toml +6 -3
  4. sibi_dst-0.3.49/sibi_dst/__init__.py +10 -0
  5. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/df_helper/__init__.py +0 -2
  6. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/df_helper/_artifact_updater_multi_wrapper.py +1 -1
  7. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/df_helper/_df_helper.py +3 -3
  8. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/df_helper/_parquet_artifact.py +2 -2
  9. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/df_helper/_parquet_reader.py +2 -2
  10. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/df_helper/backends/django/_load_from_db.py +3 -3
  11. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/df_helper/backends/http/_http_config.py +1 -1
  12. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/df_helper/backends/parquet/_filter_handler.py +1 -1
  13. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/df_helper/backends/parquet/_parquet_options.py +2 -2
  14. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/df_helper/backends/sqlalchemy/_io_dask.py +2 -2
  15. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/df_helper/backends/sqlalchemy/_load_from_db.py +2 -2
  16. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/df_helper/core/_filter_handler.py +1 -1
  17. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/osmnx_helper/basemaps/router_plotter.py +2 -2
  18. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/tests/test_data_wrapper_class.py +2 -2
  19. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/utils/df_utils.py +2 -1
  20. sibi_dst-0.3.47/sibi_dst/__init__.py +0 -47
  21. sibi_dst-0.3.47/sibi_dst/v2/df_helper/backends/__init__.py +0 -0
  22. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst/df_helper/backends}/__init__.py +0 -0
  23. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/df_helper/backends/django/__init__.py +0 -0
  24. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/df_helper/backends/django/_db_connection.py +0 -0
  25. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/df_helper/backends/django/_io_dask.py +0 -0
  26. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/df_helper/backends/django/_sql_model_builder.py +0 -0
  27. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/df_helper/backends/http/__init__.py +0 -0
  28. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/df_helper/backends/parquet/__init__.py +0 -0
  29. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/df_helper/backends/sqlalchemy/__init__.py +0 -0
  30. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/df_helper/backends/sqlalchemy/_db_connection.py +0 -0
  31. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/df_helper/backends/sqlalchemy/_filter_handler.py +0 -0
  32. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/df_helper/backends/sqlalchemy/_sql_model_builder.py +0 -0
  33. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/df_helper/core/__init__.py +0 -0
  34. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/df_helper/core/_defaults.py +0 -0
  35. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/df_helper/core/_params_config.py +0 -0
  36. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/df_helper/core/_query_config.py +0 -0
  37. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/df_helper/data_cleaner.py +0 -0
  38. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/geopy_helper/__init__.py +0 -0
  39. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/geopy_helper/geo_location_service.py +0 -0
  40. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/geopy_helper/utils.py +0 -0
  41. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/osmnx_helper/__init__.py +0 -0
  42. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/osmnx_helper/base_osm_map.py +0 -0
  43. {sibi_dst-0.3.47/sibi_dst/v1/df_helper/backends → sibi_dst-0.3.49/sibi_dst/osmnx_helper/basemaps}/__init__.py +0 -0
  44. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/osmnx_helper/basemaps/calendar_html.py +0 -0
  45. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/osmnx_helper/utils.py +0 -0
  46. {sibi_dst-0.3.47/sibi_dst/v1/osmnx_helper/basemaps → sibi_dst-0.3.49/sibi_dst/tests}/__init__.py +0 -0
  47. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/utils/__init__.py +0 -0
  48. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/utils/airflow_manager.py +0 -0
  49. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/utils/clickhouse_writer.py +0 -0
  50. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/utils/credentials.py +0 -0
  51. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/utils/data_from_http_source.py +0 -0
  52. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/utils/data_utils.py +0 -0
  53. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/utils/data_wrapper.py +0 -0
  54. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/utils/date_utils.py +0 -0
  55. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/utils/file_utils.py +0 -0
  56. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/utils/filepath_generator.py +0 -0
  57. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/utils/log_utils.py +0 -0
  58. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/utils/parquet_saver.py +0 -0
  59. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/utils/phone_formatter.py +0 -0
  60. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/utils/storage_config.py +0 -0
  61. {sibi_dst-0.3.47/sibi_dst/v1 → sibi_dst-0.3.49/sibi_dst}/utils/storage_manager.py +0 -0
  62. {sibi_dst-0.3.47/sibi_dst/v1/tests → sibi_dst-0.3.49/sibi_dst/v2}/__init__.py +0 -0
  63. {sibi_dst-0.3.47 → sibi_dst-0.3.49}/sibi_dst/v2/df_helper/__init__.py +0 -0
  64. {sibi_dst-0.3.47 → sibi_dst-0.3.49}/sibi_dst/v2/df_helper/_df_helper.py +0 -0
  65. {sibi_dst-0.3.47/sibi_dst/v2 → sibi_dst-0.3.49/sibi_dst/v2/df_helper/backends}/__init__.py +0 -0
  66. {sibi_dst-0.3.47 → sibi_dst-0.3.49}/sibi_dst/v2/df_helper/backends/sqlalchemy/__init__.py +0 -0
  67. {sibi_dst-0.3.47 → sibi_dst-0.3.49}/sibi_dst/v2/df_helper/backends/sqlalchemy/_db_connection.py +0 -0
  68. {sibi_dst-0.3.47 → sibi_dst-0.3.49}/sibi_dst/v2/df_helper/backends/sqlalchemy/_io_dask.py +0 -0
  69. {sibi_dst-0.3.47 → sibi_dst-0.3.49}/sibi_dst/v2/df_helper/backends/sqlalchemy/_load_from_db.py +0 -0
  70. {sibi_dst-0.3.47 → sibi_dst-0.3.49}/sibi_dst/v2/df_helper/backends/sqlalchemy/_model_builder.py +0 -0
  71. {sibi_dst-0.3.47 → sibi_dst-0.3.49}/sibi_dst/v2/df_helper/backends/sqlmodel/__init__.py +0 -0
  72. {sibi_dst-0.3.47 → sibi_dst-0.3.49}/sibi_dst/v2/df_helper/backends/sqlmodel/_db_connection.py +0 -0
  73. {sibi_dst-0.3.47 → sibi_dst-0.3.49}/sibi_dst/v2/df_helper/backends/sqlmodel/_io_dask.py +0 -0
  74. {sibi_dst-0.3.47 → sibi_dst-0.3.49}/sibi_dst/v2/df_helper/backends/sqlmodel/_load_from_db.py +0 -0
  75. {sibi_dst-0.3.47 → sibi_dst-0.3.49}/sibi_dst/v2/df_helper/backends/sqlmodel/_model_builder.py +0 -0
  76. {sibi_dst-0.3.47 → sibi_dst-0.3.49}/sibi_dst/v2/df_helper/core/__init__.py +0 -0
  77. {sibi_dst-0.3.47 → sibi_dst-0.3.49}/sibi_dst/v2/df_helper/core/_filter_handler.py +0 -0
  78. {sibi_dst-0.3.47 → sibi_dst-0.3.49}/sibi_dst/v2/df_helper/core/_params_config.py +0 -0
  79. {sibi_dst-0.3.47 → sibi_dst-0.3.49}/sibi_dst/v2/df_helper/core/_query_config.py +0 -0
  80. {sibi_dst-0.3.47 → sibi_dst-0.3.49}/sibi_dst/v2/utils/__init__.py +0 -0
  81. {sibi_dst-0.3.47 → sibi_dst-0.3.49}/sibi_dst/v2/utils/log_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sibi-dst
3
- Version: 0.3.47
3
+ Version: 0.3.49
4
4
  Summary: Data Science Toolkit
5
5
  Author: Luis Valverde
6
6
  Author-email: lvalverdeb@gmail.com
@@ -9,14 +9,15 @@ Classifier: Programming Language :: Python :: 3
9
9
  Classifier: Programming Language :: Python :: 3.11
10
10
  Classifier: Programming Language :: Python :: 3.12
11
11
  Classifier: Programming Language :: Python :: 3.13
12
+ Provides-Extra: complete
12
13
  Requires-Dist: apache-airflow-client (>=2.10.0,<3.0.0)
13
14
  Requires-Dist: chardet (>=5.2.0,<6.0.0)
14
15
  Requires-Dist: charset-normalizer (>=3.4.0,<4.0.0)
15
16
  Requires-Dist: clickhouse-connect (>=0.8.7,<0.9.0)
16
17
  Requires-Dist: clickhouse-driver (>=0.2.9,<0.3.0)
17
18
  Requires-Dist: dask[complete] (>=2024.11.1,<2025.0.0)
18
- Requires-Dist: django (>=5.1.4,<6.0.0)
19
- Requires-Dist: djangorestframework (>=3.15.2,<4.0.0)
19
+ Requires-Dist: django (>=5.1.4,<6.0.0) ; extra == "complete"
20
+ Requires-Dist: djangorestframework (>=3.15.2,<4.0.0) ; extra == "complete"
20
21
  Requires-Dist: folium (>=0.19.4,<0.20.0)
21
22
  Requires-Dist: geopandas (>=1.0.1,<2.0.0)
22
23
  Requires-Dist: geopy (>=2.4.1,<3.0.0)
@@ -66,7 +67,7 @@ Supported Technologies
66
67
  - **Machine Learning**: Scikit-Learn, XGBoost
67
68
  - **Databases & Storage**: SQLAlchemy, Django ORM, Parquet, Amazon S3, GCS, Azure Blob Storage
68
69
  - **Mapping & Geospatial Analysis**: OpenStreetMaps, OSMnx, Geopy
69
- - **API Development**: Django REST Framework, gRPC
70
+ - **API Development**: Django REST Framework, gRPC, FastAPI
70
71
 
71
72
  Installation
72
73
  ---------------------
@@ -159,7 +160,7 @@ Provides **geolocation services** using `Geopy` for forward and reverse geocodin
159
160
  ```python
160
161
  from sibi_dst.geopy_helper import GeolocationService
161
162
  gs = GeolocationService()
162
- location = gs.reverse_geocode(lat=9.935, lon=-84.091)
163
+ location = gs.reverse((9.935,-84.091))
163
164
  print(location)
164
165
  ```
165
166
 
@@ -174,7 +175,7 @@ result = df_helper.load(date__gte='2023-01-01', status='active')
174
175
  ### Parallel Processing
175
176
  Leverage Dask for parallel execution:
176
177
  ```python
177
- results = df_helper.load_parallel(status='active')
178
+ result = df_helper.load_parallel(status='active')
178
179
  ```
179
180
 
180
181
  Testing
@@ -17,7 +17,7 @@ Supported Technologies
17
17
  - **Machine Learning**: Scikit-Learn, XGBoost
18
18
  - **Databases & Storage**: SQLAlchemy, Django ORM, Parquet, Amazon S3, GCS, Azure Blob Storage
19
19
  - **Mapping & Geospatial Analysis**: OpenStreetMaps, OSMnx, Geopy
20
- - **API Development**: Django REST Framework, gRPC
20
+ - **API Development**: Django REST Framework, gRPC, FastAPI
21
21
 
22
22
  Installation
23
23
  ---------------------
@@ -110,7 +110,7 @@ Provides **geolocation services** using `Geopy` for forward and reverse geocodin
110
110
  ```python
111
111
  from sibi_dst.geopy_helper import GeolocationService
112
112
  gs = GeolocationService()
113
- location = gs.reverse_geocode(lat=9.935, lon=-84.091)
113
+ location = gs.reverse((9.935,-84.091))
114
114
  print(location)
115
115
  ```
116
116
 
@@ -125,7 +125,7 @@ result = df_helper.load(date__gte='2023-01-01', status='active')
125
125
  ### Parallel Processing
126
126
  Leverage Dask for parallel execution:
127
127
  ```python
128
- results = df_helper.load_parallel(status='active')
128
+ result = df_helper.load_parallel(status='active')
129
129
  ```
130
130
 
131
131
  Testing
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "sibi-dst"
3
- version = "0.3.47"
3
+ version = "0.3.49"
4
4
  description = "Data Science Toolkit"
5
5
  authors = ["Luis Valverde <lvalverdeb@gmail.com>"]
6
6
  readme = "README.md"
@@ -13,7 +13,7 @@ dask = {extras = ["complete"], version = "^2024.11.1"}
13
13
  pydantic = "^2.9.2"
14
14
  tornado = "^6.4.1"
15
15
  psutil = "^6.1.0"
16
- django = "^5.1.4"
16
+ django = {version="^5.1.4", optional=true}
17
17
  pyarrow = "^18.0.0"
18
18
  mysqlclient = "^2.2.6"
19
19
  pymysql = "^1.1.1"
@@ -31,7 +31,7 @@ paramiko = "^3.5.0"
31
31
  chardet = "^5.2.0"
32
32
  charset-normalizer = "^3.4.0"
33
33
  sqlalchemy = "^2.0.36"
34
- djangorestframework = "^3.15.2"
34
+ djangorestframework = {version="^3.15.2", optional=true}
35
35
  psycopg2 = "^2.9.10"
36
36
  uvicorn = "^0.34.0"
37
37
  pytest-mock = "^3.14.0"
@@ -45,6 +45,9 @@ uvicorn-worker = "^0.3.0"
45
45
  geopy = "^2.4.1"
46
46
  sqlmodel = "^0.0.22"
47
47
 
48
+ [tool.poetry.extras]
49
+ # The 'complete' extra installs Django and Django REST Framework together.
50
+ complete = ["django", "djangorestframework"]
48
51
 
49
52
  [build-system]
50
53
  requires = ["poetry-core"]
@@ -0,0 +1,10 @@
1
+
2
+ try:
3
+ import importlib.metadata as version_reader
4
+ except ImportError:
5
+ import importlib_metadata as version_reader
6
+
7
+ try:
8
+ __version__ = version_reader.version("sibi-dst")
9
+ except version_reader.PackageNotFoundError:
10
+ __version__ = "unknown"
@@ -4,12 +4,10 @@ from ._df_helper import DfHelper
4
4
  from ._parquet_artifact import ParquetArtifact
5
5
  from ._parquet_reader import ParquetReader
6
6
  from ._artifact_updater_multi_wrapper import ArtifactUpdaterMultiWrapper
7
- #from .data_cleaner import DataCleaner
8
7
 
9
8
  __all__ = [
10
9
  'DfHelper',
11
10
  'ParquetArtifact',
12
11
  'ParquetReader',
13
12
  'ArtifactUpdaterMultiWrapper',
14
- #'DataCleaner'
15
13
  ]
@@ -7,7 +7,7 @@ from functools import total_ordering
7
7
  from collections import defaultdict
8
8
  from contextlib import asynccontextmanager
9
9
  import signal
10
- from sibi_dst.v1.utils import Logger
10
+ from sibi_dst.utils import Logger
11
11
 
12
12
  @total_ordering
13
13
  class PrioritizedItem:
@@ -11,9 +11,9 @@ import pandas as pd
11
11
  from pydantic import BaseModel
12
12
  import fsspec
13
13
 
14
- from sibi_dst.v1.df_helper.core import QueryConfig, ParamsConfig, FilterHandler
15
- from sibi_dst.v1.utils import Logger
16
- from sibi_dst.v1.utils import ParquetSaver, ClickHouseWriter
14
+ from sibi_dst.df_helper.core import QueryConfig, ParamsConfig, FilterHandler
15
+ from sibi_dst.utils import Logger
16
+ from sibi_dst.utils import ParquetSaver, ClickHouseWriter
17
17
  from .backends.django import *
18
18
  from .backends.http import HttpConfig
19
19
  from .backends.parquet import ParquetConfig
@@ -5,8 +5,8 @@ from typing import Optional, Any, Dict
5
5
  import dask.dataframe as dd
6
6
  import fsspec
7
7
 
8
- from sibi_dst.v1.df_helper import DfHelper
9
- from sibi_dst.v1.utils import DataWrapper, DateUtils, Logger
8
+ from sibi_dst.df_helper import DfHelper
9
+ from sibi_dst.utils import DataWrapper, DateUtils, Logger
10
10
 
11
11
 
12
12
  class ParquetArtifact(DfHelper):
@@ -4,8 +4,8 @@ from typing import Optional
4
4
  import dask.dataframe as dd
5
5
  import fsspec
6
6
 
7
- from sibi_dst.v1.df_helper import DfHelper
8
- from sibi_dst.v1.utils import Logger
7
+ from sibi_dst.df_helper import DfHelper
8
+ from sibi_dst.utils import Logger
9
9
 
10
10
  class ParquetReader(DfHelper):
11
11
  """
@@ -4,9 +4,9 @@ import dask.dataframe as dd
4
4
  import pandas as pd
5
5
  from django.db.models import Q
6
6
 
7
- from sibi_dst.v1.df_helper.backends.django import ReadFrameDask
8
- from sibi_dst.v1.df_helper.core import django_field_conversion_map_dask
9
- from sibi_dst.v1.utils import Logger
7
+ from sibi_dst.df_helper.backends.django import ReadFrameDask
8
+ from sibi_dst.df_helper.core import django_field_conversion_map_dask
9
+ from sibi_dst.utils import Logger
10
10
 
11
11
 
12
12
  class DjangoLoadFromDb:
@@ -5,7 +5,7 @@ import httpx
5
5
  import pandas as pd
6
6
  from pydantic import BaseModel, HttpUrl, Field, ConfigDict, SecretStr
7
7
 
8
- from sibi_dst.v1.utils import Logger
8
+ from sibi_dst.utils import Logger
9
9
 
10
10
 
11
11
  class HttpConfig(BaseModel):
@@ -1,7 +1,7 @@
1
1
  import dask.dataframe as dd
2
2
  import pandas as pd
3
3
 
4
- from sibi_dst.v1.utils import Logger
4
+ from sibi_dst.utils import Logger
5
5
 
6
6
 
7
7
  class ParquetFilterHandler(object):
@@ -6,8 +6,8 @@ import dask.dataframe as dd
6
6
  import fsspec
7
7
  from pydantic import BaseModel, model_validator, DirectoryPath, FilePath, ConfigDict
8
8
 
9
- from sibi_dst.v1.utils import FilePathGenerator
10
- from sibi_dst.v1.utils import Logger
9
+ from sibi_dst.utils import FilePathGenerator
10
+ from sibi_dst.utils import Logger
11
11
 
12
12
 
13
13
  class ParquetConfig(BaseModel):
@@ -5,8 +5,8 @@ import pandas as pd
5
5
  from sqlalchemy import create_engine, inspect, select
6
6
  from sqlalchemy.orm import sessionmaker
7
7
 
8
- from sibi_dst.v1.df_helper.core import FilterHandler
9
- from sibi_dst.v1.utils import Logger
8
+ from sibi_dst.df_helper.core import FilterHandler
9
+ from sibi_dst.utils import Logger
10
10
 
11
11
 
12
12
  class SQLAlchemyDask:
@@ -1,8 +1,8 @@
1
1
  import dask.dataframe as dd
2
2
  import pandas as pd
3
3
 
4
- from sibi_dst.v1.df_helper.core import ParamsConfig, QueryConfig
5
- from sibi_dst.v1.utils import Logger
4
+ from sibi_dst.df_helper.core import ParamsConfig, QueryConfig
5
+ from sibi_dst.utils import Logger
6
6
  from ._io_dask import SQLAlchemyDask
7
7
  from ._db_connection import SqlAlchemyConnectionConfig
8
8
 
@@ -5,7 +5,7 @@ import pandas as pd
5
5
  from sqlalchemy import func, cast
6
6
  from sqlalchemy.sql.sqltypes import Date, Time
7
7
 
8
- from sibi_dst.v1.utils import Logger
8
+ from sibi_dst.utils import Logger
9
9
 
10
10
 
11
11
  class FilterHandler:
@@ -1,12 +1,12 @@
1
1
  from __future__ import annotations
2
- from sibi_dst.osmnx_helper.v1.utils import get_distance_between_points, add_arrows
2
+ from sibi_dst.osmnx_helper.utils import get_distance_between_points, add_arrows
3
3
  from collections import defaultdict
4
4
  import folium
5
5
  from folium.plugins import AntPath
6
6
  import networkx as nx
7
7
 
8
8
  from sibi_dst.osmnx_helper import BaseOsmMap
9
- from sibi_dst.osmnx_helper.v1.basemaps.calendar_html import calendar_html
9
+ from sibi_dst.osmnx_helper.basemaps.calendar_html import calendar_html
10
10
 
11
11
  class RoutePlotter(BaseOsmMap):
12
12
  def __init__(self, osmnx_graph, df, **kwargs):
@@ -2,8 +2,8 @@ import unittest
2
2
  from unittest.mock import patch, MagicMock
3
3
  import datetime
4
4
  import pandas as pd
5
- from sibi_dst.v1.utils import Logger, ParquetSaver
6
- from sibi_dst.v1.utils.data_wrapper import DataWrapper
5
+ from sibi_dst.utils import Logger, ParquetSaver
6
+ from sibi_dst.utils.data_wrapper import DataWrapper
7
7
  from threading import Lock
8
8
 
9
9
  class TestDataWrapper(unittest.TestCase):
@@ -2,7 +2,8 @@ import dask.dataframe as dd
2
2
  import pandas as pd
3
3
 
4
4
  from .log_utils import Logger
5
-
5
+ import warnings
6
+ warnings.filterwarnings("ignore", message="Sorting a Dask DataFrame is expensive and may not be efficient")
6
7
 
7
8
  class DfUtils:
8
9
  def __init__(self, logger=None):
@@ -1,47 +0,0 @@
1
-
2
- try:
3
- import importlib.metadata as version_reader
4
- except ImportError:
5
- import importlib_metadata as version_reader
6
-
7
- try:
8
- __version__ = version_reader.version("sibi-dst")
9
- except version_reader.PackageNotFoundError:
10
- __version__ = "unknown"
11
-
12
- import importlib
13
- import sys
14
-
15
- def _load_module(version, module_name):
16
- # Construct the relative module path (e.g., ".v1.df_helper")
17
- module_path = f".{version}.{module_name}"
18
- #print(f"Loading module: {module_path} from package {__package__}")
19
- return importlib.import_module(module_path, package=__package__)
20
-
21
-
22
- # Toggle version by setting the flag (or use an environment variable)
23
- use_v2 = False
24
- default_version = "v2" if use_v2 else "v1"
25
-
26
- # Dynamically load the modules from the chosen version directory.
27
- df_helper = _load_module(default_version, "df_helper")
28
- geopy_helper = _load_module(default_version, "geopy_helper")
29
- osmnx_helper = _load_module(default_version, "osmnx_helper")
30
- tests = _load_module(default_version, "tests")
31
- utils = _load_module(default_version, "utils")
32
-
33
- # Re-export the modules at the top level so that absolute imports work.
34
- sys.modules[f"{__package__}.df_helper"] = df_helper
35
- sys.modules[f"{__package__}.geopy_helper"] = geopy_helper
36
- sys.modules[f"{__package__}.osmnx_helper"] = osmnx_helper
37
- sys.modules[f"{__package__}.tests"] = tests
38
- sys.modules[f"{__package__}.utils"] = utils
39
-
40
- # Define what is exported with "from sibi_dst import *"
41
- __all__ = [
42
- "df_helper",
43
- "geopy_helper",
44
- "osmnx_helper",
45
- "tests",
46
- "utils"
47
- ]