google-cloud-notebooks 2.5.0 → 3.0.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 +4 -4
- data/AUTHENTICATION.md +3 -3
- data/README.md +2 -2
- data/lib/google/cloud/notebooks/version.rb +1 -1
- data/lib/google/cloud/notebooks.rb +71 -1
- metadata +12 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 12fa26b9b17a95c70ad93b1957924e4bca151639e42fbc0ea0da2714f0004aaf
|
4
|
+
data.tar.gz: 18f26f24817f69b355b44667f397ef80ba94040e316f27a3a5dfd269b8b3c6e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a3f76cf5d2d843a1072c193b6695ffcdcc67e57d67906e019899c2527339037d2cebcf6c4bbc9c6dfc59e65c23ffb2e65141e298351f010c665a0a0216b51be
|
7
|
+
data.tar.gz: 99a1bba2f72854ec0cbcb2d22d1d88487dcece13defeda86dd88e6b1c902c118128a6e01a2496787b1c4829fb3dd306982537c1e3e37380ec049fd75e58498a9
|
data/AUTHENTICATION.md
CHANGED
@@ -56,7 +56,7 @@ To configure a credentials file for an individual client initialization:
|
|
56
56
|
```ruby
|
57
57
|
require "google/cloud/notebooks"
|
58
58
|
|
59
|
-
client = Google::Cloud::Notebooks.
|
59
|
+
client = Google::Cloud::Notebooks.managed_notebook_service do |config|
|
60
60
|
config.credentials = "path/to/credentialfile.json"
|
61
61
|
end
|
62
62
|
```
|
@@ -70,7 +70,7 @@ Google::Cloud::Notebooks.configure do |config|
|
|
70
70
|
config.credentials = "path/to/credentialfile.json"
|
71
71
|
end
|
72
72
|
|
73
|
-
client = Google::Cloud::Notebooks.
|
73
|
+
client = Google::Cloud::Notebooks.managed_notebook_service
|
74
74
|
```
|
75
75
|
|
76
76
|
### Environment Variables
|
@@ -100,7 +100,7 @@ require "google/cloud/notebooks"
|
|
100
100
|
|
101
101
|
ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json"
|
102
102
|
|
103
|
-
client = Google::Cloud::Notebooks.
|
103
|
+
client = Google::Cloud::Notebooks.managed_notebook_service
|
104
104
|
```
|
105
105
|
|
106
106
|
### Local ADC file
|
data/README.md
CHANGED
@@ -17,7 +17,7 @@ constructing client objects. Reference documentation for the client objects
|
|
17
17
|
themselves can be found in the client library documentation for the versioned
|
18
18
|
client gems:
|
19
19
|
[google-cloud-notebooks-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-notebooks-v1/latest),
|
20
|
-
[google-cloud-notebooks-
|
20
|
+
[google-cloud-notebooks-v2](https://cloud.google.com/ruby/docs/reference/google-cloud-notebooks-v2/latest).
|
21
21
|
|
22
22
|
See also the [Product Documentation](https://cloud.google.com/ai-platform-notebooks)
|
23
23
|
for more usage information.
|
@@ -64,7 +64,7 @@ Debug logging also requires that the versioned clients for this service be
|
|
64
64
|
sufficiently recent, released after about Dec 10, 2024. If logging is not
|
65
65
|
working, try updating the versioned clients in your bundle or installed gems:
|
66
66
|
[google-cloud-notebooks-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-notebooks-v1/latest),
|
67
|
-
[google-cloud-notebooks-
|
67
|
+
[google-cloud-notebooks-v2](https://cloud.google.com/ruby/docs/reference/google-cloud-notebooks-v2/latest).
|
68
68
|
|
69
69
|
## Supported Ruby Versions
|
70
70
|
|
@@ -45,6 +45,76 @@ end
|
|
45
45
|
module Google
|
46
46
|
module Cloud
|
47
47
|
module Notebooks
|
48
|
+
##
|
49
|
+
# Create a new client object for ManagedNotebookService.
|
50
|
+
#
|
51
|
+
# By default, this returns an instance of
|
52
|
+
# [Google::Cloud::Notebooks::V1::ManagedNotebookService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-notebooks-v1/latest/Google-Cloud-Notebooks-V1-ManagedNotebookService-Client)
|
53
|
+
# for a gRPC client for version V1 of the API.
|
54
|
+
# However, you can specify a different API version by passing it in the
|
55
|
+
# `version` parameter. If the ManagedNotebookService service is
|
56
|
+
# supported by that API version, and the corresponding gem is available, the
|
57
|
+
# appropriate versioned client will be returned.
|
58
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
59
|
+
# the `transport` parameter.
|
60
|
+
#
|
61
|
+
# Raises an exception if the currently installed versioned client gem for the
|
62
|
+
# given API version does not support the given transport of the ManagedNotebookService service.
|
63
|
+
# You can determine whether the method will succeed by calling
|
64
|
+
# {Google::Cloud::Notebooks.managed_notebook_service_available?}.
|
65
|
+
#
|
66
|
+
# ## About ManagedNotebookService
|
67
|
+
#
|
68
|
+
# API v1 service for Managed Notebooks.
|
69
|
+
#
|
70
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
71
|
+
# Defaults to `:v1`.
|
72
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
73
|
+
# @return [::Object] A client object for the specified version.
|
74
|
+
#
|
75
|
+
def self.managed_notebook_service version: :v1, transport: :grpc, &block
|
76
|
+
require "google/cloud/notebooks/#{version.to_s.downcase}"
|
77
|
+
|
78
|
+
package_name = Google::Cloud::Notebooks
|
79
|
+
.constants
|
80
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
81
|
+
.first
|
82
|
+
service_module = Google::Cloud::Notebooks.const_get(package_name).const_get(:ManagedNotebookService)
|
83
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
84
|
+
service_module.const_get(:Client).new(&block)
|
85
|
+
end
|
86
|
+
|
87
|
+
##
|
88
|
+
# Determines whether the ManagedNotebookService service is supported by the current client.
|
89
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::Notebooks.managed_notebook_service}.
|
90
|
+
# If false, that method will raise an exception. This could happen if the given
|
91
|
+
# API version does not exist or does not support the ManagedNotebookService service,
|
92
|
+
# or if the versioned client gem needs an update to support the ManagedNotebookService service.
|
93
|
+
#
|
94
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
95
|
+
# Defaults to `:v1`.
|
96
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
97
|
+
# @return [boolean] Whether the service is available.
|
98
|
+
#
|
99
|
+
def self.managed_notebook_service_available? version: :v1, transport: :grpc
|
100
|
+
require "google/cloud/notebooks/#{version.to_s.downcase}"
|
101
|
+
package_name = Google::Cloud::Notebooks
|
102
|
+
.constants
|
103
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
104
|
+
.first
|
105
|
+
return false unless package_name
|
106
|
+
service_module = Google::Cloud::Notebooks.const_get package_name
|
107
|
+
return false unless service_module.const_defined? :ManagedNotebookService
|
108
|
+
service_module = service_module.const_get :ManagedNotebookService
|
109
|
+
if transport == :rest
|
110
|
+
return false unless service_module.const_defined? :Rest
|
111
|
+
service_module = service_module.const_get :Rest
|
112
|
+
end
|
113
|
+
service_module.const_defined? :Client
|
114
|
+
rescue ::LoadError
|
115
|
+
false
|
116
|
+
end
|
117
|
+
|
48
118
|
##
|
49
119
|
# Create a new client object for NotebookService.
|
50
120
|
#
|
@@ -65,7 +135,7 @@ module Google
|
|
65
135
|
#
|
66
136
|
# ## About NotebookService
|
67
137
|
#
|
68
|
-
# API
|
138
|
+
# API v1 service for Cloud AI Platform Notebooks.
|
69
139
|
#
|
70
140
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
71
141
|
# Defaults to `:v1`.
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-notebooks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-
|
10
|
+
date: 2025-02-13 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: google-cloud-core
|
@@ -27,42 +27,30 @@ dependencies:
|
|
27
27
|
name: google-cloud-notebooks-v1
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
29
29
|
requirements:
|
30
|
-
- - "
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: '0.8'
|
33
|
-
- - "<"
|
30
|
+
- - "~>"
|
34
31
|
- !ruby/object:Gem::Version
|
35
|
-
version:
|
32
|
+
version: '1.0'
|
36
33
|
type: :runtime
|
37
34
|
prerelease: false
|
38
35
|
version_requirements: !ruby/object:Gem::Requirement
|
39
36
|
requirements:
|
40
|
-
- - "
|
41
|
-
- !ruby/object:Gem::Version
|
42
|
-
version: '0.8'
|
43
|
-
- - "<"
|
37
|
+
- - "~>"
|
44
38
|
- !ruby/object:Gem::Version
|
45
|
-
version:
|
39
|
+
version: '1.0'
|
46
40
|
- !ruby/object:Gem::Dependency
|
47
|
-
name: google-cloud-notebooks-
|
41
|
+
name: google-cloud-notebooks-v2
|
48
42
|
requirement: !ruby/object:Gem::Requirement
|
49
43
|
requirements:
|
50
|
-
- - "
|
51
|
-
- !ruby/object:Gem::Version
|
52
|
-
version: '0.9'
|
53
|
-
- - "<"
|
44
|
+
- - "~>"
|
54
45
|
- !ruby/object:Gem::Version
|
55
|
-
version:
|
46
|
+
version: '1.0'
|
56
47
|
type: :runtime
|
57
48
|
prerelease: false
|
58
49
|
version_requirements: !ruby/object:Gem::Requirement
|
59
50
|
requirements:
|
60
|
-
- - "
|
61
|
-
- !ruby/object:Gem::Version
|
62
|
-
version: '0.9'
|
63
|
-
- - "<"
|
51
|
+
- - "~>"
|
64
52
|
- !ruby/object:Gem::Version
|
65
|
-
version:
|
53
|
+
version: '1.0'
|
66
54
|
description: AI Platform Notebooks makes it easy to manage JupyterLab instances through
|
67
55
|
a protected, publicly available notebook instance URL. A JupyterLab instance is
|
68
56
|
a Deep Learning virtual machine instance with the latest machine learning and data
|
@@ -97,7 +85,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
97
85
|
- !ruby/object:Gem::Version
|
98
86
|
version: '0'
|
99
87
|
requirements: []
|
100
|
-
rubygems_version: 3.6.
|
88
|
+
rubygems_version: 3.6.3
|
101
89
|
specification_version: 4
|
102
90
|
summary: API Client library for the AI Platform Notebooks API
|
103
91
|
test_files: []
|