Skip to content

Commit dc1923c

Browse files
Add aura credentials and tenant to base config
1 parent a1eaf3e commit dc1923c

File tree

9 files changed

+140
-4
lines changed

9 files changed

+140
-4
lines changed

algo/src/test/java/org/neo4j/gds/algorithms/community/MutateNodePropertyTest.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,21 @@ public String mutateProperty() {
7979
public Optional<String> usernameOverride() {
8080
throw new UnsupportedOperationException("TODO");
8181
}
82+
83+
@Override
84+
public Optional<String> clientId() {
85+
return Optional.empty();
86+
}
87+
88+
@Override
89+
public Optional<String> clientSecret() {
90+
return Optional.empty();
91+
}
92+
93+
@Override
94+
public Optional<String> tenant() {
95+
return Optional.empty();
96+
}
8297
},
8398
nodePropertyValuesToMutate
8499
);

applications/algorithms/machinery/src/test/java/org/neo4j/gds/applications/algorithms/machinery/ExampleConfiguration.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,19 @@ public boolean sudo() {
5858
public Optional<String> usernameOverride() {
5959
throw new UnsupportedOperationException("TODO");
6060
}
61+
62+
@Override
63+
public Optional<String> clientId() {
64+
return Optional.empty();
65+
}
66+
67+
@Override
68+
public Optional<String> clientSecret() {
69+
return Optional.empty();
70+
}
71+
72+
@Override
73+
public Optional<String> tenant() {
74+
return Optional.empty();
75+
}
6176
}

applications/graph-store-catalog/src/test/java/org/neo4j/gds/applications/graphstorecatalog/GraphStoreFromCatalogLoaderTest.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,20 @@ static class TestAlgoBaseConfig implements AlgoBaseConfig {
5858
public Optional<String> usernameOverride() {
5959
return Optional.empty();
6060
}
61+
62+
@Override
63+
public Optional<String> clientId() {
64+
return Optional.empty();
65+
}
66+
67+
@Override
68+
public Optional<String> clientSecret() {
69+
return Optional.empty();
70+
}
71+
72+
@Override
73+
public Optional<String> tenant() {
74+
return Optional.empty();
75+
}
6176
}
6277
}

applications/graph-store-catalog/src/test/java/org/neo4j/gds/applications/graphstorecatalog/StubGraphProjectConfig.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,19 @@ public Optional<String> usernameOverride() {
6767
public String toString() {
6868
return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
6969
}
70+
71+
@Override
72+
public Optional<String> clientId() {
73+
return Optional.empty();
74+
}
75+
76+
@Override
77+
public Optional<String> clientSecret() {
78+
return Optional.empty();
79+
}
80+
81+
@Override
82+
public Optional<String> tenant() {
83+
return Optional.empty();
84+
}
7085
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* Copyright (c) "Neo4j"
3+
* Neo4j Sweden AB [http://neo4j.com]
4+
*
5+
* This file is part of Neo4j.
6+
*
7+
* Neo4j is free software: you can redistribute it and/or modify
8+
* it under the terms of the GNU General Public License as published by
9+
* the Free Software Foundation, either version 3 of the License, or
10+
* (at your option) any later version.
11+
*
12+
* This program is distributed in the hope that it will be useful,
13+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
* GNU General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU General Public License
18+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
19+
*/
20+
package org.neo4j.gds.config;
21+
22+
import java.util.Optional;
23+
24+
public interface AuraApiCredentialsConfig {
25+
26+
Optional<String> clientId();
27+
28+
Optional<String> clientSecret();
29+
30+
Optional<String> tenant();
31+
}

config-api/src/main/java/org/neo4j/gds/config/BaseConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import java.util.Map;
2626
import java.util.Optional;
2727

28-
public interface BaseConfig extends ToMapConvertible {
28+
public interface BaseConfig extends ToMapConvertible, AuraApiCredentialsConfig {
2929

3030
String SUDO_KEY = "sudo";
3131
String LOG_PROGRESS_KEY = "logProgress";

pipeline/src/test/java/org/neo4j/gds/ml/pipeline/NodePropertyStepExecutorTest.java

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,16 @@
3131
import org.neo4j.gds.core.GraphDimensions;
3232
import org.neo4j.gds.core.concurrency.Concurrency;
3333
import org.neo4j.gds.core.model.OpenModelCatalog;
34-
import org.neo4j.gds.mem.MemoryEstimation;
35-
import org.neo4j.gds.mem.MemoryEstimations;
36-
import org.neo4j.gds.mem.MemoryRange;
3734
import org.neo4j.gds.core.utils.progress.JobId;
3835
import org.neo4j.gds.core.utils.progress.tasks.ProgressTracker;
3936
import org.neo4j.gds.executor.ExecutionContext;
4037
import org.neo4j.gds.extension.GdlExtension;
4138
import org.neo4j.gds.extension.GdlGraph;
4239
import org.neo4j.gds.extension.Inject;
4340
import org.neo4j.gds.gdl.GdlFactory;
41+
import org.neo4j.gds.mem.MemoryEstimation;
42+
import org.neo4j.gds.mem.MemoryEstimations;
43+
import org.neo4j.gds.mem.MemoryRange;
4444
import org.neo4j.gds.ml.pipeline.ExecutableNodePropertyStepTestUtil.NodeIdPropertyStep;
4545
import org.neo4j.gds.ml.pipeline.ExecutableNodePropertyStepTestUtil.SumNodePropertyStep;
4646
import org.neo4j.gds.test.SumNodePropertyStepConfigImpl;
@@ -279,6 +279,21 @@ public String graphName() {
279279
public Optional<String> usernameOverride() {
280280
return Optional.empty();
281281
}
282+
283+
@Override
284+
public Optional<String> clientId() {
285+
return Optional.empty();
286+
}
287+
288+
@Override
289+
public Optional<String> clientSecret() {
290+
return Optional.empty();
291+
}
292+
293+
@Override
294+
public Optional<String> tenant() {
295+
return Optional.empty();
296+
}
282297
}
283298

284299
}

pipeline/src/test/java/org/neo4j/gds/ml/pipeline/PipelineExecutorTest.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,21 @@ public Collection<NodeLabel> nodeLabelIdentifiers(GraphStore graphStore) {
198198
public Optional<String> usernameOverride() {
199199
return Optional.empty();
200200
}
201+
202+
@Override
203+
public Optional<String> clientId() {
204+
return Optional.empty();
205+
}
206+
207+
@Override
208+
public Optional<String> clientSecret() {
209+
return Optional.empty();
210+
}
211+
212+
@Override
213+
public Optional<String> tenant() {
214+
return Optional.empty();
215+
}
201216
}
202217

203218
private static class SucceedingPipelineExecutor<CONFIG extends AlgoBaseConfig & GraphNameConfig>

pipeline/src/test/java/org/neo4j/gds/ml/pipeline/PredictPipelineExecutorTest.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,21 @@ public Collection<NodeLabel> nodeLabelIdentifiers(GraphStore graphStore) {
195195
public Optional<String> usernameOverride() {
196196
return Optional.empty();
197197
}
198+
199+
@Override
200+
public Optional<String> clientId() {
201+
return Optional.empty();
202+
}
203+
204+
@Override
205+
public Optional<String> clientSecret() {
206+
return Optional.empty();
207+
}
208+
209+
@Override
210+
public Optional<String> tenant() {
211+
return Optional.empty();
212+
}
198213
}
199214

200215
private static class SucceedingPipelineExecutor<CONFIG extends AlgoBaseConfig & GraphNameConfig>

0 commit comments

Comments
 (0)