eofigs 0.2.1__tar.gz → 0.2.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 (60) hide show
  1. {eofigs-0.2.1 → eofigs-0.2.2}/CHANGELOG.md +20 -0
  2. {eofigs-0.2.1 → eofigs-0.2.2}/CITATION.cff +2 -2
  3. {eofigs-0.2.1 → eofigs-0.2.2}/PKG-INFO +5 -5
  4. {eofigs-0.2.1 → eofigs-0.2.2}/README.md +3 -3
  5. {eofigs-0.2.1 → eofigs-0.2.2}/pyproject.toml +1 -1
  6. {eofigs-0.2.1 → eofigs-0.2.2}/src/eofigs/__init__.py +1 -1
  7. eofigs-0.2.2/tests/test_zenodo_draft.py +75 -0
  8. {eofigs-0.2.1 → eofigs-0.2.2}/.gitignore +0 -0
  9. {eofigs-0.2.1 → eofigs-0.2.2}/LICENSE +0 -0
  10. {eofigs-0.2.1 → eofigs-0.2.2}/conftest.py +0 -0
  11. {eofigs-0.2.1 → eofigs-0.2.2}/src/eofigs/_colour.py +0 -0
  12. {eofigs-0.2.1 → eofigs-0.2.2}/src/eofigs/_countries.py +0 -0
  13. {eofigs-0.2.1 → eofigs-0.2.2}/src/eofigs/_presets.py +0 -0
  14. {eofigs-0.2.1 → eofigs-0.2.2}/src/eofigs/accuracy.py +0 -0
  15. {eofigs-0.2.1 → eofigs-0.2.2}/src/eofigs/check.py +0 -0
  16. {eofigs-0.2.1 → eofigs-0.2.2}/src/eofigs/data/journals.json +0 -0
  17. {eofigs-0.2.1 → eofigs-0.2.2}/src/eofigs/data/ne_110m_countries.geojson +0 -0
  18. {eofigs-0.2.1 → eofigs-0.2.2}/src/eofigs/data/variables.json +0 -0
  19. {eofigs-0.2.1 → eofigs-0.2.2}/src/eofigs/events.py +0 -0
  20. {eofigs-0.2.1 → eofigs-0.2.2}/src/eofigs/export.py +0 -0
  21. {eofigs-0.2.1 → eofigs-0.2.2}/src/eofigs/figures.py +0 -0
  22. {eofigs-0.2.1 → eofigs-0.2.2}/src/eofigs/maps.py +0 -0
  23. {eofigs-0.2.1 → eofigs-0.2.2}/src/eofigs/palettes.py +0 -0
  24. {eofigs-0.2.1 → eofigs-0.2.2}/src/eofigs/py.typed +0 -0
  25. {eofigs-0.2.1 → eofigs-0.2.2}/src/eofigs/raster.py +0 -0
  26. {eofigs-0.2.1 → eofigs-0.2.2}/src/eofigs/stats.py +0 -0
  27. {eofigs-0.2.1 → eofigs-0.2.2}/src/eofigs/styling.py +0 -0
  28. {eofigs-0.2.1 → eofigs-0.2.2}/src/eofigs/trends.py +0 -0
  29. {eofigs-0.2.1 → eofigs-0.2.2}/src/eofigs/variables.py +0 -0
  30. {eofigs-0.2.1 → eofigs-0.2.2}/tests/baseline/test_accuracy_scatter_density_image.png +0 -0
  31. {eofigs-0.2.1 → eofigs-0.2.2}/tests/baseline/test_accuracy_scatter_groups_image.png +0 -0
  32. {eofigs-0.2.1 → eofigs-0.2.2}/tests/baseline/test_event_composite_image.png +0 -0
  33. {eofigs-0.2.1 → eofigs-0.2.2}/tests/baseline/test_event_composite_two_phases_image.png +0 -0
  34. {eofigs-0.2.1 → eofigs-0.2.2}/tests/baseline/test_north_arrow_and_scale_bar_image.png +0 -0
  35. {eofigs-0.2.1 → eofigs-0.2.2}/tests/baseline/test_study_area_map_inside_image.png +0 -0
  36. {eofigs-0.2.1 → eofigs-0.2.2}/tests/baseline/test_study_area_map_side_image.png +0 -0
  37. {eofigs-0.2.1 → eofigs-0.2.2}/tests/baseline/test_trend_map_dots_image.png +0 -0
  38. {eofigs-0.2.1 → eofigs-0.2.2}/tests/baseline/test_trend_map_hatch_image.png +0 -0
  39. {eofigs-0.2.1 → eofigs-0.2.2}/tests/baseline/test_trend_map_profile_image.png +0 -0
  40. {eofigs-0.2.1 → eofigs-0.2.2}/tests/conftest.py +0 -0
  41. {eofigs-0.2.1 → eofigs-0.2.2}/tests/geo_helpers.py +0 -0
  42. {eofigs-0.2.1 → eofigs-0.2.2}/tests/test_accuracy.py +0 -0
  43. {eofigs-0.2.1 → eofigs-0.2.2}/tests/test_check.py +0 -0
  44. {eofigs-0.2.1 → eofigs-0.2.2}/tests/test_colour.py +0 -0
  45. {eofigs-0.2.1 → eofigs-0.2.2}/tests/test_docs_presets.py +0 -0
  46. {eofigs-0.2.1 → eofigs-0.2.2}/tests/test_docs_variables.py +0 -0
  47. {eofigs-0.2.1 → eofigs-0.2.2}/tests/test_events.py +0 -0
  48. {eofigs-0.2.1 → eofigs-0.2.2}/tests/test_export.py +0 -0
  49. {eofigs-0.2.1 → eofigs-0.2.2}/tests/test_figures.py +0 -0
  50. {eofigs-0.2.1 → eofigs-0.2.2}/tests/test_glyphs.py +0 -0
  51. {eofigs-0.2.1 → eofigs-0.2.2}/tests/test_house_style.py +0 -0
  52. {eofigs-0.2.1 → eofigs-0.2.2}/tests/test_import.py +0 -0
  53. {eofigs-0.2.1 → eofigs-0.2.2}/tests/test_map_images.py +0 -0
  54. {eofigs-0.2.1 → eofigs-0.2.2}/tests/test_maps.py +0 -0
  55. {eofigs-0.2.1 → eofigs-0.2.2}/tests/test_presets.py +0 -0
  56. {eofigs-0.2.1 → eofigs-0.2.2}/tests/test_raster.py +0 -0
  57. {eofigs-0.2.1 → eofigs-0.2.2}/tests/test_stats.py +0 -0
  58. {eofigs-0.2.1 → eofigs-0.2.2}/tests/test_style.py +0 -0
  59. {eofigs-0.2.1 → eofigs-0.2.2}/tests/test_trends.py +0 -0
  60. {eofigs-0.2.1 → eofigs-0.2.2}/tests/test_variables.py +0 -0
@@ -7,6 +7,24 @@ Entries marked **Affects existing figures: re-render.** change figure output (wh
7
7
  the statistics, the layout) or caption text: figures made with an earlier version should be
8
8
  drawn again.
9
9
 
10
+ ## [Unreleased]
11
+
12
+ ## [0.2.2] - 2026-12-04
13
+
14
+ Patch release that requires cmcrameri below 2.0, the colour maps eofigs was checked
15
+ against. Support for cmcrameri 2.0 follows.
16
+
17
+ ### Changed
18
+
19
+ - eofigs requires cmcrameri below 2.0 (`cmcrameri>=1.9,<2`). cmcrameri 2.0 (December 2026)
20
+ adds colour maps and changes some colours, which eofigs has not been checked against yet;
21
+ support follows ([#45](https://github.com/kmkamilkhel/eofigs/issues/45)). The same cap is in
22
+ the development environment, the container image and the installation guide.
23
+ - The citation page and the README give the version DOI of 0.2.1
24
+ (10.5281/zenodo.24241081).
25
+ - cmcrameri now comes from conda-forge in the development environment and in the installation
26
+ guide: the conda-forge build 1.10 (build 1) reports its version correctly.
27
+
10
28
  ## [0.2.1] - 2026-11-15
11
29
 
12
30
  Patch release with two fixes found in real use: readable colour-bar ticks for small
@@ -258,6 +276,8 @@ figures: study area map, trend map, event composite and accuracy scatter.
258
276
  - Code of conduct (Contributor Covenant 2.1), issue templates, pull request template.
259
277
  - Citation file validation and coverage total in continuous integration.
260
278
 
279
+ [Unreleased]: https://github.com/kmkamilkhel/eofigs/compare/v0.2.2...HEAD
280
+ [0.2.2]: https://github.com/kmkamilkhel/eofigs/compare/v0.2.1...v0.2.2
261
281
  [0.2.1]: https://github.com/kmkamilkhel/eofigs/compare/v0.2.0...v0.2.1
262
282
  [0.2.0]: https://github.com/kmkamilkhel/eofigs/compare/v0.1.1...v0.2.0
263
283
  [0.1.1]: https://github.com/kmkamilkhel/eofigs/compare/v0.1.0...v0.1.1
@@ -2,8 +2,8 @@ cff-version: 1.2.0
2
2
  message: "If you use this software, please cite it using these metadata."
3
3
  title: "eofigs: analysis-aware, publication-ready figures for Earth observation research"
4
4
  type: software
5
- version: 0.2.1
6
- date-released: "2026-11-15"
5
+ version: 0.2.2
6
+ date-released: "2026-12-04"
7
7
  doi: 10.5281/zenodo.24053760
8
8
  abstract: >-
9
9
  eofigs turns Earth observation analysis outputs (rasters, time series and validation
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: eofigs
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: Analysis-aware, publication-ready figures for Earth observation research.
5
5
  Project-URL: Homepage, https://kmkamilkhel.github.io/eofigs/
6
6
  Project-URL: Documentation, https://kmkamilkhel.github.io/eofigs/
@@ -26,7 +26,7 @@ Classifier: Topic :: Scientific/Engineering :: Visualization
26
26
  Classifier: Typing :: Typed
27
27
  Requires-Python: >=3.11
28
28
  Requires-Dist: cartopy>=0.23
29
- Requires-Dist: cmcrameri>=1.9
29
+ Requires-Dist: cmcrameri<2,>=1.9
30
30
  Requires-Dist: geopandas>=1.0
31
31
  Requires-Dist: matplotlib-scalebar>=0.8
32
32
  Requires-Dist: matplotlib>=3.9
@@ -136,11 +136,11 @@ More in the [quickstart](https://kmkamilkhel.github.io/eofigs/quickstart/) and t
136
136
  ## Run with Docker
137
137
 
138
138
  A container image with eofigs and its geospatial stack (cartopy, rioxarray, geopandas, fonts)
139
- is published on GitHub Container Registry for each release (`0.2.1`, `latest`; `dev` follows
139
+ is published on GitHub Container Registry for each release (`0.2.2`, `latest`; `dev` follows
140
140
  the main branch):
141
141
 
142
142
  ```bash
143
- docker run --rm -v "$PWD":/work ghcr.io/kmkamilkhel/eofigs:0.2.1 python script.py
143
+ docker run --rm -v "$PWD":/work ghcr.io/kmkamilkhel/eofigs:0.2.2 python script.py
144
144
  ```
145
145
 
146
146
  ## Roadmap
@@ -183,7 +183,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) and the [Code of Conduct](CODE_OF_CONDUCT
183
183
 
184
184
  If you use eofigs, please cite it. The software is archived on Zenodo:
185
185
  [doi:10.5281/zenodo.24053760](https://doi.org/10.5281/zenodo.24053760) covers all versions, and each release
186
- has its own DOI (v0.2.0: [doi:10.5281/zenodo.24143866](https://doi.org/10.5281/zenodo.24143866)). The metadata are in
186
+ has its own DOI (v0.2.1: [doi:10.5281/zenodo.24241081](https://doi.org/10.5281/zenodo.24241081)). The metadata are in
187
187
  [CITATION.cff](CITATION.cff); the
188
188
  [citation page](https://kmkamilkhel.github.io/eofigs/citation/) has APA and BibTeX entries.
189
189
 
@@ -67,11 +67,11 @@ More in the [quickstart](https://kmkamilkhel.github.io/eofigs/quickstart/) and t
67
67
  ## Run with Docker
68
68
 
69
69
  A container image with eofigs and its geospatial stack (cartopy, rioxarray, geopandas, fonts)
70
- is published on GitHub Container Registry for each release (`0.2.1`, `latest`; `dev` follows
70
+ is published on GitHub Container Registry for each release (`0.2.2`, `latest`; `dev` follows
71
71
  the main branch):
72
72
 
73
73
  ```bash
74
- docker run --rm -v "$PWD":/work ghcr.io/kmkamilkhel/eofigs:0.2.1 python script.py
74
+ docker run --rm -v "$PWD":/work ghcr.io/kmkamilkhel/eofigs:0.2.2 python script.py
75
75
  ```
76
76
 
77
77
  ## Roadmap
@@ -114,7 +114,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) and the [Code of Conduct](CODE_OF_CONDUCT
114
114
 
115
115
  If you use eofigs, please cite it. The software is archived on Zenodo:
116
116
  [doi:10.5281/zenodo.24053760](https://doi.org/10.5281/zenodo.24053760) covers all versions, and each release
117
- has its own DOI (v0.2.0: [doi:10.5281/zenodo.24143866](https://doi.org/10.5281/zenodo.24143866)). The metadata are in
117
+ has its own DOI (v0.2.1: [doi:10.5281/zenodo.24241081](https://doi.org/10.5281/zenodo.24241081)). The metadata are in
118
118
  [CITATION.cff](CITATION.cff); the
119
119
  [citation page](https://kmkamilkhel.github.io/eofigs/citation/) has APA and BibTeX entries.
120
120
 
@@ -42,7 +42,7 @@ dependencies = [
42
42
  "scipy>=1.11",
43
43
  "matplotlib>=3.9",
44
44
  "cartopy>=0.23",
45
- "cmcrameri>=1.9",
45
+ "cmcrameri>=1.9,<2",
46
46
  "matplotlib-scalebar>=0.8",
47
47
  "rioxarray>=0.15",
48
48
  "geopandas>=1.0",
@@ -20,7 +20,7 @@ from eofigs.styling import label_panels, new_figure, set_style, style, tidy_axes
20
20
  from eofigs.trends import trend_map
21
21
  from eofigs.variables import Variable, register_variable, variable
22
22
 
23
- __version__ = "0.2.1"
23
+ __version__ = "0.2.2"
24
24
 
25
25
  __all__ = [
26
26
  "CheckReport",
@@ -0,0 +1,75 @@
1
+ """The Zenodo draft script (.github/scripts/zenodo_draft.py): retries after HTTP 5xx answers."""
2
+
3
+ import importlib.util
4
+ import io
5
+ import urllib.error
6
+ from pathlib import Path
7
+
8
+ import pytest
9
+
10
+ SCRIPT = Path(__file__).resolve().parents[1] / ".github" / "scripts" / "zenodo_draft.py"
11
+
12
+
13
+ @pytest.fixture
14
+ def zd():
15
+ spec = importlib.util.spec_from_file_location("zenodo_draft", SCRIPT)
16
+ module = importlib.util.module_from_spec(spec)
17
+ spec.loader.exec_module(module)
18
+ return module
19
+
20
+
21
+ class _Response(io.BytesIO):
22
+ def __enter__(self):
23
+ return self
24
+
25
+ def __exit__(self, *exc):
26
+ return False
27
+
28
+
29
+ def _server(monkeypatch, answers):
30
+ """Make urlopen answer with ``answers`` in turn: an HTTP code (an error) or a body (success)."""
31
+ seen = []
32
+
33
+ def urlopen(request, timeout=None):
34
+ seen.append(request.get_method())
35
+ answer = answers[len(seen) - 1]
36
+ if isinstance(answer, int):
37
+ fp = io.BytesIO(b'{"message": "error"}')
38
+ raise urllib.error.HTTPError(request.full_url, answer, "error", {}, fp)
39
+ return _Response(answer)
40
+
41
+ monkeypatch.setattr("urllib.request.urlopen", urlopen)
42
+ return seen
43
+
44
+
45
+ def test_a_5xx_answer_is_retried_with_doubling_waits(zd, monkeypatch, capsys):
46
+ seen = _server(monkeypatch, [500, 502, b'{"id": 1}'])
47
+ waits = []
48
+ out = zd.call("DELETE", "https://zenodo.test/api/x", "token", sleep=waits.append)
49
+ assert out == {"id": 1}
50
+ assert seen == ["DELETE"] * 3
51
+ assert waits == [zd.BACKOFF, 2 * zd.BACKOFF]
52
+ assert "retry 1 of 4" in capsys.readouterr().out
53
+
54
+
55
+ def test_retries_stop_after_the_limit(zd, monkeypatch):
56
+ seen = _server(monkeypatch, [503] * 10)
57
+ waits = []
58
+ with pytest.raises(zd.ZenodoError, match="HTTP 503"):
59
+ zd.call("GET", "https://zenodo.test/api/x", retries=3, backoff=1.0, sleep=waits.append)
60
+ assert len(seen) == 4
61
+ assert waits == [1.0, 2.0, 4.0]
62
+
63
+
64
+ def test_a_4xx_answer_is_not_retried(zd, monkeypatch):
65
+ seen = _server(monkeypatch, [400, b"{}"])
66
+ with pytest.raises(zd.ZenodoError, match="HTTP 400"):
67
+ zd.call("PUT", "https://zenodo.test/api/x", body={"a": 1}, sleep=lambda s: None)
68
+ assert seen == ["PUT"]
69
+
70
+
71
+ def test_post_is_never_repeated(zd, monkeypatch):
72
+ seen = _server(monkeypatch, [500, b"{}"])
73
+ with pytest.raises(zd.ZenodoError, match="HTTP 500"):
74
+ zd.call("POST", "https://zenodo.test/api/x", sleep=lambda s: None)
75
+ assert seen == ["POST"]
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
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
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes