Skip to content

Commit 1f290d9

Browse files
committed
DOC - adding registry concept and starting use cases
1 parent 932cb59 commit 1f290d9

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

doc/source/devel/data_pkg_discuss.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,11 @@ Metadata
133133
is data about the package itself. It might include information about what
134134
data is in the database.
135135

136+
Registry
137+
--------
138+
139+
Something that can be queried to *discover* a package instantiation.
140+
136141
Desiderata
137142
++++++++++
138143

@@ -203,6 +208,7 @@ well. git_ stores (effectively) all previous versions of the files in the
203208
repository, as zlib compressed blobs. The working tree is an uncompressed
204209
instantiation of the current state. Thus, if we have, over time, had 4
205210
different versions of a large file with little standard diff relationship to one
211+
Discovery
206212
another, the repository will have four zlib compressed versions of the file in
207213
the ``.git/objects`` database, and one uncompressed version in the working tree.
208214
The files in data packages may or may not compress well.
@@ -220,4 +226,19 @@ Maybe the way to think of it is of the different costs that become important as
220226
files get larger. So the cost for holding a full history becomes very large,
221227
whereas the benefit decreases a little bit (compared to code).
222228

229+
Some usecases
230+
+++++++++++++
231+
232+
Discovery
233+
---------
234+
235+
::
236+
from ourpkg import default_registry
237+
238+
my_pkg_path = default_registry.pathfor('mypkg', '0.3')
239+
if mypkg_path is None:
240+
raise RuntimeError('It looks like mypkg version 0.3 is not installed')
241+
242+
243+
223244
.. include:: ../links_names.txt

0 commit comments

Comments
 (0)