pyEQL 0.13.0__py2.py3-none-any.whl → 0.14.0__py2.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.
- pyEQL/engines.py +9 -1
- pyEQL/solution.py +1 -1
- pyEQL/utils.py +5 -0
- {pyEQL-0.13.0.dist-info → pyEQL-0.14.0.dist-info}/METADATA +1 -1
- {pyEQL-0.13.0.dist-info → pyEQL-0.14.0.dist-info}/RECORD +10 -10
- {pyEQL-0.13.0.dist-info → pyEQL-0.14.0.dist-info}/AUTHORS.md +0 -0
- {pyEQL-0.13.0.dist-info → pyEQL-0.14.0.dist-info}/COPYING +0 -0
- {pyEQL-0.13.0.dist-info → pyEQL-0.14.0.dist-info}/LICENSE.txt +0 -0
- {pyEQL-0.13.0.dist-info → pyEQL-0.14.0.dist-info}/WHEEL +0 -0
- {pyEQL-0.13.0.dist-info → pyEQL-0.14.0.dist-info}/top_level.txt +0 -0
pyEQL/engines.py
CHANGED
|
@@ -159,7 +159,15 @@ class NativeEOS(EOS):
|
|
|
159
159
|
Path(os.path.dirname(__file__)) / "database" if self.phreeqc_db in ["llnl.dat", "geothermal.dat"] else None
|
|
160
160
|
)
|
|
161
161
|
# create the PhreeqcPython instance
|
|
162
|
-
|
|
162
|
+
# try/except added to catch unsupported architectures, such as Apple Silicon
|
|
163
|
+
try:
|
|
164
|
+
self.pp = PhreeqPython(database=self.phreeqc_db, database_directory=self.db_path)
|
|
165
|
+
except OSError:
|
|
166
|
+
logger.error(
|
|
167
|
+
"OSError encountered when trying to instantiate phreeqpython. Most likely this means you"
|
|
168
|
+
" are running on an architecture that is not supported by PHREEQC, such as Apple M1/M2 chips."
|
|
169
|
+
" pyEQL will work, but equilibrate() will have no effect."
|
|
170
|
+
)
|
|
163
171
|
# attributes to hold the PhreeqPython solution.
|
|
164
172
|
self.ppsol = None
|
|
165
173
|
# store the solution composition to see whether we need to re-instantiate the solution
|
pyEQL/solution.py
CHANGED
|
@@ -169,7 +169,7 @@ class Solution(MSONable):
|
|
|
169
169
|
if database is None:
|
|
170
170
|
# load the default database, which is a JSONStore
|
|
171
171
|
db_store = IonDB
|
|
172
|
-
elif isinstance(database, str
|
|
172
|
+
elif isinstance(database, (str, Path)):
|
|
173
173
|
db_store = JSONStore(str(database), key="formula")
|
|
174
174
|
logger.info(f"Created maggma JSONStore from .json file {database}")
|
|
175
175
|
else:
|
pyEQL/utils.py
CHANGED
|
@@ -99,5 +99,10 @@ class FormulaDict(UserDict):
|
|
|
99
99
|
# sort contents anytime an item is set
|
|
100
100
|
self.data = dict(sorted(self.items(), key=lambda x: x[1], reverse=True))
|
|
101
101
|
|
|
102
|
+
# Necessary to define this so that .get() works properly in python 3.12+
|
|
103
|
+
# see https://github.com/python/cpython/issues/105524
|
|
104
|
+
def __contains__(self, key):
|
|
105
|
+
return standardize_formula(key) in self.data
|
|
106
|
+
|
|
102
107
|
def __delitem__(self, key):
|
|
103
108
|
super().__delitem__(standardize_formula(key))
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
pyEQL/__init__.py,sha256=bW3CxQ7Wi4uNIgPtsimLXvLln2N3WMGSvZxpTE-ireY,1963
|
|
2
2
|
pyEQL/activity_correction.py,sha256=5zG6TofIx5xV0q_To3o6XZ1VLHvp5Q5vIxonqKu-7jg,37003
|
|
3
|
-
pyEQL/engines.py,sha256=
|
|
3
|
+
pyEQL/engines.py,sha256=7sQ5DJ2f8OoF0aXn8q6Cs10xEzGRuv6K8W8c8-4mVic,33033
|
|
4
4
|
pyEQL/equilibrium.py,sha256=Zwn-NstMXE-6X4zulcZ2z0Vk3GX8yoNKVN0hnRXud_Q,8281
|
|
5
5
|
pyEQL/functions.py,sha256=nuyR6hrLQZfSkzOqDm6W6lgMxQpbKT6IRuAj-rPXsjk,16116
|
|
6
6
|
pyEQL/logging_system.py,sha256=_41vA7tZOShWuAZK9SrEM_nsfQF4VyS_xEc0yIWNsDI,2579
|
|
7
7
|
pyEQL/pint_custom_units.txt,sha256=XHmcMlwVvqF9nEW7_e9Xgyq-xWEr-cDYqieas11T3eY,2882
|
|
8
8
|
pyEQL/salt_ion_match.py,sha256=sk5FsyEe6MgCrX0LvGIEKl7NO2kF--SHG39AVIxgzDY,4061
|
|
9
9
|
pyEQL/solute.py,sha256=LCt8xS35g4qQEWNRw3FMU9cIXce1mgkCnYMRMcAI5ZI,4992
|
|
10
|
-
pyEQL/solution.py,sha256=
|
|
11
|
-
pyEQL/utils.py,sha256=
|
|
10
|
+
pyEQL/solution.py,sha256=gAVemd1-U6EW7gx8guiavZTJp0vlandkDUn0V0GL-4o,132821
|
|
11
|
+
pyEQL/utils.py,sha256=RpU9W8f64PaqkCF_HhtvO9XUmXobfTh4ciyb5oShIy8,3571
|
|
12
12
|
pyEQL/database/geothermal.dat,sha256=kksnfcBtWdOTpNn4CLXU1Mz16cwas2WuVKpuMU8CaVI,234230
|
|
13
13
|
pyEQL/database/llnl.dat,sha256=jN-a0kfUFbQlYMn2shTVRg1JX_ZhLa-tJ0lLw2YSpLU,751462
|
|
14
14
|
pyEQL/database/phreeqc_license.txt,sha256=8W1r8VxC2kVptIMSU9sDFNASYqN7MdwKEtIWWfjTQuM,2906
|
|
@@ -19,10 +19,10 @@ pyEQL/presets/rainwater.yaml,sha256=S0WHZNDfCJyjSSFxNFdkypjn2s3P0jJGCiYIxvi1ibA,
|
|
|
19
19
|
pyEQL/presets/seawater.yaml,sha256=oryc1CkhRz20RpWE6uiGiT93HoZnqlB0s-0PmBWr3-U,843
|
|
20
20
|
pyEQL/presets/urine.yaml,sha256=0Njtc-H1fFRo7UhquHdiSTT4z-8VZJ1utDCk02qk28M,679
|
|
21
21
|
pyEQL/presets/wastewater.yaml,sha256=jTTFBpmKxczaEtkCZb0xUULIPZt7wfC8eAJ6rthGnmw,502
|
|
22
|
-
pyEQL-0.
|
|
23
|
-
pyEQL-0.
|
|
24
|
-
pyEQL-0.
|
|
25
|
-
pyEQL-0.
|
|
26
|
-
pyEQL-0.
|
|
27
|
-
pyEQL-0.
|
|
28
|
-
pyEQL-0.
|
|
22
|
+
pyEQL-0.14.0.dist-info/AUTHORS.md,sha256=K9ZLhKFwZ2zLlFXwN62VuUYCpr5T6n4mOUCUHlytTUs,415
|
|
23
|
+
pyEQL-0.14.0.dist-info/COPYING,sha256=Ww2oUywfFTn242v9ksCgQdIVSpcMXJiKKePn0GFm25E,7649
|
|
24
|
+
pyEQL-0.14.0.dist-info/LICENSE.txt,sha256=2Zf1F7RzbpeposgIxUydpurqNCMoMgDi2gAB65_GjwQ,969
|
|
25
|
+
pyEQL-0.14.0.dist-info/METADATA,sha256=CgQKmSyAmIArLPD71d8cgH7-LeqHH4hN4crY5cK0LhU,5653
|
|
26
|
+
pyEQL-0.14.0.dist-info/WHEEL,sha256=-G_t0oGuE7UD0DrSpVZnq1hHMBV9DD2XkS5v7XpmTnk,110
|
|
27
|
+
pyEQL-0.14.0.dist-info/top_level.txt,sha256=QMOaZjCAm_lS4Njsjh4L0B5aWnJFGQMYKhuH88CG1co,6
|
|
28
|
+
pyEQL-0.14.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|