sdf-xarray 0.7.3__tar.gz → 0.7.4__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 (67) hide show
  1. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/PKG-INFO +1 -1
  2. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/src/sdf_xarray/__init__.py +8 -1
  3. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/src/sdf_xarray/_version.py +3 -3
  4. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/tests/test_dataset.py +10 -0
  5. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/.github/workflows/build_publish.yml +0 -0
  6. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/.github/workflows/lint.yml +0 -0
  7. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/.github/workflows/tests.yml +0 -0
  8. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/.gitignore +0 -0
  9. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/.gitmodules +0 -0
  10. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/.readthedocs.yaml +0 -0
  11. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/CITATION.cff +0 -0
  12. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/CMakeLists.txt +0 -0
  13. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/CONTRIBUTING.md +0 -0
  14. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/LICENCE +0 -0
  15. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/README.md +0 -0
  16. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/docs/.gitignore +0 -0
  17. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/docs/_static/BEAM.png +0 -0
  18. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/docs/_static/PlasmaFAIR.svg +0 -0
  19. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/docs/_static/force_render_dark_xarray_objects.css +0 -0
  20. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/docs/_static/sdf-xarray-logo-dark.svg +0 -0
  21. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/docs/_static/sdf-xarray-logo-light.svg +0 -0
  22. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/docs/_templates/custom-class-template.rst +0 -0
  23. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/docs/_templates/custom-module-template.rst +0 -0
  24. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/docs/animation.md +0 -0
  25. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/docs/api.md +0 -0
  26. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/docs/conf.py +0 -0
  27. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/docs/contributing.md +0 -0
  28. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/docs/epoch_workshop_2026/animating/animate_1D_density.py +0 -0
  29. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/docs/epoch_workshop_2026/animating/animate_1D_poynting_flux.py +0 -0
  30. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/docs/epoch_workshop_2026/animating/animate_2D_dist_fn_multispecies.py +0 -0
  31. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/docs/epoch_workshop_2026/animating/animate_2D_dist_fn_multispecies_alternative.py +0 -0
  32. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/docs/epoch_workshop_2026/animating/animate_2D_poynting_flux.py +0 -0
  33. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/docs/epoch_workshop_2026/animations.md +0 -0
  34. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/docs/epoch_workshop_2026/histograms/plot_hist_ke.py +0 -0
  35. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/docs/epoch_workshop_2026/histograms/plot_hist_ke_probe.py +0 -0
  36. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/docs/epoch_workshop_2026/histograms/plot_hist_px.py +0 -0
  37. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/docs/epoch_workshop_2026/histograms.md +0 -0
  38. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/docs/epoch_workshop_2026/live_demo.ipynb +0 -0
  39. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/docs/epoch_workshop_2026/plots.md +0 -0
  40. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/docs/epoch_workshop_2026/plotting/plot_1D_density.py +0 -0
  41. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/docs/epoch_workshop_2026/plotting/plot_1D_poynting_flux.py +0 -0
  42. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/docs/epoch_workshop_2026/plotting/plot_2D_density.py +0 -0
  43. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/docs/epoch_workshop_2026/plotting/plot_2D_dist_fn_multispecies.py +0 -0
  44. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/docs/epoch_workshop_2026/plotting/plot_2D_poynting_flux.py +0 -0
  45. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/docs/epoch_workshop_2026/plotting/plot_time_temperature.py +0 -0
  46. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/docs/epoch_workshop_2026/plotting/plot_x_px_scatter.py +0 -0
  47. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/docs/epoch_workshop_2026/workshop_details.md +0 -0
  48. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/docs/index.md +0 -0
  49. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/docs/installation.md +0 -0
  50. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/docs/known_issues.md +0 -0
  51. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/docs/loading_data.md +0 -0
  52. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/docs/make.bat +0 -0
  53. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/docs/understanding_datasets.md +0 -0
  54. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/docs/unit_conversion.md +0 -0
  55. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/docs/why_sdf_xarray.md +0 -0
  56. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/pyproject.toml +0 -0
  57. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/src/sdf_xarray/csdf.pxd +0 -0
  58. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/src/sdf_xarray/dataarray_accessor.py +0 -0
  59. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/src/sdf_xarray/dataset_accessor.py +0 -0
  60. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/src/sdf_xarray/download.py +0 -0
  61. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/src/sdf_xarray/plotting.py +0 -0
  62. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/src/sdf_xarray/sdf_interface.pyx +0 -0
  63. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/tests/test_cython.py +0 -0
  64. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/tests/test_datatree.py +0 -0
  65. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/tests/test_epoch_dataarray_accessor.py +0 -0
  66. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/tests/test_epoch_dataset_accessor.py +0 -0
  67. {sdf_xarray-0.7.3 → sdf_xarray-0.7.4}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sdf-xarray
3
- Version: 0.7.3
3
+ Version: 0.7.4
4
4
  Summary: Provides a backend for xarray to read SDF files as created by the EPOCH plasma PIC code.
5
5
  Author-Email: Peter Hill <peter.hill@york.ac.uk>, Joel Adams <joel.adams@york.ac.uk>, Shaun Doherty <shaun.doherty@york.ac.uk>, Chris Herdman <chris.herdman@york.ac.uk>, Liam Pattinson <liam.pattinson@york.ac.uk>, Sviatoslav Shekhanov <sviatoslav.shekhanov@york.ac.uk>
6
6
  License-Expression: BSD-3-Clause
@@ -1,6 +1,7 @@
1
1
  import contextlib
2
2
  import os
3
3
  import re
4
+ import traceback
4
5
  from collections import Counter, defaultdict
5
6
  from collections.abc import Callable, Iterable
6
7
  from importlib.metadata import version
@@ -71,7 +72,13 @@ def _load_deck(
71
72
  return {}
72
73
 
73
74
  with deck_path.open() as f:
74
- return epydeck.load(f)
75
+ try:
76
+ return epydeck.load(f)
77
+ except Exception:
78
+ print(
79
+ f"The following error occurred while trying to load the input deck: {deck_path.as_uri()}"
80
+ )
81
+ traceback.print_exc()
75
82
 
76
83
 
77
84
  def _process_latex_name(variable_name: str) -> str:
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
18
18
  commit_id: str | None
19
19
  __commit_id__: str | None
20
20
 
21
- __version__ = version = '0.7.3'
22
- __version_tuple__ = version_tuple = (0, 7, 3)
21
+ __version__ = version = '0.7.4'
22
+ __version_tuple__ = version_tuple = (0, 7, 4)
23
23
 
24
- __commit_id__ = commit_id = 'g526313d9c'
24
+ __commit_id__ = commit_id = 'gc521760ee'
@@ -8,6 +8,7 @@ import xarray as xr
8
8
  import sdf_xarray as sdfxr
9
9
  from sdf_xarray import (
10
10
  SDFPreprocess,
11
+ _load_deck,
11
12
  _process_latex_name,
12
13
  download,
13
14
  resolve_paths,
@@ -755,3 +756,12 @@ def test_open_mfdataset_deck_path_absolute_other_path():
755
756
  ) as df:
756
757
  assert "deck" in df.attrs
757
758
  assert "constant" not in df.attrs["deck"]
759
+
760
+
761
+ def test_epydeck_parsing_failing_deck(tmp_path, capsys):
762
+ deck = tmp_path / "faulty.deck"
763
+ deck.write_text("begin:constant\nend:s", encoding="utf-8")
764
+
765
+ _load_deck("", deck)
766
+ out, _ = capsys.readouterr()
767
+ assert "error occurred while trying to load the input deck" in out
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes