manifold-cli 0.0.10 → 0.0.11

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fdae058a6565425aa19baae58b7da3b53894e796f80e2a4a71381e47f7efa5a4
4
- data.tar.gz: c0098c7dab8c4289d7e4e5e5bc0eb9b2bc49941c527c2f51292351a347e76d84
3
+ metadata.gz: b89c1220664d52ac386ef6c3a2f572d8f3012f19c411f263c32cfee83c3d336e
4
+ data.tar.gz: 48a3e5f2644e0d847c2a30d682bc676aa7acbf4e54c2d7c805ce452fb84acf7e
5
5
  SHA512:
6
- metadata.gz: fea29b28a3883eafd9b96fa8a84a3be0472671185323c6e12e88986a442084311f725f65559f504c62d0324be21ee868d87dc0415f6bcb55de17fbd755a66915
7
- data.tar.gz: 78d64517a90ec5a6911807fa7b439930b2712362c173a31c463084ad1f2048571a6ca1e0d402fb899d418ada6e71e2f34cf56ab31c4e93e906f0b2ddb95b03fe
6
+ metadata.gz: f1c6f7af9b2095c446dba566a2b07acd1ce1e3db4e00e27f83119328eb51b7d285aae234c5c62114fa65a1eadfa7e399154e4988b3ef15a74a584b2fc77fdc20
7
+ data.tar.gz: 1571f6685eec331672f77387afae1b6ea112cf57d998bacf974eebef3f523714da8c857321aca162a47ff118ea515638831776a29a04dcf69232a125e40aaff9
data/README.md CHANGED
@@ -56,41 +56,25 @@ cd <project_name>
56
56
  manifold add <data_project_name>
57
57
  ```
58
58
 
59
- 3. **Generate BigQuery Resource Definitions**
59
+ 3. **Generate BigQuery Resource Definitions and Terraform Configuration**
60
60
 
61
- After you fill out the manifold.yml file, this command generates the necessary BigQuery schema files based on the specified dimensions and metrics.
61
+ After you fill out the manifold.yml file, this command generates the necessary BigQuery schema files and Terraform configurations based on the specified dimensions and metrics.
62
62
 
63
63
  ```bash
64
+ # Generate with submodule configuration (default)
64
65
  manifold generate
65
- ```
66
-
67
- 4. **Generate Terraform Configuration (Optional)**
68
-
69
- Manifold can optionally generate Terraform configurations for managing your BigQuery resources. To generate both BigQuery schemas and Terraform configurations, use the `--tf` flag:
70
-
71
- ```bash
72
- # Generate standard Terraform configuration
73
- manifold generate --tf
74
66
 
75
- # Generate Terraform configuration as a submodule (skips provider configuration)
76
- manifold generate --tf --submodule
67
+ # Generate with provider configuration (if needed)
68
+ manifold generate --no-submodule
77
69
  ```
78
70
 
79
71
  This will create:
80
72
 
81
- - A root `main.tf.json` file that sets up the Google Cloud provider and workspace modules (unless using `--submodule`)
73
+ - A root `main.tf.json` file that sets up workspace modules (by default) or includes provider configuration (with --no-submodule)
82
74
  - Individual workspace configurations in `workspaces/<workspace_name>/main.tf.json`
83
75
  - Dataset and table definitions that reference your generated BigQuery schemas
84
76
 
85
- The generated Terraform configurations use the Google Cloud provider and expect a `project_id` variable to be set. When using the standard configuration (without `--submodule`), you can apply these configurations directly:
86
-
87
- ```bash
88
- terraform init
89
- terraform plan -var="project_id=your-project-id"
90
- terraform apply -var="project_id=your-project-id"
91
- ```
92
-
93
- When using `--submodule`, the generated configuration skips provider setup, allowing you to include the project as a module in a larger Terraform configuration:
77
+ By default, the generated Terraform configurations are designed to be included as a module in your larger Terraform configuration:
94
78
 
95
79
  ```hcl
96
80
  module "my_manifold_project" {
@@ -99,6 +83,14 @@ module "my_manifold_project" {
99
83
  }
100
84
  ```
101
85
 
86
+ If you need to use the configuration standalone (with `--no-submodule`), you can apply it directly:
87
+
88
+ ```bash
89
+ terraform init
90
+ terraform plan -var="project_id=your-project-id"
91
+ terraform apply -var="project_id=your-project-id"
92
+ ```
93
+
102
94
  ## Manifold Configuration
103
95
 
104
96
  ### Vectors
data/lib/manifold/cli.rb CHANGED
@@ -45,16 +45,15 @@ module Manifold
45
45
  logger.info "Added workspace '#{name}' with tables and routines directories."
46
46
  end
47
47
 
48
- desc "generate", "Generate BigQuery schema for all workspaces in the project"
49
- method_option :tf, type: :boolean, desc: "Generate Terraform configurations"
50
- method_option :submodule, type: :boolean, default: false,
48
+ desc "generate", "Generate BigQuery schema and Terraform configurations for all workspaces in the project"
49
+ method_option :submodule, type: :boolean, default: true,
51
50
  desc: "Generate Terraform configurations as a submodule (skips provider configuration)"
52
51
  def generate
53
52
  path = Pathname.pwd
54
53
  name = path.basename.to_s
55
54
  project = API::Project.new(name, directory: path, logger:)
56
- project.generate(with_terraform: options[:tf], is_submodule: options[:submodule])
57
- logger.info "Generated BigQuery schema for all workspaces in the project."
55
+ project.generate(with_terraform: true, is_submodule: options[:submodule])
56
+ logger.info "Generated BigQuery schema and Terraform configurations for all workspaces in the project."
58
57
  end
59
58
  end
60
59
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Manifold
4
- VERSION = "0.0.10"
4
+ VERSION = "0.0.11"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: manifold-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - claytongentry