lutaml-store 0.2.4 → 0.3.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b6093f17ea0bca9240b608835a29b8f060a0c8c41be950e93fc0713e8c1b9444
4
- data.tar.gz: f0f9ee8ace22fa22ec62408425ba7fa479648c57158c92967bc8e235fd037285
3
+ metadata.gz: 34e9babf679b2654a563c89d68552afd0b2d98d5725656eb9baa2f1a878a80f4
4
+ data.tar.gz: 599409d62bfe96b0e57147f620aef55ea88abe40b5183bdfb02511d3a91ea281
5
5
  SHA512:
6
- metadata.gz: 97a8aa5dc0d52617b1f4d97bd8378664eead01e299410d8dd506b775be23d69616008cde2e053b6a649819726048afdd2b227a455979630b2f07d04e76deed6d
7
- data.tar.gz: b80834cd232f87d378c0a3a5f7ea17ef2c7ea2d68103d890756eabb2f2c85e20e1b1f193ec64cd0198fdb4235c0ff68ca6de87e788b7aabaa26b49a081e2023e
6
+ metadata.gz: 77f4022441c6b6ab2f63b5106a2ca3bba16abab82bf75adbe8569ec73a0eb6cd824891920e5571e7a2f7b39c9d56ac5bd2824418f24aa8577abf893645941062
7
+ data.tar.gz: dbe7804392b8b32135c77f3766b6976a8111a357b40bfdad563906d59205a0305dfd3f467b371ba423859a6ebbb8a7fa8d8baef905875a6097478763ed2d6b43
data/README.adoc CHANGED
@@ -17,8 +17,64 @@ It offers a unified interface for storing and retrieving complex model
17
17
  hierarchies, batch file I/O with multiple serialization formats, HTTP-aware
18
18
  caching, and package-based persistence with ZIP and directory transports.
19
19
 
20
+ It also provides **read-only Sources** for working with data repositories that
21
+ live outside your process — GitHub Pages, any static host, a REST API, a local
22
+ package directory, or a `.zip` distribution — through one facade that never
23
+ guesses which layer answered.
24
+
25
+ == Quick start: read a LutaML data repository
26
+
27
+ The same read API whether the data lives in the cloud, a local package, or a
28
+ downloaded `.zip` — backends are configured, never guessed:
29
+
30
+ [source,ruby]
31
+ ----
32
+ require "lutaml/store"
33
+
34
+ # From a cloud API (api.relaton.org is the reference implementation)
35
+ repo = Lutaml::Store::Repository.new(
36
+ source: Lutaml::Store::Source.for(:rest,
37
+ base_url: "https://api.relaton.org", collection: "ietf"),
38
+ cache: Lutaml::Store::Source.for(:directory, path: "~/.cache/relaton/ietf"),
39
+ )
40
+
41
+ # From a local GCR-style package — identical read API
42
+ repo = Lutaml::Store::Repository.new(
43
+ source: Lutaml::Store::Source.for(:directory, path: "~/gcr/relaton/ietf"),
44
+ )
45
+
46
+ # From a downloaded .zip distribution — same API
47
+ repo = Lutaml::Store::Repository.new(
48
+ source: Lutaml::Store::Source.for(:zip, path: "ietf.zip"),
49
+ )
50
+
51
+ # Read
52
+ repo.read("RFC 7231") # => bytes
53
+ repo.exist?("RFC 7231") # => true
54
+ repo.keys # => ["RFC 7231", ...]
55
+ repo.manifest # => Lutaml::Store::Manifest
56
+
57
+ # Parse into your model — the model class is declared, never inferred
58
+ repo.get("RFC 7231", MyModel)
59
+
60
+ # Search by metadata fields
61
+ repo.search(docid: "RFC 7231")
62
+
63
+ # Pull the whole collection into a local GCR-style package
64
+ repo.pull!(into: "~/gcr/relaton", collection: "ietf")
65
+
66
+ # Offline mode: never touch the source, serve from the local package only
67
+ offline = Lutaml::Store::Repository.new(source: repo.source, cache: repo.cache, mode: :offline)
68
+ offline.read("RFC 7231") # served from the cache, no network
69
+
70
+
71
+
20
72
  == Features
21
73
 
74
+ * **Repository** — the uniform facade: one read API over any source (cloud, local, zip), explicit cache, online/offline modes
75
+ * **Source** (read-only) — Directory, Zip, Https (ETag/304), Rest (the lutaml cloud store API); 404 = NotFoundError, transport = BackendError
76
+ * **Manifest** — the enumeration SSOT: keys, sha256 digests, opaque shard metadata
77
+ * **Mirror** — pull any source into a GCR-style package (incremental, digest-verified); pack to a distributable .zip
22
78
  * **DatabaseStore** — high-level CRUD with model registry, polymorphism, composites
23
79
  * **PackageStore** — structured multi-model packages with ZIP and directory transport
24
80
  * **BasicStore** — low-level key-value store with optional cache, events, monitoring
@@ -0,0 +1,12 @@
1
+ import { defineConfig } from "astro/config";
2
+ import vue from "@astrojs/vue";
3
+ import tailwindcss from "@tailwindcss/vite";
4
+
5
+ export default defineConfig({
6
+ site: "https://lutaml.github.io",
7
+ base: "/lutaml-store",
8
+ integrations: [vue()],
9
+ vite: {
10
+ plugins: [tailwindcss()],
11
+ },
12
+ });