midas-plotting 0.3.1__tar.gz → 0.3.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.
Files changed (23) hide show
  1. {midas_plotting-0.3.1 → midas_plotting-0.3.2}/PKG-INFO +2 -1
  2. {midas_plotting-0.3.1 → midas_plotting-0.3.2}/midas_plotting/__init__.py +1 -1
  3. {midas_plotting-0.3.1 → midas_plotting-0.3.2}/midas_plotting/cli.py +16 -1
  4. {midas_plotting-0.3.1 → midas_plotting-0.3.2}/midas_plotting.egg-info/PKG-INFO +2 -1
  5. {midas_plotting-0.3.1 → midas_plotting-0.3.2}/midas_plotting.egg-info/requires.txt +1 -0
  6. {midas_plotting-0.3.1 → midas_plotting-0.3.2}/pyproject.toml +2 -1
  7. {midas_plotting-0.3.1 → midas_plotting-0.3.2}/README.md +0 -0
  8. {midas_plotting-0.3.1 → midas_plotting-0.3.2}/midas_plotting/ff.py +0 -0
  9. {midas_plotting-0.3.1 → midas_plotting-0.3.2}/midas_plotting/grains.py +0 -0
  10. {midas_plotting-0.3.1 → midas_plotting-0.3.2}/midas_plotting/ipf.py +0 -0
  11. {midas_plotting-0.3.1 → midas_plotting-0.3.2}/midas_plotting/laue.py +0 -0
  12. {midas_plotting-0.3.1 → midas_plotting-0.3.2}/midas_plotting/maps.py +0 -0
  13. {midas_plotting-0.3.1 → midas_plotting-0.3.2}/midas_plotting/mic.py +0 -0
  14. {midas_plotting-0.3.1 → midas_plotting-0.3.2}/midas_plotting/solutions.py +0 -0
  15. {midas_plotting-0.3.1 → midas_plotting-0.3.2}/midas_plotting.egg-info/SOURCES.txt +0 -0
  16. {midas_plotting-0.3.1 → midas_plotting-0.3.2}/midas_plotting.egg-info/dependency_links.txt +0 -0
  17. {midas_plotting-0.3.1 → midas_plotting-0.3.2}/midas_plotting.egg-info/entry_points.txt +0 -0
  18. {midas_plotting-0.3.1 → midas_plotting-0.3.2}/midas_plotting.egg-info/top_level.txt +0 -0
  19. {midas_plotting-0.3.1 → midas_plotting-0.3.2}/setup.cfg +0 -0
  20. {midas_plotting-0.3.1 → midas_plotting-0.3.2}/tests/test_ff.py +0 -0
  21. {midas_plotting-0.3.1 → midas_plotting-0.3.2}/tests/test_ipf.py +0 -0
  22. {midas_plotting-0.3.1 → midas_plotting-0.3.2}/tests/test_laue.py +0 -0
  23. {midas_plotting-0.3.1 → midas_plotting-0.3.2}/tests/test_mic.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: midas-plotting
3
- Version: 0.3.1
3
+ Version: 0.3.2
4
4
  Summary: Standard plots for MIDAS reconstructions - near-field, far-field and Laue: IPF maps and legends, grain maps, pole figures, strain and size distributions, and Laue texture diagnostics against their chance levels.
5
5
  Author-email: Hemant Sharma <hsharma@anl.gov>
6
6
  License: BSD-3-Clause
@@ -11,6 +11,7 @@ Classifier: Operating System :: OS Independent
11
11
  Classifier: Topic :: Scientific/Engineering :: Physics
12
12
  Requires-Python: >=3.9
13
13
  Description-Content-Type: text/markdown
14
+ Requires-Dist: midas-params>=0.9.0
14
15
  Requires-Dist: numpy>=1.22
15
16
  Requires-Dist: matplotlib>=3.5
16
17
  Requires-Dist: midas-stress>=0.1
@@ -48,7 +48,7 @@ from .solutions import (
48
48
  )
49
49
  from .mic import MicMap, read_mic
50
50
 
51
- __version__ = "0.3.1"
51
+ __version__ = "0.3.2"
52
52
  __all__ = [
53
53
  "MicMap", "read_mic", "GrainList", "read_grains", "ff", "laue",
54
54
  "LaueSolutions", "LaueSpots", "read_solutions", "read_spots",
@@ -4,9 +4,24 @@ from __future__ import annotations
4
4
  import argparse
5
5
  from pathlib import Path
6
6
 
7
+ # ── MIDAS preflight: richer argument errors when midas-params is installed ───
8
+ _MIDAS_DIST = "midas-plotting"
9
+
10
+
11
+ def _midas_make_parser(*a, **kw):
12
+ """ArgumentParser factory. Uses midas_params' subclass when available so
13
+ argument errors carry the running version and a did-you-mean; falls back to
14
+ stock argparse otherwise, so this stays an optional dependency."""
15
+ try:
16
+ from midas_params.preflight import MidasArgumentParser
17
+ except Exception:
18
+ return argparse.ArgumentParser(*a, **kw)
19
+ return MidasArgumentParser(*a, package=_MIDAS_DIST, **kw)
20
+
21
+
7
22
 
8
23
  def main(argv=None) -> int:
9
- ap = argparse.ArgumentParser(
24
+ ap = _midas_make_parser(
10
25
  prog="midas-plot",
11
26
  description="Standard MIDAS reconstruction maps (orientation, "
12
27
  "confidence, grains).")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: midas-plotting
3
- Version: 0.3.1
3
+ Version: 0.3.2
4
4
  Summary: Standard plots for MIDAS reconstructions - near-field, far-field and Laue: IPF maps and legends, grain maps, pole figures, strain and size distributions, and Laue texture diagnostics against their chance levels.
5
5
  Author-email: Hemant Sharma <hsharma@anl.gov>
6
6
  License: BSD-3-Clause
@@ -11,6 +11,7 @@ Classifier: Operating System :: OS Independent
11
11
  Classifier: Topic :: Scientific/Engineering :: Physics
12
12
  Requires-Python: >=3.9
13
13
  Description-Content-Type: text/markdown
14
+ Requires-Dist: midas-params>=0.9.0
14
15
  Requires-Dist: numpy>=1.22
15
16
  Requires-Dist: matplotlib>=3.5
16
17
  Requires-Dist: midas-stress>=0.1
@@ -1,3 +1,4 @@
1
+ midas-params>=0.9.0
1
2
  numpy>=1.22
2
3
  matplotlib>=3.5
3
4
  midas-stress>=0.1
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "midas-plotting"
7
- version = "0.3.1"
7
+ version = "0.3.2"
8
8
  description = "Standard plots for MIDAS reconstructions - near-field, far-field and Laue: IPF maps and legends, grain maps, pole figures, strain and size distributions, and Laue texture diagnostics against their chance levels."
9
9
  readme = "README.md"
10
10
  license = { text = "BSD-3-Clause" }
@@ -20,6 +20,7 @@ classifiers = [
20
20
  "Topic :: Scientific/Engineering :: Physics",
21
21
  ]
22
22
  dependencies = [
23
+ "midas-params>=0.9.0", # preflight: CLI errors + path checks
23
24
  "numpy>=1.22",
24
25
  "matplotlib>=3.5",
25
26
  "midas-stress>=0.1",
File without changes
File without changes