Skip to content

Commit

Permalink
Replace titleCase with capitalCase (#10654)
Browse files Browse the repository at this point in the history
* Add capitalCase helper

* Replace titleCase with capitalCase

* Update generated scaffold files
  • Loading branch information
tuliren authored Feb 25, 2022
1 parent 665a507 commit 9809940
Show file tree
Hide file tree
Showing 30 changed files with 45 additions and 38 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Destination {{titleCase name}}
# Destination {{capitalCase name}}

This is the repository for the {{titleCase name}} destination connector in Java.
This is the repository for the {{capitalCase name}} destination connector in Java.
For information about how to use this connector within Airbyte, see [the User Documentation](https://docs.airbyte.io/integrations/destinations/{{dashCase name}}).

## Local development
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
- destinationDefinitionId: {{uuid}}
name: {{titleCase name}}
name: {{capitalCase name}}
dockerRepository: airbyte/destination-{{dashCase name}}
dockerImageTag: 0.1.0
documentationUrl: https://docs.airbyte.io/integrations/destinations/{{dashCase name}}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# {{titleCase name}}
# {{capitalCase name}}

TODO: update this doc

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# {{titleCase name}} Destination
# {{capitalCase name}} Destination

This is the repository for the {{titleCase name}} destination connector, written in Python.
This is the repository for the {{capitalCase name}} destination connector, written in Python.
For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.io/integrations/destinations/{{dashCase name}}).

## Local development
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"supportsNormalization": false,
"connectionSpecification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Destination {{titleCase name}}",
"title": "Destination {{capitalCase name}}",
"type": "object",
"required": ["TODO -- fix me!"],
"additionalProperties": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

setup(
name="destination_{{snakeCase name}}",
description="Destination implementation for {{titleCase name}}.",
description="Destination implementation for {{capitalCase name}}.",
author="Airbyte",
author_email="[email protected]",
packages=find_packages(),
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"generate": "plop"
},
"devDependencies": {
"capital-case": "^1.0.4",
"handlebars": "^4.7.7",
"plop": "^3.0.5",
"set-value": ">=4.0.1",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';
const path = require('path');
const uuid = require('uuid');
const capitalCase = require('capital-case');

const getSuccessMessage = function(connectorName, outputPath, additionalMessage){
return `
Expand Down Expand Up @@ -43,6 +44,10 @@ module.exports = function (plop) {
const javaDestinationOutputRoot = `${outputDir}/destination-{{dashCase name}}`;
const pythonDestinationOutputRoot = `${outputDir}/destination-{{dashCase name}}`;

plop.setHelper('capitalCase', function(name) {
return capitalCase.capitalCase(name);
});

plop.setActionType('emitSuccess', function(answers, config, plopApi){
console.log(getSuccessMessage(answers.name, plopApi.renderString(config.outputPath, answers), config.message));
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# {{titleCase name}} Source
# {{capitalCase name}} Source

This is the repository for the {{titleCase name}} source connector.
This is the repository for the {{capitalCase name}} source connector.
For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.io/integrations/sources/{{dashCase name}}).

## Local development
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Source {{titleCase name}}
# Source {{capitalCase name}}

This is the repository for the {{titleCase name}} source connector in Java.
This is the repository for the {{capitalCase name}} source connector in Java.
For information about how to use this connector within Airbyte, see [the User Documentation](https://docs.airbyte.io/integrations/sources/{{dashCase name}}).

## Local development
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# {{titleCase name}} Source
# {{capitalCase name}} Source

This is the repository for the {{titleCase name}} source connector, written in Python.
This is the repository for the {{capitalCase name}} source connector, written in Python.
For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.io/integrations/sources/{{dashCase name}}).

## Local development
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ TEST_REQUIREMENTS = [

setup(
name="source_{{snakeCase name}}",
description="Source implementation for {{titleCase name}}.",
description="Source implementation for {{capitalCase name}}.",
author="Airbyte",
author_email="[email protected]",
packages=find_packages(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"documentationUrl": "https://docsurl.com",
"connectionSpecification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "{{titleCase name}} Spec",
"title": "{{capitalCase name}} Spec",
"type": "object",
"required": ["TODO"],
"additionalProperties": false,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# {{titleCase name}} Source
# {{capitalCase name}} Source

This is the repository for the {{titleCase name}} source connector, written in Python.
This is the repository for the {{capitalCase name}} source connector, written in Python.
For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.io/integrations/sources/{{dashCase name}}).

## Local development
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ TEST_REQUIREMENTS = [

setup(
name="source_{{snakeCase name}}",
description="Source implementation for {{titleCase name}}.",
description="Source implementation for {{capitalCase name}}.",
author="Airbyte",
author_email="[email protected]",
packages=find_packages(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"documentationUrl": "https://docsurl.com",
"connectionSpecification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "{{titleCase name}} Spec",
"title": "{{capitalCase name}} Spec",
"type": "object",
"required": ["fix-me"],
"additionalProperties": false,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Source {{titleCase name}} Singer
# Source {{capitalCase name}} Singer

This is the repository for the {{titleCase name}} source connector, based on a Singer tap.
This is the repository for the {{capitalCase name}} source connector, based on a Singer tap.
For information about how to use this connector within Airbyte, see [the User Documentation](https://docs.airbyte.io/integrations/sources/{{dashCase name}}).

## Local development
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ TEST_REQUIREMENTS = [

setup(
name="source_{{snakeCase name}}_singer",
description="Source implementation for {{titleCase name}}, built on the Singer tap implementation.",
description="Source implementation for {{capitalCase name}}, built on the Singer tap implementation.",
author="Airbyte",
author_email="[email protected]",
packages=find_packages(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"documentationUrl": "https://docs.airbyte.io/integrations/sources/{{snakeCase name}}",
"connectionSpecification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Source {{titleCase name}} Singer Spec",
"title": "Source {{capitalCase name}} Singer Spec",
"type": "object",
"required": ["TODO"],
"additionalProperties": true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Scaffold-Destination-Python Destination
# Scaffold Destination Python Destination

This is the repository for the Scaffold-Destination-Python destination connector, written in Python.
This is the repository for the Scaffold Destination Python destination connector, written in Python.
For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.io/integrations/destinations/scaffold-destination-python).

## Local development
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"supportsNormalization": false,
"connectionSpecification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Destination Scaffold-Destination-Python",
"title": "Destination Scaffold Destination Python",
"type": "object",
"required": ["TODO -- fix me!"],
"additionalProperties": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

setup(
name="destination_scaffold_destination_python",
description="Destination implementation for Scaffold-Destination-Python.",
description="Destination implementation for Scaffold Destination Python.",
author="Airbyte",
author_email="[email protected]",
packages=find_packages(),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Source Scaffold-Java-Jdbc
# Source Scaffold Java Jdbc

This is the repository for the Scaffold-Java-Jdbc source connector in Java.
This is the repository for the Scaffold Java Jdbc source connector in Java.
For information about how to use this connector within Airbyte, see [the User Documentation](https://docs.airbyte.io/integrations/sources/scaffold-java-jdbc).

## Local development
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Scaffold-Source-Http Source
# Scaffold Source Http Source

This is the repository for the Scaffold-Source-Http source connector, written in Python.
This is the repository for the Scaffold Source Http source connector, written in Python.
For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.io/integrations/sources/scaffold-source-http).

## Local development
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

setup(
name="source_scaffold_source_http",
description="Source implementation for Scaffold-Source-Http.",
description="Source implementation for Scaffold Source Http.",
author="Airbyte",
author_email="[email protected]",
packages=find_packages(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"documentationUrl": "https://docsurl.com",
"connectionSpecification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Scaffold-Source-Http Spec",
"title": "Scaffold Source Http Spec",
"type": "object",
"required": ["TODO"],
"additionalProperties": false,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Scaffold-Source-Python Source
# Scaffold Source Python Source

This is the repository for the Scaffold-Source-Python source connector, written in Python.
This is the repository for the Scaffold Source Python source connector, written in Python.
For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.io/integrations/sources/scaffold-source-python).

## Local development
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

setup(
name="source_scaffold_source_python",
description="Source implementation for Scaffold-Source-Python.",
description="Source implementation for Scaffold Source Python.",
author="Airbyte",
author_email="[email protected]",
packages=find_packages(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"documentationUrl": "https://docsurl.com",
"connectionSpecification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Scaffold-Source-Python Spec",
"title": "Scaffold Source Python Spec",
"type": "object",
"required": ["fix-me"],
"additionalProperties": false,
Expand Down

1 comment on commit 9809940

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SonarQube Report

SonarQube report for Airbyte Connectors Destination Scaffold Destination Python(#10578)

Measures

Name Value Name Value Name Value
Bugs 0 Duplicated Blocks 0 Coverage 0.0
Lines to Cover 14 Lines of Code 19 Code Smells 3
Vulnerabilities 0 Reliability Rating A Duplicated Lines (%) 0.0
Security Rating A Quality Gate Status OK Blocker Issues 0
Critical Issues 0 Major Issues 1 Minor Issues 2

Detected Issues

Rule File Description Message
python:black_need_format (MINOR) destination_scaffold_destination_python/destination.py Please run one of the commands: "black --config ./pyproject.toml <path_to_updated_folder>" or "./gradlew format" 2 code part(s) should be updated.
python:isort_need_format (MINOR) destination_scaffold_destination_python/destination.py Please run one of the commands: "isort <path_to_updated_folder>" or "./gradlew format" 1 code part(s) should be updated.
flake8:W391 (MAJOR) destination_scaffold_destination_python/destination.py:59 blank line at end of file blank line at end of file

Coverage (0.0%)

File Coverage File Coverage
destination_scaffold_destination_python/init.py 0.0 destination_scaffold_destination_python/destination.py 0.0

Please sign in to comment.