-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(templates): Add email field and use human-readable questions in …
…templates (#1905)
- Loading branch information
1 parent
59c3e3d
commit 1f62ae4
Showing
19 changed files
with
69 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,19 @@ | ||
{ | ||
"name": "MyMapperName", | ||
"admin_name": "FirstName LastName", | ||
"admin_email": "[email protected]", | ||
"mapper_id": "mapper-{{ cookiecutter.name.lower() }}", | ||
"library_name": "{{ cookiecutter.mapper_id.replace('-', '_') }}", | ||
"variant": "None (Skip)", | ||
"include_ci_files": ["GitHub", "None (Skip)"], | ||
"license": ["Apache-2.0"] | ||
"license": ["Apache-2.0"], | ||
"__prompts__": { | ||
"name": "The name of the mapper, in CamelCase", | ||
"admin_name": "Provide your [bold yellow]full name[/]", | ||
"admin_email": "Provide your [bold yellow]email[/]", | ||
"mapper_id": "The ID of the tap, in kebab-case", | ||
"library_name": "The name of the library, in snake_case. This is how the library will be imported in Python.", | ||
"include_ci_files": "Whether to include CI files for a common CI services", | ||
"license": "The license for the project" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
{ | ||
"source_name": "MySourceName", | ||
"admin_name": "FirstName LastName", | ||
"admin_email": "[email protected]", | ||
"tap_id": "tap-{{ cookiecutter.source_name.lower() }}", | ||
"library_name": "{{ cookiecutter.tap_id.replace('-', '_') }}", | ||
"variant": "None (Skip)", | ||
|
@@ -14,5 +15,16 @@ | |
"Custom or N/A" | ||
], | ||
"include_ci_files": ["GitHub", "None (Skip)"], | ||
"license": ["Apache-2.0"] | ||
"license": ["Apache-2.0"], | ||
"__prompts__": { | ||
"source_name": "The name of the source, in CamelCase", | ||
"admin_name": "Provide your [bold yellow]full name[/]", | ||
"admin_email": "Provide your [bold yellow]email[/]", | ||
"tap_id": "The ID of the tap, in kebab-case", | ||
"library_name": "The name of the library, in snake_case. This is how the library will be imported in Python.", | ||
"stream_type": "The type of stream the source provides", | ||
"auth_method": "The [bold red]authentication[/] method used by the source, for REST and GraphQL sources", | ||
"include_ci_files": "Whether to include CI files for a common CI services", | ||
"license": "The license for the project" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,21 @@ | ||
{ | ||
"destination_name": "MyDestinationName", | ||
"admin_name": "FirstName LastName", | ||
"admin_email": "[email protected]", | ||
"target_id": "target-{{ cookiecutter.destination_name.lower() }}", | ||
"library_name": "{{ cookiecutter.target_id.replace('-', '_') }}", | ||
"variant": "None (Skip)", | ||
"serialization_method": ["Per record", "Per batch", "SQL"], | ||
"include_ci_files": ["GitHub", "None (Skip)"], | ||
"license": ["Apache-2.0"] | ||
"license": ["Apache-2.0"], | ||
"__prompts__": { | ||
"name": "The name of the mapper, in CamelCase", | ||
"admin_name": "Provide your [bold yellow]full name[/]", | ||
"admin_email": "Provide your [bold yellow]email[/]", | ||
"mapper_id": "The ID of the tap, in kebab-case", | ||
"library_name": "The name of the library, in snake_case. This is how the library will be imported in Python.", | ||
"serialization_method": "The serialization method to use for loading data", | ||
"include_ci_files": "Whether to include CI files for a common CI services", | ||
"license": "The license for the project" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,6 +76,24 @@ generated `README.md` file to complete your new tap or target. You can also refe | |
[Meltano Tutorial](https://docs.meltano.com/tutorials/custom-extractor) for a more | ||
detailed guide. | ||
|
||
````{admonition} Avoid repeating yourself | ||
If you find yourself repeating the same inputs to the cookiecutter, you can create a | ||
`cookiecutterrc` file in your home directory to set default values for the prompts. | ||
For example, if you want to set the default value for your name and email, and the | ||
default stream type and authentication method, you can add the following to your | ||
`~/.cookiecutterrc` file: | ||
```yaml | ||
# ~/.cookiecutterrc | ||
default_context: | ||
admin_name: Johnny B. Goode | ||
admin_email: [email protected] | ||
stream_type: REST | ||
auth_method: Bearer Token | ||
``` | ||
```` | ||
|
||
### Using an existing library | ||
|
||
In some cases, there may already be a library that connects to the API and all you need the SDK for | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
"cookiecutter": { | ||
"name": "MyMapperName", | ||
"admin_name": "Automatic Tester", | ||
"admin_email": "[email protected]", | ||
"mapper_id": "mapper-base", | ||
"library_name": "mapper_base", | ||
"variant": "None (Skip)", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
"cookiecutter": { | ||
"source_name": "GraphQLJWTTemplateTest", | ||
"admin_name": "Automatic Tester", | ||
"admin_email": "[email protected]", | ||
"tap_id": "tap-graphql-jwt", | ||
"library_name": "tap_graphql_jwt", | ||
"variant": "None (Skip)", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
"cookiecutter": { | ||
"source_name": "AutomaticTestTap", | ||
"admin_name": "Automatic Tester", | ||
"admin_email": "[email protected]", | ||
"tap_id": "tap-other-custom", | ||
"library_name": "tap_other_custom", | ||
"variant": "None (Skip)", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
"cookiecutter": { | ||
"source_name": "AutomaticTestTap", | ||
"admin_name": "Automatic Tester", | ||
"admin_email": "[email protected]", | ||
"tap_id": "tap-rest-api_key-github", | ||
"library_name": "tap_rest_api_key_github", | ||
"variant": "None (Skip)", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
"cookiecutter": { | ||
"source_name": "AutomaticTestTap", | ||
"admin_name": "Automatic Tester", | ||
"admin_email": "[email protected]", | ||
"tap_id": "tap-rest-basic_auth", | ||
"library_name": "tap_rest_basic_auth", | ||
"variant": "None (Skip)", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
"cookiecutter": { | ||
"source_name": "AutomaticTestTap", | ||
"admin_name": "Automatic Tester", | ||
"admin_email": "[email protected]", | ||
"tap_id": "tap-rest-bearer_token", | ||
"library_name": "tap_rest_bearer_token", | ||
"variant": "None (Skip)", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
"cookiecutter": { | ||
"source_name": "AutomaticTestTap", | ||
"admin_name": "Automatic Tester", | ||
"admin_email": "[email protected]", | ||
"tap_id": "tap-rest-custom", | ||
"library_name": "tap_rest_custom", | ||
"variant": "None (Skip)", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
"cookiecutter": { | ||
"source_name": "AutomaticTestTap", | ||
"admin_name": "Automatic Tester", | ||
"admin_email": "[email protected]", | ||
"tap_id": "tap-rest-jwt", | ||
"library_name": "tap_rest_jwt", | ||
"variant": "None (Skip)", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
"cookiecutter": { | ||
"source_name": "AutomaticTestTap", | ||
"admin_name": "Automatic Tester", | ||
"admin_email": "[email protected]", | ||
"tap_id": "tap-rest-oauth2", | ||
"library_name": "tap_rest_oauth2", | ||
"variant": "None (Skip)", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
"cookiecutter": { | ||
"source_name": "AutomaticTestTap", | ||
"admin_name": "Automatic Tester", | ||
"admin_email": "[email protected]", | ||
"tap_id": "tap-sql-custom", | ||
"library_name": "tap_sql_custom", | ||
"variant": "None (Skip)", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
"cookiecutter": { | ||
"destination_name": "MyDestinationName", | ||
"admin_name": "FirstName LastName", | ||
"admin_email": "[email protected]", | ||
"target_id": "target-per_record", | ||
"library_name": "target_per_record", | ||
"variant": "None (Skip)", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
"cookiecutter": { | ||
"destination_name": "MyDestinationName", | ||
"admin_name": "FirstName LastName", | ||
"admin_email": "[email protected]", | ||
"target_id": "target-sql", | ||
"library_name": "target_sql", | ||
"variant": "None (Skip)", | ||
|