@@ -25,22 +25,22 @@ function clean!(dic, pkg)
25
25
return dic
26
26
end
27
27
28
- # develop MLJModelRegistry into the specifified `registry` project:
28
+ # develop MLJModelRegistryTools into the specifified `registry` project:
29
29
function setup (registry)
30
30
ex = quote
31
31
# REMOVE THIS NEXT LINE AFTER TAGGING NEW MLJMODELINTERFACE
32
32
Pkg. develop (path= " /Users/anthony/MLJ/MLJModelInterface/" )
33
- Pkg. develop (path= $ ROOT) # MLJModelRegistry
33
+ Pkg. develop (path= $ ROOT) # MLJModelRegistryTools
34
34
end
35
35
future = GenericRegistry. run ([], ex; environment= registry)
36
36
fetch (future)
37
37
GenericRegistry. close (future)
38
38
end
39
39
40
- # remove MLJModelRegistry from the specifified `registry` project:
40
+ # remove MLJModelRegistryTools from the specifified `registry` project:
41
41
function cleanup (registry)
42
42
ex = quote
43
- Pkg. rm (" MLJModelRegistry " )
43
+ Pkg. rm (" MLJModelRegistryTools " )
44
44
end
45
45
future = GenericRegistry. run ([], ex; environment= registry)
46
46
fetch (future)
53
53
*Private method.*
54
54
55
55
Extract the metadata for a package. Returns a `Future` object that must be `fetch`ed to
56
- get the metadata. See, [`MLJModelRegistry .update`](@ref), which calls this method, for
56
+ get the metadata. See, [`MLJModelRegistryTools .update`](@ref), which calls this method, for
57
57
more details.
58
58
59
- Assumes that MLJModelRegistry has been `develop`ed into `registry` if this is non-empty.
59
+ Assumes that MLJModelRegistryTools has been `develop`ed into `registry` if this is non-empty.
60
60
61
61
"""
62
62
function metadata (pkg; registry= " " , check_traits= true )
@@ -68,12 +68,12 @@ function metadata(pkg; registry="", check_traits=true)
68
68
setup = quote
69
69
# REMOVE THIS NEXT LINE AFTER TAGGING NEW MLJMODELINTERFACE
70
70
Pkg. develop (path= " /Users/anthony/MLJ/MLJModelInterface/" )
71
- Pkg. develop (path= $ ROOT) # MLJModelRegistry
71
+ Pkg. develop (path= $ ROOT) # MLJModelRegistryTools
72
72
end
73
73
end
74
74
program = quote
75
- import MLJModelRegistry
76
- MLJModelRegistry . traits_given_constructor_name (
75
+ import MLJModelRegistryTools
76
+ MLJModelRegistryTools . traits_given_constructor_name (
77
77
$ pkg,
78
78
check_traits= $ check_traits,
79
79
)
85
85
# # PUBLIC METHODS
86
86
87
87
"""
88
- MLJModelRegistry .gc()
88
+ MLJModelRegistryTools .gc()
89
89
90
90
Remove the metadata associated with any packages that are no longer in the the model
91
91
registry.
@@ -105,7 +105,7 @@ strings, and record this in the MLJ model registry (write it to
105
105
106
106
Assumes `pkg` is already a dependency in the Julia environment defined at `/registry/` and
107
107
uses the version of `pkg` consistent with the current environment manifest, after
108
- MLJModelRegistry .jl has been `develop`ed into that environment (it is removed again after
108
+ MLJModelRegistryTools .jl has been `develop`ed into that environment (it is removed again after
109
109
the update). See documentation for details on the registration process.
110
110
111
111
```julia-repl
@@ -127,7 +127,7 @@ The metadata dictionary, keyed on models (more precisely, constructors, thereof)
127
127
force latest versions if these are being blocked by other packages.
128
128
129
129
- `debug=false`: Calling `update` opens a temporary Julia process to extract the trait
130
- metadata (see [`MLJModelRegistry .GenericRegistry.run`](@ref)). By default, this process
130
+ metadata (see [`MLJModelRegistryTools .GenericRegistry.run`](@ref)). By default, this process
131
131
is shut down before rethrowing any exceptions that occurs there. Setting `debug=true`
132
132
will leave the process open, and also block the default suppression of the remote worker
133
133
standard output.
@@ -143,7 +143,7 @@ update(pkg, ::Quiet, registry, check_traits) =
143
143
@suppress _update (pkg, false , registry, check_traits)
144
144
function _update (pkg, debug, registry, check_traits)
145
145
isempty (registry) || setup (registry)
146
- future = MLJModelRegistry . metadata (pkg; registry, check_traits)
146
+ future = MLJModelRegistryTools . metadata (pkg; registry, check_traits)
147
147
metadata = try
148
148
fetch (future)
149
149
catch excptn
@@ -205,7 +205,7 @@ function update(
205
205
batch = pkgs[pos: pos + n - 1 ]
206
206
@suppress begin
207
207
futures =
208
- [MLJModelRegistry . metadata (pkg; registry, check_traits) for pkg in batch]
208
+ [MLJModelRegistryTools . metadata (pkg; registry, check_traits) for pkg in batch]
209
209
try
210
210
for (i, f) in enumerate (futures)
211
211
GenericRegistry. put (batch[i], fetch (f), registry_path ())
@@ -226,11 +226,11 @@ function update(
226
226
end
227
227
228
228
"""
229
- MLJModelRegistry .get(pkg)
229
+ MLJModelRegistryTools .get(pkg)
230
230
231
231
Inspect the model trait metadata recorded in the Model Registry for those models in
232
232
`pkg`. Returns a dictionary keyed on model constructor name. Data is in serialized form;
233
- see [`MLJModelRegistry .encode_dic`](@ref).
233
+ see [`MLJModelRegistryTools .encode_dic`](@ref).
234
234
235
235
"""
236
236
get (pkg) = GenericRegistry. get (pkg, registry_path ())
0 commit comments