4
4
5
5
Module providing basic tools to manage a *package registry*, by which is meant a package
6
6
environment, together with "package metata", in the form of a dictionary of TOML-parsable
7
- values, keyed on the environment's package dependencies, which is stored in TOML file.
8
- This file is called Metadata.toml and lives in the environment file containing the
9
- environment Project.toml file. Not to be confused with a package registry in the sense of
10
- the standard library, `Pkg`.
7
+ values, keyed on the environment's package dependencies, which is stored in a TOML file in
8
+ the same directory as the Project.toml file for the environment. This file is called
9
+ Metadata.toml and lives in the environment file containing the environment Project.toml
10
+ file. Not to be confused with a package registry in the sense of the standard library,
11
+ `Pkg`.
11
12
12
13
# Methods
13
14
14
- - [ `GenericRegistry.dependencies(environment)`](@ref) : Get a list of the environment's
15
+ - `GenericRegistry.dependencies(environment)`: Get a list of the environment's
15
16
dependencies (vector of package name strings).
16
17
17
18
- [`GenericRegistry.run`](@ref): In a new Julia process, load a package (or packages) from
18
- the package environment and execute a Julia expression there; results are returnedn as
19
- `Future` objects to allow asynchronous `run` calls. Useful for generating metadata about
20
- a package.
19
+ the package environment and execute a Julia expression there; results are returned as
20
+ `Future` objects, to allow asynchronous `run` calls. Useful for generating metadata about
21
+ a package.
21
22
22
- - [ `GenericRegistry.close(future)`](@ref) : Shut down the process intitiated by the `run`
23
+ - `GenericRegistry.close(future)`: Shut down the process intitiated by the `run`
23
24
call that returned `future` (after calling `fetch(future)` to get the result of
24
25
evaluation).
25
26
26
- - [`GenericRegisry .put`](@ref): Insert an item in the metadata dictionary
27
+ - [`GenericRegistry .put`](@ref): Insert an item in the metadata dictionary
27
28
28
29
- [`GenericRegistry.get`](@ref): Inspect the metadata
29
30
@@ -43,7 +44,7 @@ Pkg.status()
43
44
# [bd369af6] Tables v1.12.1
44
45
45
46
Pkg.activate(temp=true)
46
- Pkg.add("MLJModels ")
47
+ Pkg.add("MLJModelRegistry ")
47
48
using MLJModels.GenericRegistry
48
49
packages = GenericRegistry.dependencies(env)
49
50
# 2-element Vector{String}:
117
118
# # METHODS
118
119
119
120
"""
120
- run(ex, pkgs[, environment])
121
+ GenericRegistry. run(ex, pkgs[, environment])
121
122
122
123
In a temporary Julia process, evaluate the expression `ex` after importing the specified
123
124
packages, `pkgs`, using an instantiated version of the specified package `environment`,
160
161
close (future) = rmprocs (future. where)
161
162
162
163
"""
163
- put(pkg, value, environment)
164
+ GenericRegistry. put(pkg, value, environment)
164
165
165
166
In the metata dictionary associated with specified package environment, assign `value` to
166
167
the key `pkg`.
@@ -178,7 +179,7 @@ function put(pkg, value, env)
178
179
end
179
180
180
181
"""
181
- get(pkg, environment)
182
+ GenericRegistry. get(pkg, environment)
182
183
183
184
Return the metadata associated with package, `pkg`, if it is a dependency of `environment`
184
185
and if `pkg` is a key in associated metadata dictionary. Otherwise, return `nothing`.
@@ -193,7 +194,7 @@ function get(pkg, env)
193
194
end
194
195
195
196
"""
196
- gc(environment)
197
+ GenericRegistry. gc(environment)
197
198
198
199
Remove key-value pairs from the metadata dictionary associated with the specified
199
200
`environment` in all cases in which the key is not a package dependency. An optional
0 commit comments