|
9 | 9 |
|
10 | 10 | import ruamel.yaml
|
11 | 11 | from pydantic import BaseModel, Field
|
12 |
| -from ruamel.yaml import CommentedMap as CM |
13 |
| -from ruamel.yaml import CommentedSeq as CS |
| 12 | +from ruamel.yaml.comments import CommentedMap as CM |
| 13 | +from ruamel.yaml.comments import CommentedSeq as CS |
14 | 14 |
|
15 |
| -from splitgraph.cloud import GQLAPIClient, Plugin |
| 15 | +from splitgraph.cloud import GQLAPIClient |
| 16 | +from splitgraph.cloud.models import Plugin |
16 | 17 | from splitgraph.cloud.project.dbt import (
|
17 | 18 | generate_dbt_plugin_params,
|
18 | 19 | generate_dbt_project,
|
@@ -120,7 +121,7 @@ def stub_plugin(plugin: Plugin, namespace: str, repository: str, is_live: bool =
|
120 | 121 | """
|
121 | 122 | Generate a splitgraph.yml file based on a plugin's JSONSchemas.
|
122 | 123 | """
|
123 |
| - yml = ruamel.yaml.YAML() |
| 124 | + yml = ruamel.yaml.main.YAML() |
124 | 125 | repositories_yaml = (
|
125 | 126 | SPLITGRAPH_YML_TEMPLATE.replace("CREDENTIAL_NAME", plugin.plugin_name)
|
126 | 127 | .replace("NAMESPACE", namespace)
|
@@ -179,7 +180,7 @@ def generate_project(
|
179 | 180 | decoded_seed = ProjectSeed.decode(seed)
|
180 | 181 | credentials, repositories, repository_info = generate_splitgraph_yml(all_plugins, decoded_seed)
|
181 | 182 |
|
182 |
| - yml = ruamel.yaml.YAML() |
| 183 | + yml = ruamel.yaml.main.YAML() |
183 | 184 | with open(os.path.join(basedir, "splitgraph.credentials.yml"), "w") as f:
|
184 | 185 | yml.dump(credentials, f)
|
185 | 186 |
|
|
0 commit comments