offspot-config 2.2.3__tar.gz → 2.2.5__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 (55) hide show
  1. {offspot_config-2.2.3 → offspot_config-2.2.5}/CHANGELOG.md +17 -1
  2. {offspot_config-2.2.3 → offspot_config-2.2.5}/PKG-INFO +1 -1
  3. {offspot_config-2.2.3 → offspot_config-2.2.5}/src/offspot_config/builder.py +4 -4
  4. {offspot_config-2.2.3 → offspot_config-2.2.5}/src/offspot_config/utils/dashboard.py +5 -0
  5. offspot_config-2.2.5/src/offspot_runtime/__about__.py +1 -0
  6. {offspot_config-2.2.3 → offspot_config-2.2.5}/tests/test_reader.py +7 -7
  7. offspot_config-2.2.3/src/offspot_runtime/__about__.py +0 -1
  8. {offspot_config-2.2.3 → offspot_config-2.2.5}/.gitignore +0 -0
  9. {offspot_config-2.2.3 → offspot_config-2.2.5}/.pre-commit-config.yaml +0 -0
  10. {offspot_config-2.2.3 → offspot_config-2.2.5}/LICENSE +0 -0
  11. {offspot_config-2.2.3 → offspot_config-2.2.5}/README.md +0 -0
  12. {offspot_config-2.2.3 → offspot_config-2.2.5}/pyproject.toml +0 -0
  13. {offspot_config-2.2.3 → offspot_config-2.2.5}/src/offspot_config/__init__.py +0 -0
  14. {offspot_config-2.2.3 → offspot_config-2.2.5}/src/offspot_config/branding/horizontal-logo-light.png +0 -0
  15. {offspot_config-2.2.3 → offspot_config-2.2.5}/src/offspot_config/branding/square-logo-light.png +0 -0
  16. {offspot_config-2.2.3 → offspot_config-2.2.5}/src/offspot_config/catalog.json +0 -0
  17. {offspot_config-2.2.3 → offspot_config-2.2.5}/src/offspot_config/catalog.py +0 -0
  18. {offspot_config-2.2.3 → offspot_config-2.2.5}/src/offspot_config/constants.py +0 -0
  19. {offspot_config-2.2.3 → offspot_config-2.2.5}/src/offspot_config/file.py +0 -0
  20. {offspot_config-2.2.3 → offspot_config-2.2.5}/src/offspot_config/inputs/__init__.py +0 -0
  21. {offspot_config-2.2.3 → offspot_config-2.2.5}/src/offspot_config/inputs/base.py +0 -0
  22. {offspot_config-2.2.3 → offspot_config-2.2.5}/src/offspot_config/inputs/checksum.py +0 -0
  23. {offspot_config-2.2.3 → offspot_config-2.2.5}/src/offspot_config/inputs/file.py +0 -0
  24. {offspot_config-2.2.3 → offspot_config-2.2.5}/src/offspot_config/inputs/mainconfig.py +0 -0
  25. {offspot_config-2.2.3 → offspot_config-2.2.5}/src/offspot_config/inputs/oci.py +0 -0
  26. {offspot_config-2.2.3 → offspot_config-2.2.5}/src/offspot_config/inputs/output.py +0 -0
  27. {offspot_config-2.2.3 → offspot_config-2.2.5}/src/offspot_config/inputs/str.py +0 -0
  28. {offspot_config-2.2.3 → offspot_config-2.2.5}/src/offspot_config/inputs/ways.py +0 -0
  29. {offspot_config-2.2.3 → offspot_config-2.2.5}/src/offspot_config/oci_images.py +0 -0
  30. {offspot_config-2.2.3 → offspot_config-2.2.5}/src/offspot_config/packages.py +0 -0
  31. {offspot_config-2.2.3 → offspot_config-2.2.5}/src/offspot_config/utils/__init__.py +0 -0
  32. {offspot_config-2.2.3 → offspot_config-2.2.5}/src/offspot_config/utils/download.py +0 -0
  33. {offspot_config-2.2.3 → offspot_config-2.2.5}/src/offspot_config/utils/misc.py +0 -0
  34. {offspot_config-2.2.3 → offspot_config-2.2.5}/src/offspot_config/utils/sizes.py +0 -0
  35. {offspot_config-2.2.3 → offspot_config-2.2.5}/src/offspot_config/utils/yaml.py +0 -0
  36. {offspot_config-2.2.3 → offspot_config-2.2.5}/src/offspot_config/zim.py +0 -0
  37. {offspot_config-2.2.3 → offspot_config-2.2.5}/src/offspot_runtime/__init__.py +0 -0
  38. {offspot_config-2.2.3 → offspot_config-2.2.5}/src/offspot_runtime/ap.py +0 -0
  39. {offspot_config-2.2.3 → offspot_config-2.2.5}/src/offspot_runtime/checks.py +0 -0
  40. {offspot_config-2.2.3 → offspot_config-2.2.5}/src/offspot_runtime/configlib.py +0 -0
  41. {offspot_config-2.2.3 → offspot_config-2.2.5}/src/offspot_runtime/containers.py +0 -0
  42. {offspot_config-2.2.3 → offspot_config-2.2.5}/src/offspot_runtime/dnsmasqspoof.py +0 -0
  43. {offspot_config-2.2.3 → offspot_config-2.2.5}/src/offspot_runtime/ethernet.py +0 -0
  44. {offspot_config-2.2.3 → offspot_config-2.2.5}/src/offspot_runtime/firmware.py +0 -0
  45. {offspot_config-2.2.3 → offspot_config-2.2.5}/src/offspot_runtime/fromfile.py +0 -0
  46. {offspot_config-2.2.3 → offspot_config-2.2.5}/src/offspot_runtime/hostname.py +0 -0
  47. {offspot_config-2.2.3 → offspot_config-2.2.5}/src/offspot_runtime/timezone.py +0 -0
  48. {offspot_config-2.2.3 → offspot_config-2.2.5}/tasks.py +0 -0
  49. {offspot_config-2.2.3 → offspot_config-2.2.5}/tests/conftest.py +0 -0
  50. {offspot_config-2.2.3 → offspot_config-2.2.5}/tests/test_catalog.py +0 -0
  51. {offspot_config-2.2.3 → offspot_config-2.2.5}/tests/test_checks.py +0 -0
  52. {offspot_config-2.2.3 → offspot_config-2.2.5}/tests/test_humanid.py +0 -0
  53. {offspot_config-2.2.3 → offspot_config-2.2.5}/tests/test_inputs.py +0 -0
  54. {offspot_config-2.2.3 → offspot_config-2.2.5}/tests/test_link.py +0 -0
  55. {offspot_config-2.2.3 → offspot_config-2.2.5}/tests/test_zim.py +0 -0
@@ -5,7 +5,23 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
- ## [2.23] - 2024-04-26
8
+ ## [2.2.5] - 2024-05-21
9
+
10
+ ### Added
11
+
12
+ - [utils.dashboard] New `Reader.to_dashboard_dict()` returning dashboard-transformed download URL
13
+
14
+ ### Fixed
15
+
16
+ - [builder] Reader download link using local URL
17
+
18
+ ## [2.2.4] - 2024-05-01
19
+
20
+ ### Changed
21
+
22
+ - [builder] Using captive-portal 1.4.3 fixing 2.2.1 regression
23
+
24
+ ## [2.2.3] - 2024-04-26
9
25
 
10
26
  ### Fixed
11
27
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: offspot-config
3
- Version: 2.2.3
3
+ Version: 2.2.5
4
4
  Summary: Offspot Config helpers
5
5
  Project-URL: Homepage, https://github.com/offspot/offspot-config
6
6
  Project-URL: Donate, https://www.kiwix.org/en/support-us/
@@ -49,9 +49,9 @@ KIWIX_ZIM_LOAD_BALANCER_URL = "https://download.kiwix.org/zim/"
49
49
  # data source for “internal images” (out of catalog)
50
50
  INTERNAL_IMAGES = {
51
51
  "captive-portal": {
52
- "source": "ghcr.io/offspot/captive-portal:1.4.2",
53
- "filesize": 189900800,
54
- "fullsize": 189833272,
52
+ "source": "ghcr.io/offspot/captive-portal:1.4.3",
53
+ "filesize": 189890560,
54
+ "fullsize": 189818424,
55
55
  },
56
56
  "dashboard": {
57
57
  "source": "ghcr.io/offspot/dashboard:1.3.1",
@@ -294,7 +294,7 @@ class ConfigBuilder:
294
294
 
295
295
  if self.dashboard_readers:
296
296
  payload["readers"] = [
297
- reader.to_dict()
297
+ reader.to_dashboard_dict(download_fqdn=f"{ZIMDL_PREFIX}.{self.fqdn}")
298
298
  for reader in sorted(self.dashboard_readers, key=Reader.sort)
299
299
  ]
300
300
 
@@ -30,6 +30,11 @@ class Reader(NamedTuple):
30
30
 
31
31
  return {field: value_or_dict(getattr(self, field)) for field in self._fields}
32
32
 
33
+ def to_dashboard_dict(self, download_fqdn: str) -> dict[str, str | int]:
34
+ data = self.to_dict()
35
+ data["download_url"] = f"//{download_fqdn}/{data['filename']!s}"
36
+ return data
37
+
33
38
  @property
34
39
  def order(self) -> int:
35
40
  """sort-usable order based on reader's platform popularity"""
@@ -0,0 +1 @@
1
+ __version__ = "2.2.5"
@@ -27,8 +27,8 @@ REALISTIC_VALUES = [
27
27
  ),
28
28
  (
29
29
  "macos",
30
- "https://download.kiwix.org/release/kiwix-desktop-macos/kiwix-desktop-macos_3.1.0.dmg",
31
- "kiwix-desktop-macos_3.1.0.dmg",
30
+ "https://download.kiwix.org/release/kiwix-macos/kiwix-macos_3.1.0.dmg",
31
+ "kiwix-macos_3.1.0.dmg",
32
32
  16051402,
33
33
  "747fd0841b56d2d5158e0e65646b1be1",
34
34
  ),
@@ -47,8 +47,8 @@ REALISTIC_VALUES = [
47
47
  "kiwix-3.9.1.apk",
48
48
  ),
49
49
  (
50
- "https://download.kiwix.org/release/kiwix-desktop-macos/kiwix-desktop-macos_3.1.0.dmg",
51
- "kiwix-desktop-macos_3.1.0.dmg",
50
+ "https://download.kiwix.org/release/kiwix-macos/kiwix-macos_3.1.0.dmg",
51
+ "kiwix-macos_3.1.0.dmg",
52
52
  ),
53
53
  (
54
54
  "https://download.kiwix.org/release/kiwix-desktop/kiwix-desktop_x86_64_2.3.1-4.appimage",
@@ -201,14 +201,14 @@ def test_sort_order():
201
201
  ),
202
202
  (
203
203
  "macos",
204
- "https://download.kiwix.org/release/kiwix-desktop-macos/kiwix-desktop-macos_3.1.0.dmg",
204
+ "https://download.kiwix.org/release/kiwix-macos/kiwix-macos_3.1.0.dmg",
205
205
  None,
206
206
  None,
207
207
  None,
208
208
  {
209
209
  "platform": "macos",
210
- "download_url": "https://download.kiwix.org/release/kiwix-desktop-macos/kiwix-desktop-macos_3.1.0.dmg",
211
- "filename": "kiwix-desktop-macos_3.1.0.dmg",
210
+ "download_url": "https://download.kiwix.org/release/kiwix-macos/kiwix-macos_3.1.0.dmg",
211
+ "filename": "kiwix-macos_3.1.0.dmg",
212
212
  "size": 16051402,
213
213
  "checksum": None,
214
214
  },
@@ -1 +0,0 @@
1
- __version__ = "2.2.3"
File without changes
File without changes
File without changes