pyfluids 2.8.2__tar.gz → 2.9.0__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 (26) hide show
  1. {pyfluids-2.8.2 → pyfluids-2.9.0}/PKG-INFO +13 -12
  2. {pyfluids-2.8.2 → pyfluids-2.9.0}/pyproject.toml +18 -24
  3. {pyfluids-2.8.2 → pyfluids-2.9.0/src}/pyfluids/enums/fluids_list.py +1 -1
  4. {pyfluids-2.8.2 → pyfluids-2.9.0/src}/pyfluids/fluids/fluid.py +29 -4
  5. pyfluids-2.8.2/LICENSE +0 -21
  6. {pyfluids-2.8.2 → pyfluids-2.9.0}/PyPI.md +0 -0
  7. {pyfluids-2.8.2 → pyfluids-2.9.0/src}/pyfluids/__init__.py +0 -0
  8. {pyfluids-2.8.2 → pyfluids-2.9.0/src}/pyfluids/config/__init__.py +0 -0
  9. {pyfluids-2.8.2 → pyfluids-2.9.0/src}/pyfluids/config/pyfluids_config.py +0 -0
  10. {pyfluids-2.8.2 → pyfluids-2.9.0/src}/pyfluids/config/pyfluids_config_builder.py +0 -0
  11. {pyfluids-2.8.2 → pyfluids-2.9.0/src}/pyfluids/config/singleton.py +0 -0
  12. {pyfluids-2.8.2 → pyfluids-2.9.0/src}/pyfluids/config/unit_converter.py +0 -0
  13. {pyfluids-2.8.2 → pyfluids-2.9.0/src}/pyfluids/config/units_system.py +0 -0
  14. {pyfluids-2.8.2 → pyfluids-2.9.0/src}/pyfluids/enums/__init__.py +0 -0
  15. {pyfluids-2.8.2 → pyfluids-2.9.0/src}/pyfluids/enums/mix.py +0 -0
  16. {pyfluids-2.8.2 → pyfluids-2.9.0/src}/pyfluids/enums/phases.py +0 -0
  17. {pyfluids-2.8.2 → pyfluids-2.9.0/src}/pyfluids/fluids/__init__.py +0 -0
  18. {pyfluids-2.8.2 → pyfluids-2.9.0/src}/pyfluids/fluids/abstract_fluid.py +0 -0
  19. {pyfluids-2.8.2 → pyfluids-2.9.0/src}/pyfluids/fluids/mixture.py +0 -0
  20. {pyfluids-2.8.2 → pyfluids-2.9.0/src}/pyfluids/humid_air/__init__.py +0 -0
  21. {pyfluids-2.8.2 → pyfluids-2.9.0/src}/pyfluids/humid_air/humid_air.py +0 -0
  22. {pyfluids-2.8.2 → pyfluids-2.9.0/src}/pyfluids/io/__init__.py +0 -0
  23. {pyfluids-2.8.2 → pyfluids-2.9.0/src}/pyfluids/io/abstract_input.py +0 -0
  24. {pyfluids-2.8.2 → pyfluids-2.9.0/src}/pyfluids/io/input.py +0 -0
  25. {pyfluids-2.8.2 → pyfluids-2.9.0/src}/pyfluids/io/input_humid_air.py +0 -0
  26. {pyfluids-2.8.2 → pyfluids-2.9.0/src}/pyfluids/io/outputs_validator.py +0 -0
@@ -1,13 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyfluids
3
- Version: 2.8.2
3
+ Version: 2.9.0
4
4
  Summary: Simple, full-featured, lightweight CoolProp wrapper for Python
5
- License: MIT
6
- License-File: LICENSE
7
5
  Keywords: CoolProp,fluids,mixtures,humid,air,thermophysical,properties,thermodynamics
8
6
  Author: Vladimir Portyanikhin
9
- Author-email: v.portyanikhin@ya.ru
10
- Requires-Python: >=3.9,<3.14
7
+ Author-email: Vladimir Portyanikhin <v.portyanikhin@ya.ru>
8
+ License-Expression: MIT
11
9
  Classifier: Development Status :: 5 - Production/Stable
12
10
  Classifier: Intended Audience :: Developers
13
11
  Classifier: Intended Audience :: Education
@@ -21,12 +19,13 @@ Classifier: Operating System :: POSIX :: Linux
21
19
  Classifier: Operating System :: Unix
22
20
  Classifier: Programming Language :: Python
23
21
  Classifier: Programming Language :: Python :: 3
22
+ Classifier: Programming Language :: Python :: 3 :: Only
24
23
  Classifier: Programming Language :: Python :: 3.9
25
24
  Classifier: Programming Language :: Python :: 3.10
26
25
  Classifier: Programming Language :: Python :: 3.11
27
26
  Classifier: Programming Language :: Python :: 3.12
28
27
  Classifier: Programming Language :: Python :: 3.13
29
- Classifier: Programming Language :: Python :: 3 :: Only
28
+ Classifier: Programming Language :: Python :: 3.14
30
29
  Classifier: Programming Language :: Python :: Implementation
31
30
  Classifier: Programming Language :: Python :: Implementation :: PyPy
32
31
  Classifier: Topic :: Education
@@ -34,11 +33,13 @@ Classifier: Topic :: Scientific/Engineering
34
33
  Classifier: Topic :: Scientific/Engineering :: Atmospheric Science
35
34
  Classifier: Topic :: Scientific/Engineering :: Chemistry
36
35
  Classifier: Topic :: Scientific/Engineering :: Physics
37
- Requires-Dist: CoolProp (==7.1.0)
38
- Requires-Dist: tomli (==2.2.1)
39
- Project-URL: Documentation, https://github.com/portyanikhin/PyFluids
40
- Project-URL: Homepage, https://github.com/portyanikhin/PyFluids
41
- Project-URL: Repository, https://github.com/portyanikhin/PyFluids
36
+ Requires-Dist: coolprop==7.2.0
37
+ Requires-Dist: tomli~=2.3
38
+ Requires-Python: >=3.9, <3.15
39
+ Project-URL: documentation, https://github.com/portyanikhin/PyFluids
40
+ Project-URL: homepage, https://github.com/portyanikhin/PyFluids
41
+ Project-URL: releasenotes, https://github.com/portyanikhin/PyFluids/releases
42
+ Project-URL: source, https://github.com/portyanikhin/PyFluids
42
43
  Description-Content-Type: text/markdown
43
44
 
44
45
  # ![PyFluids](https://raw.githubusercontent.com/portyanikhin/PyFluids/main/pictures/header.png)
@@ -53,4 +54,4 @@ Description-Content-Type: text/markdown
53
54
 
54
55
  Simple, full-featured, lightweight [CoolProp](http://www.coolprop.org) wrapper for Python.
55
56
 
56
- _**See [full documentation](https://github.com/portyanikhin/PyFluids).**_
57
+ _**See [full documentation](https://github.com/portyanikhin/PyFluids).**_
@@ -1,15 +1,11 @@
1
- [tool.poetry]
1
+ [project]
2
2
  name = "pyfluids"
3
- version = "2.8.2"
3
+ version = "2.9.0"
4
4
  description = "Simple, full-featured, lightweight CoolProp wrapper for Python"
5
- authors = [
6
- "Vladimir Portyanikhin <v.portyanikhin@ya.ru>",
7
- ]
8
- license = "MIT"
9
5
  readme = "PyPI.md"
10
- homepage = "https://github.com/portyanikhin/PyFluids"
11
- repository = "https://github.com/portyanikhin/PyFluids"
12
- documentation = "https://github.com/portyanikhin/PyFluids"
6
+ requires-python = ">=3.9, <3.15"
7
+ license = "MIT"
8
+ authors = [{ name = "Vladimir Portyanikhin", email = "v.portyanikhin@ya.ru" }]
13
9
  keywords = [
14
10
  "CoolProp",
15
11
  "fluids",
@@ -40,6 +36,7 @@ classifiers = [
40
36
  "Programming Language :: Python :: 3.11",
41
37
  "Programming Language :: Python :: 3.12",
42
38
  "Programming Language :: Python :: 3.13",
39
+ "Programming Language :: Python :: 3.14",
43
40
  "Programming Language :: Python :: Implementation",
44
41
  "Programming Language :: Python :: Implementation :: PyPy",
45
42
  "Topic :: Education",
@@ -48,23 +45,20 @@ classifiers = [
48
45
  "Topic :: Scientific/Engineering :: Chemistry",
49
46
  "Topic :: Scientific/Engineering :: Physics",
50
47
  ]
51
- packages = [
52
- { include = "pyfluids" },
53
- ]
48
+ dependencies = ["CoolProp==7.2.0", "tomli~=2.3"]
54
49
 
55
- [tool.poetry.dependencies]
56
- python = ">=3.9, <3.14"
57
- CoolProp = "7.1.0"
58
- tomli = "2.2.1"
50
+ [dependency-groups]
51
+ dev = ["pytest", "pytest-asyncio", "pytest-cov"]
59
52
 
60
- [tool.poetry.group.test.dependencies]
61
- pytest = "8.4.2"
62
- pytest-asyncio = "1.2.0"
63
- pytest-cov = "7.0.0"
53
+ [project.urls]
54
+ homepage = "https://github.com/portyanikhin/PyFluids"
55
+ source = "https://github.com/portyanikhin/PyFluids"
56
+ releasenotes = "https://github.com/portyanikhin/PyFluids/releases"
57
+ documentation = "https://github.com/portyanikhin/PyFluids"
58
+
59
+ [build-system]
60
+ requires = ["uv_build~=0.9"]
61
+ build-backend = "uv_build"
64
62
 
65
63
  [tool.pytest.ini_options]
66
64
  asyncio_default_fixture_loop_scope = "function"
67
-
68
- [build-system]
69
- requires = ["poetry-core"]
70
- build-backend = "poetry.core.masonry.api"
@@ -425,7 +425,7 @@ class FluidsList(Enum):
425
425
 
426
426
  @property
427
427
  def coolprop_backend(self) -> str:
428
- """Type of CoolProp backend."""
428
+ """Default type of CoolProp backend."""
429
429
  return self.__coolprop_backend
430
430
 
431
431
  @property
@@ -12,13 +12,21 @@ __all__ = ["Fluid"]
12
12
  class Fluid(AbstractFluid):
13
13
  """Pure/pseudo-pure fluid or binary mixture."""
14
14
 
15
- def __init__(self, name: FluidsList, fraction: float | None = None):
15
+ def __init__(
16
+ self,
17
+ name: FluidsList,
18
+ fraction: float | None = None,
19
+ coolprop_backend: str | None = None,
20
+ ):
16
21
  """
17
22
  Pure/pseudo-pure fluid or binary mixture.
18
23
 
19
24
  :param name: Selected fluid name.
20
25
  :param fraction: Mass-based or volume-based fraction for binary mixtures
21
26
  [by default, %; you can change this using the configuration file].
27
+ :param coolprop_backend: CoolProp backend to be used
28
+ (e.g., 'HEOS', 'INCOMP', 'REFPROP', 'IF97', etc.).
29
+ If provided, overrides the default one defined for the fluid name.
22
30
  :raises ValueError: If fraction is invalid.
23
31
  """
24
32
  super().__init__()
@@ -39,14 +47,19 @@ class Fluid(AbstractFluid):
39
47
  if self.__name.pure
40
48
  else fraction
41
49
  )
50
+ self.__coolprop_backend = (
51
+ coolprop_backend
52
+ if coolprop_backend is not None
53
+ else self.__name.coolprop_backend
54
+ )
42
55
  self._backend = AbstractState(
43
- self.__name.coolprop_backend, self.__name.coolprop_name
56
+ self.__coolprop_backend, self.__name.coolprop_name
44
57
  )
45
58
  if not self.__name.pure:
46
59
  self.__set_fraction()
47
60
 
48
61
  def factory(self) -> Fluid:
49
- return Fluid(self.__name, self.__fraction)
62
+ return Fluid(self.__name, self.__fraction, self.__coolprop_backend)
50
63
 
51
64
  @property
52
65
  def name(self) -> FluidsList:
@@ -61,6 +74,11 @@ class Fluid(AbstractFluid):
61
74
  """
62
75
  return self.__fraction
63
76
 
77
+ @property
78
+ def coolprop_backend(self) -> str:
79
+ """Type of CoolProp backend."""
80
+ return self.__coolprop_backend
81
+
64
82
  def mixing(
65
83
  self,
66
84
  first_specific_mass_flow: float,
@@ -103,4 +121,11 @@ class Fluid(AbstractFluid):
103
121
  return not self.__eq__(other)
104
122
 
105
123
  def __hash__(self) -> int:
106
- return hash((self.__name.coolprop_name, self.__fraction, super().__hash__()))
124
+ return hash(
125
+ (
126
+ self.__name.coolprop_name,
127
+ self.__fraction,
128
+ self.__coolprop_backend,
129
+ super().__hash__(),
130
+ )
131
+ )
pyfluids-2.8.2/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2021 Vladimir Portyanikhin
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
File without changes