foamlib 0.3.13__tar.gz → 0.3.14__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 (23) hide show
  1. {foamlib-0.3.13 → foamlib-0.3.14}/PKG-INFO +1 -1
  2. {foamlib-0.3.13 → foamlib-0.3.14}/foamlib/__init__.py +1 -1
  3. {foamlib-0.3.13 → foamlib-0.3.14}/foamlib/_cases/_base.py +11 -6
  4. {foamlib-0.3.13 → foamlib-0.3.14}/foamlib.egg-info/PKG-INFO +1 -1
  5. {foamlib-0.3.13 → foamlib-0.3.14}/LICENSE.txt +0 -0
  6. {foamlib-0.3.13 → foamlib-0.3.14}/README.md +0 -0
  7. {foamlib-0.3.13 → foamlib-0.3.14}/foamlib/_cases/__init__.py +0 -0
  8. {foamlib-0.3.13 → foamlib-0.3.14}/foamlib/_cases/_async.py +0 -0
  9. {foamlib-0.3.13 → foamlib-0.3.14}/foamlib/_cases/_sync.py +0 -0
  10. {foamlib-0.3.13 → foamlib-0.3.14}/foamlib/_files/__init__.py +0 -0
  11. {foamlib-0.3.13 → foamlib-0.3.14}/foamlib/_files/_base.py +0 -0
  12. {foamlib-0.3.13 → foamlib-0.3.14}/foamlib/_files/_files.py +0 -0
  13. {foamlib-0.3.13 → foamlib-0.3.14}/foamlib/_files/_io.py +0 -0
  14. {foamlib-0.3.13 → foamlib-0.3.14}/foamlib/_files/_parsing.py +0 -0
  15. {foamlib-0.3.13 → foamlib-0.3.14}/foamlib/_files/_serialization.py +0 -0
  16. {foamlib-0.3.13 → foamlib-0.3.14}/foamlib/_util.py +0 -0
  17. {foamlib-0.3.13 → foamlib-0.3.14}/foamlib/py.typed +0 -0
  18. {foamlib-0.3.13 → foamlib-0.3.14}/foamlib.egg-info/SOURCES.txt +0 -0
  19. {foamlib-0.3.13 → foamlib-0.3.14}/foamlib.egg-info/dependency_links.txt +0 -0
  20. {foamlib-0.3.13 → foamlib-0.3.14}/foamlib.egg-info/requires.txt +0 -0
  21. {foamlib-0.3.13 → foamlib-0.3.14}/foamlib.egg-info/top_level.txt +0 -0
  22. {foamlib-0.3.13 → foamlib-0.3.14}/pyproject.toml +0 -0
  23. {foamlib-0.3.13 → foamlib-0.3.14}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: foamlib
3
- Version: 0.3.13
3
+ Version: 0.3.14
4
4
  Summary: A Python interface for interacting with OpenFOAM
5
5
  Author-email: "Gabriel S. Gerlero" <ggerlero@cimec.unl.edu.ar>
6
6
  Project-URL: Homepage, https://github.com/gerlero/foamlib
@@ -1,6 +1,6 @@
1
1
  """A Python interface for interacting with OpenFOAM."""
2
2
 
3
- __version__ = "0.3.13"
3
+ __version__ = "0.3.14"
4
4
 
5
5
  from ._cases import AsyncFoamCase, FoamCase, FoamCaseBase
6
6
  from ._files import FoamDict, FoamFieldFile, FoamFile
@@ -183,12 +183,14 @@ class FoamCaseBase(Sequence["FoamCaseBase.TimeDirectory"]):
183
183
  all_clean = self.path / "Allclean"
184
184
 
185
185
  if clean.is_file():
186
- return clean
186
+ file = clean
187
187
  elif all_clean.is_file():
188
- return all_clean
188
+ file = all_clean
189
189
  else:
190
190
  return None
191
191
 
192
+ return file if Path(__file__).absolute() != file.absolute() else None
193
+
192
194
  def _run_script(self, *, parallel: Optional[bool] = None) -> Optional[Path]:
193
195
  """Return the path to the (All)run script, or None if no run script is found."""
194
196
  run = self.path / "run"
@@ -199,21 +201,24 @@ class FoamCaseBase(Sequence["FoamCaseBase.TimeDirectory"]):
199
201
  if run.is_file() or all_run.is_file():
200
202
  if run_parallel.is_file() or all_run_parallel.is_file():
201
203
  if parallel:
202
- return run_parallel if run_parallel.is_file() else all_run_parallel
204
+ file = run_parallel if run_parallel.is_file() else all_run_parallel
203
205
  elif parallel is False:
204
- return run if run.is_file() else all_run
206
+ file = run if run.is_file() else all_run
205
207
  else:
206
208
  raise ValueError(
207
209
  "Both (All)run and (All)run-parallel scripts are present. Please specify parallel argument."
208
210
  )
209
- return run if run.is_file() else all_run
211
+ else:
212
+ file = run if run.is_file() else all_run
210
213
  elif parallel is not False and (
211
214
  run_parallel.is_file() or all_run_parallel.is_file()
212
215
  ):
213
- return run_parallel if run_parallel.is_file() else all_run_parallel
216
+ file = run_parallel if run_parallel.is_file() else all_run_parallel
214
217
  else:
215
218
  return None
216
219
 
220
+ return file if Path(__file__).absolute() != file.absolute() else None
221
+
217
222
  def _run_cmds(
218
223
  self,
219
224
  cmd: Optional[Union[Sequence[Union[str, Path]], str, Path]] = None,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: foamlib
3
- Version: 0.3.13
3
+ Version: 0.3.14
4
4
  Summary: A Python interface for interacting with OpenFOAM
5
5
  Author-email: "Gabriel S. Gerlero" <ggerlero@cimec.unl.edu.ar>
6
6
  Project-URL: Homepage, https://github.com/gerlero/foamlib
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes