geolysis 0.21.0__py3-none-any.whl → 0.21.1__py3-none-any.whl

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.
geolysis/__init__.py CHANGED
@@ -1,5 +1,5 @@
1
1
  from . import bearing_capacity, foundation, soil_classifier, spt
2
2
 
3
- __version__ = "0.21.0"
3
+ __version__ = "0.21.1"
4
4
 
5
5
  __all__ = ["foundation", "soil_classifier", "spt", "bearing_capacity"]
@@ -6,6 +6,8 @@ from func_validator import (
6
6
  validate_params,
7
7
  MustBeNonNegative,
8
8
  MustBePositive,
9
+ DependsOn,
10
+ MustBeLessThanOrEqual,
9
11
  )
10
12
 
11
13
  from .utils import isclose, round_
@@ -261,8 +263,7 @@ class AtterbergLimits:
261
263
 
262
264
  @liquid_limit.setter
263
265
  @validate_params
264
- def liquid_limit(self,
265
- liquid_limit: Annotated[float, MustBeNonNegative()]):
266
+ def liquid_limit(self, liquid_limit: Annotated[float, MustBeNonNegative()]):
266
267
  self._liquid_limit = liquid_limit
267
268
 
268
269
  @property
@@ -274,15 +275,14 @@ class AtterbergLimits:
274
275
 
275
276
  @plastic_limit.setter
276
277
  @validate_params
277
- def plastic_limit(self,
278
- plastic_limit: Annotated[float, MustBeNonNegative()]):
279
- if self.liquid_limit < plastic_limit:
280
- msg = (
281
- f"plastic_limit: {plastic_limit} cannot be greater than "
282
- f"liquid_limit: {self.liquid_limit}"
283
- )
284
- raise ValueError(msg)
285
-
278
+ def plastic_limit(
279
+ self,
280
+ plastic_limit: Annotated[
281
+ float,
282
+ MustBeNonNegative(),
283
+ DependsOn("liquid_limit", args_strategy=MustBeLessThanOrEqual),
284
+ ],
285
+ ):
286
286
  self._plastic_limit = plastic_limit
287
287
 
288
288
  @property
@@ -369,7 +369,7 @@ class _SizeDistribution:
369
369
 
370
370
  @property
371
371
  def coeff_of_curvature(self) -> float:
372
- return (self.d_30 ** 2.0) / (self.d_60 * self.d_10)
372
+ return (self.d_30**2.0) / (self.d_60 * self.d_10)
373
373
 
374
374
  @property
375
375
  def coeff_of_uniformity(self) -> float:
@@ -406,12 +406,12 @@ class PSD:
406
406
  """
407
407
 
408
408
  def __init__(
409
- self,
410
- fines: float,
411
- sand: float,
412
- d_10: float | None = None,
413
- d_30: float | None = None,
414
- d_60: float | None = None,
409
+ self,
410
+ fines: float,
411
+ sand: float,
412
+ d_10: float | None = None,
413
+ d_30: float | None = None,
414
+ d_60: float | None = None,
415
415
  ):
416
416
  """
417
417
  :param fines: Percentage of fines in soil sample (%) i.e. The
@@ -658,10 +658,10 @@ class USCS:
658
658
  """
659
659
 
660
660
  def __init__(
661
- self,
662
- atterberg_limits: AtterbergLimits,
663
- psd: PSD,
664
- organic=False,
661
+ self,
662
+ atterberg_limits: AtterbergLimits,
663
+ psd: PSD,
664
+ organic=False,
665
665
  ):
666
666
  """
667
667
  :param atterberg_limits: Atterberg limits of the soil.
@@ -789,9 +789,9 @@ class USCS:
789
789
 
790
790
 
791
791
  def create_aashto_classifier(
792
- liquid_limit: float,
793
- plastic_limit: float,
794
- fines: float,
792
+ liquid_limit: float,
793
+ plastic_limit: float,
794
+ fines: float,
795
795
  ) -> AASHTO:
796
796
  """A helper function that encapsulates the creation of a AASHTO
797
797
  classifier.
@@ -815,14 +815,14 @@ def create_aashto_classifier(
815
815
 
816
816
  @validate_params
817
817
  def create_uscs_classifier(
818
- liquid_limit: float,
819
- plastic_limit: float,
820
- fines: float,
821
- sand: float,
822
- d_10: Annotated[Optional[float], MustBePositive()] = None,
823
- d_30: Annotated[Optional[float], MustBePositive()] = None,
824
- d_60: Annotated[Optional[float], MustBePositive()] = None,
825
- organic: bool = False,
818
+ liquid_limit: float,
819
+ plastic_limit: float,
820
+ fines: float,
821
+ sand: float,
822
+ d_10: Annotated[Optional[float], MustBePositive()] = None,
823
+ d_30: Annotated[Optional[float], MustBePositive()] = None,
824
+ d_60: Annotated[Optional[float], MustBePositive()] = None,
825
+ organic: bool = False,
826
826
  ):
827
827
  """A helper function that encapsulates the creation of a USCS
828
828
  classifier.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: geolysis
3
- Version: 0.21.0
3
+ Version: 0.21.1
4
4
  Summary: geolysis is an opensource software for geotechnical engineering analysis and modeling.
5
5
  Author-email: Patrick Boateng <boatengpato.pb@gmail.com>
6
6
  License: MIT License
@@ -1,7 +1,7 @@
1
- geolysis/__init__.py,sha256=81CAE0nRbBTykYl_PCtilSI0Em3D_LX4r8kgsFzW6xk,161
1
+ geolysis/__init__.py,sha256=JhZrstNwzGNTObDDlHFmrzpf5YwY6d6F9cp4KRZ16z4,161
2
2
  geolysis/exceptions.py,sha256=NocUF7-vaFsBJyi0QmH2EBFCpO2RT90RLEB66BCW_X0,74
3
3
  geolysis/foundation.py,sha256=bJ3TtJXSJ7ckjhhZhDE4KS8XAmh4NacFa3y4YHwo-G4,13258
4
- geolysis/soil_classifier.py,sha256=bZl8f7mMiRWHqdftzLbBok8RoP13W1AgQiRUeqrbef0,27941
4
+ geolysis/soil_classifier.py,sha256=sxAxqo3achFYuhwykaK4VCzGBbiuzzgZbpK7hncOKjg,27746
5
5
  geolysis/spt.py,sha256=DEYdOjIg2JcfcR-UqL8sSW_Sj6GsrzjaioITol2tFQE,17513
6
6
  geolysis/bearing_capacity/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  geolysis/bearing_capacity/abc/__init__.py,sha256=nycD68gdA116n2VX5fT_hq7ZZz3CF4OVuU3DIgnlnZw,518
@@ -16,8 +16,8 @@ geolysis/bearing_capacity/ubc/_terzaghi_ubc.py,sha256=3xroPeHvDgb7h6HytUHbtkK5f8
16
16
  geolysis/bearing_capacity/ubc/_vesic_ubc.py,sha256=FvtLBUvR0t9O4N6WYuM6VqWuj55O7sZBZ2_RT1RkijM,6934
17
17
  geolysis/utils/__init__.py,sha256=_KUctxGCiI9I-faB1iXMy-H1BQeU2LW9TmSpdDNy0Yw,1331
18
18
  geolysis/utils/math.py,sha256=Nqg6SFIy3peSC-n-rq0KjryOdWTqh9jCF2L_qvx5Yg8,1231
19
- geolysis-0.21.0.dist-info/licenses/LICENSE.txt,sha256=ap6sMs3lT7ICbEXBhgihwH1BTCVcjmCQkIkwVnil1Ak,1065
20
- geolysis-0.21.0.dist-info/METADATA,sha256=1zxt9da8ZSZqkPvwLCcs8SM0vyMBNc1Vwz_uyPZwy1Y,6833
21
- geolysis-0.21.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
22
- geolysis-0.21.0.dist-info/top_level.txt,sha256=9mnQgOaCRr11dtXff8X-q3FfXjRONd6kHseSy5q2y8g,9
23
- geolysis-0.21.0.dist-info/RECORD,,
19
+ geolysis-0.21.1.dist-info/licenses/LICENSE.txt,sha256=ap6sMs3lT7ICbEXBhgihwH1BTCVcjmCQkIkwVnil1Ak,1065
20
+ geolysis-0.21.1.dist-info/METADATA,sha256=vWGj_fxjfZcUZMUTqnjnklLiOiAP9yCbY5Y8qm5GX9w,6833
21
+ geolysis-0.21.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
22
+ geolysis-0.21.1.dist-info/top_level.txt,sha256=9mnQgOaCRr11dtXff8X-q3FfXjRONd6kHseSy5q2y8g,9
23
+ geolysis-0.21.1.dist-info/RECORD,,