py-pilecore 0.8.0__tar.gz → 0.8.2__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 py-pilecore might be problematic. Click here for more details.

Files changed (49) hide show
  1. {py_pilecore-0.8.0/src/py_pilecore.egg-info → py_pilecore-0.8.2}/PKG-INFO +7 -1
  2. {py_pilecore-0.8.0 → py_pilecore-0.8.2}/README.md +7 -1
  3. {py_pilecore-0.8.0 → py_pilecore-0.8.2}/pyproject.toml +1 -1
  4. {py_pilecore-0.8.0 → py_pilecore-0.8.2/src/py_pilecore.egg-info}/PKG-INFO +7 -1
  5. {py_pilecore-0.8.0 → py_pilecore-0.8.2}/src/pypilecore/_version.py +1 -1
  6. {py_pilecore-0.8.0 → py_pilecore-0.8.2}/src/pypilecore/common/piles/main.py +3 -1
  7. {py_pilecore-0.8.0 → py_pilecore-0.8.2}/src/pypilecore/input/soil_properties.py +23 -1
  8. {py_pilecore-0.8.0 → py_pilecore-0.8.2}/LICENSE +0 -0
  9. {py_pilecore-0.8.0 → py_pilecore-0.8.2}/setup.cfg +0 -0
  10. {py_pilecore-0.8.0 → py_pilecore-0.8.2}/src/py_pilecore.egg-info/SOURCES.txt +0 -0
  11. {py_pilecore-0.8.0 → py_pilecore-0.8.2}/src/py_pilecore.egg-info/dependency_links.txt +0 -0
  12. {py_pilecore-0.8.0 → py_pilecore-0.8.2}/src/py_pilecore.egg-info/requires.txt +0 -0
  13. {py_pilecore-0.8.0 → py_pilecore-0.8.2}/src/py_pilecore.egg-info/top_level.txt +0 -0
  14. {py_pilecore-0.8.0 → py_pilecore-0.8.2}/src/pypilecore/__init__.py +0 -0
  15. {py_pilecore-0.8.0 → py_pilecore-0.8.2}/src/pypilecore/api.py +0 -0
  16. {py_pilecore-0.8.0 → py_pilecore-0.8.2}/src/pypilecore/common/__init__.py +0 -0
  17. {py_pilecore-0.8.0 → py_pilecore-0.8.2}/src/pypilecore/common/piles/__init__.py +0 -0
  18. {py_pilecore-0.8.0 → py_pilecore-0.8.2}/src/pypilecore/common/piles/geometry/__init__.py +0 -0
  19. {py_pilecore-0.8.0 → py_pilecore-0.8.2}/src/pypilecore/common/piles/geometry/components/__init__.py +0 -0
  20. {py_pilecore-0.8.0 → py_pilecore-0.8.2}/src/pypilecore/common/piles/geometry/components/common.py +0 -0
  21. {py_pilecore-0.8.0 → py_pilecore-0.8.2}/src/pypilecore/common/piles/geometry/components/rectangle.py +0 -0
  22. {py_pilecore-0.8.0 → py_pilecore-0.8.2}/src/pypilecore/common/piles/geometry/components/round.py +0 -0
  23. {py_pilecore-0.8.0 → py_pilecore-0.8.2}/src/pypilecore/common/piles/geometry/main.py +0 -0
  24. {py_pilecore-0.8.0 → py_pilecore-0.8.2}/src/pypilecore/common/piles/geometry/materials.py +0 -0
  25. {py_pilecore-0.8.0 → py_pilecore-0.8.2}/src/pypilecore/common/piles/type.py +0 -0
  26. {py_pilecore-0.8.0 → py_pilecore-0.8.2}/src/pypilecore/exceptions.py +0 -0
  27. {py_pilecore-0.8.0 → py_pilecore-0.8.2}/src/pypilecore/input/__init__.py +0 -0
  28. {py_pilecore-0.8.0 → py_pilecore-0.8.2}/src/pypilecore/input/grouper_properties.py +0 -0
  29. {py_pilecore-0.8.0 → py_pilecore-0.8.2}/src/pypilecore/input/multi_cpt.py +0 -0
  30. {py_pilecore-0.8.0 → py_pilecore-0.8.2}/src/pypilecore/plot_utils.py +0 -0
  31. {py_pilecore-0.8.0 → py_pilecore-0.8.2}/src/pypilecore/results/__init__.py +0 -0
  32. {py_pilecore-0.8.0 → py_pilecore-0.8.2}/src/pypilecore/results/cases_multi_cpt_results.py +0 -0
  33. {py_pilecore-0.8.0 → py_pilecore-0.8.2}/src/pypilecore/results/grouper_result.py +0 -0
  34. {py_pilecore-0.8.0 → py_pilecore-0.8.2}/src/pypilecore/results/load_settlement.py +0 -0
  35. {py_pilecore-0.8.0 → py_pilecore-0.8.2}/src/pypilecore/results/multi_cpt_results.py +0 -0
  36. {py_pilecore-0.8.0 → py_pilecore-0.8.2}/src/pypilecore/results/post_processing.py +0 -0
  37. {py_pilecore-0.8.0 → py_pilecore-0.8.2}/src/pypilecore/results/result_definitions.py +0 -0
  38. {py_pilecore-0.8.0 → py_pilecore-0.8.2}/src/pypilecore/results/single_cpt_results.py +0 -0
  39. {py_pilecore-0.8.0 → py_pilecore-0.8.2}/src/pypilecore/results/soil_properties.py +0 -0
  40. {py_pilecore-0.8.0 → py_pilecore-0.8.2}/src/pypilecore/utils.py +0 -0
  41. {py_pilecore-0.8.0 → py_pilecore-0.8.2}/src/pypilecore/viewers/__init__.py +0 -0
  42. {py_pilecore-0.8.0 → py_pilecore-0.8.2}/src/pypilecore/viewers/interactive_figures/__init__.py +0 -0
  43. {py_pilecore-0.8.0 → py_pilecore-0.8.2}/src/pypilecore/viewers/interactive_figures/figure_cpt_group_results_versus_ptls.py +0 -0
  44. {py_pilecore-0.8.0 → py_pilecore-0.8.2}/src/pypilecore/viewers/interactive_figures/figure_cpt_results_plan_view.py +0 -0
  45. {py_pilecore-0.8.0 → py_pilecore-0.8.2}/src/pypilecore/viewers/interactive_figures/figure_cpt_results_versus_ptls.py +0 -0
  46. {py_pilecore-0.8.0 → py_pilecore-0.8.2}/src/pypilecore/viewers/interactive_figures/utils.py +0 -0
  47. {py_pilecore-0.8.0 → py_pilecore-0.8.2}/src/pypilecore/viewers/viewer_cpt_group_results.py +0 -0
  48. {py_pilecore-0.8.0 → py_pilecore-0.8.2}/src/pypilecore/viewers/viewer_cpt_results.py +0 -0
  49. {py_pilecore-0.8.0 → py_pilecore-0.8.2}/src/pypilecore/viewers/viewer_cpt_results_plan_view.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: py-pilecore
3
- Version: 0.8.0
3
+ Version: 0.8.2
4
4
  Summary: Public python SDK for the CEMS PileCore web-API.
5
5
  License: MIT License
6
6
 
@@ -168,3 +168,9 @@ Update the requirements within the defined ranges with:
168
168
  ```bash
169
169
  pip-compile --upgrade --extra=test --extra=lint --extra=docs --output-file=requirements.txt pyproject.toml
170
170
  ```
171
+
172
+ Note that `pip-compile` might run from your global path. You can also invoke the compile
173
+ command from the `piptools` module on a specific python installation (e.g. within a virtualenv):
174
+
175
+ ```bash
176
+ python -m piptools compile
@@ -102,4 +102,10 @@ Update the requirements within the defined ranges with:
102
102
 
103
103
  ```bash
104
104
  pip-compile --upgrade --extra=test --extra=lint --extra=docs --output-file=requirements.txt pyproject.toml
105
- ```
105
+ ```
106
+
107
+ Note that `pip-compile` might run from your global path. You can also invoke the compile
108
+ command from the `piptools` module on a specific python installation (e.g. within a virtualenv):
109
+
110
+ ```bash
111
+ python -m piptools compile
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "py-pilecore"
7
- version = "0.8.0"
7
+ version = "0.8.2"
8
8
  description = "Public python SDK for the CEMS PileCore web-API."
9
9
  requires-python = ">=3.9"
10
10
  dependencies = [
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: py-pilecore
3
- Version: 0.8.0
3
+ Version: 0.8.2
4
4
  Summary: Public python SDK for the CEMS PileCore web-API.
5
5
  License: MIT License
6
6
 
@@ -168,3 +168,9 @@ Update the requirements within the defined ranges with:
168
168
  ```bash
169
169
  pip-compile --upgrade --extra=test --extra=lint --extra=docs --output-file=requirements.txt pyproject.toml
170
170
  ```
171
+
172
+ Note that `pip-compile` might run from your global path. You can also invoke the compile
173
+ command from the `piptools` module on a specific python installation (e.g. within a virtualenv):
174
+
175
+ ```bash
176
+ python -m piptools compile
@@ -4,4 +4,4 @@ try:
4
4
  __version__ = version("py-pilecore")
5
5
  # during CI
6
6
  except PackageNotFoundError:
7
- __version__ = "0.8.0"
7
+ __version__ = "0.8.2"
@@ -68,7 +68,9 @@ class PileProperties:
68
68
  @property
69
69
  def name(self) -> str | None:
70
70
  """The name of the pile."""
71
- return self._name
71
+ if self._name is not None:
72
+ return str(self._name)
73
+ return None
72
74
 
73
75
  def serialize_payload(self) -> Dict[str, dict | str]:
74
76
  """
@@ -1,8 +1,10 @@
1
1
  from __future__ import annotations
2
2
 
3
+ import warnings
3
4
  from typing import Any, Dict, List, Literal, Mapping, Tuple
4
5
 
5
6
  import numpy as np
7
+ from numpy.typing import NDArray
6
8
  from pygef.cpt import CPTData
7
9
  from tqdm import tqdm
8
10
 
@@ -16,6 +18,26 @@ transform = {
16
18
  }
17
19
 
18
20
 
21
+ def get_cpt_depth(cpt: CPTData) -> NDArray:
22
+ """
23
+ Returns the array of depth data from the CPT. Uses the (corrected) depth data if
24
+ present, otherwise the `penetrationLength` data along with a warning.
25
+ """
26
+ if "depth" in cpt.data.columns:
27
+ depth = cpt.data["depth"]
28
+ elif "penetrationLength" in cpt.data.columns:
29
+ warnings.warn(
30
+ f"CPT {cpt.alias} has no Corrected Depth trace. py-pilecore uses the Penetration Length instead, which might not be accurate."
31
+ )
32
+ depth = cpt.data["penetrationLength"]
33
+ else:
34
+ raise ValueError(
35
+ f"Cannot process CPT {cpt.alias}: required Corrected Depth or Penetration Length data is missing."
36
+ )
37
+
38
+ return np.array(depth, dtype=float)
39
+
40
+
19
41
  def create_soil_properties_payload(
20
42
  cptdata_objects: List[CPTData],
21
43
  classify_tables: Dict[str, dict],
@@ -117,7 +139,7 @@ def create_soil_properties_payload(
117
139
 
118
140
  # Construct the cpt_data payload
119
141
  cpt_data = dict(
120
- depth=np.array(cpt.data["depth"], dtype=float),
142
+ depth=get_cpt_depth(cpt),
121
143
  qc=np.array(cpt.data["coneResistance"], dtype=float).clip(0),
122
144
  )
123
145
 
File without changes
File without changes