Skip to content

Commit a72df48

Browse files
authored
feat!: Remove docs generation (#36)
* Remove docs generation
1 parent 50681c1 commit a72df48

File tree

13 files changed

+3
-443
lines changed

13 files changed

+3
-443
lines changed

cloudquery/sdk/docs/__init__.py

Whitespace-only changes.

cloudquery/sdk/docs/generator.py

Lines changed: 0 additions & 145 deletions
This file was deleted.

cloudquery/sdk/docs/markdown_templates.py

Lines changed: 0 additions & 58 deletions
This file was deleted.

cloudquery/sdk/serve/plugin.py

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,9 @@
1010
from cloudquery.plugin_v3 import plugin_pb2_grpc
1111
from structlog import wrap_logger
1212

13-
from cloudquery.sdk.docs.generator import Generator
1413
from cloudquery.sdk.internal.servers.discovery_v1.discovery import DiscoveryServicer
1514
from cloudquery.sdk.internal.servers.plugin_v3 import PluginServicer
16-
from cloudquery.sdk.plugin.plugin import Plugin, TableOptions
17-
18-
DOC_FORMATS = ["json", "markdown"]
15+
from cloudquery.sdk.plugin.plugin import Plugin
1916

2017
_IS_WINDOWS = sys.platform == "win32"
2118

@@ -136,34 +133,10 @@ def run(self, args):
136133
help="network to serve on. can be tcp or unix",
137134
)
138135

139-
doc_parser = subparsers.add_parser(
140-
"doc",
141-
formatter_class=argparse.RawTextHelpFormatter,
142-
help="Generate documentation for tables",
143-
description="""Generate documentation for tables.
144-
145-
If format is markdown, a destination directory will be created (if necessary) containing markdown files.
146-
Example:
147-
doc ./output
148-
149-
If format is JSON, a destination directory will be created (if necessary) with a single json file called __tables.json.
150-
Example:
151-
doc --format json .
152-
""",
153-
)
154-
doc_parser.add_argument("directory", type=str)
155-
doc_parser.add_argument(
156-
"--format",
157-
type=str,
158-
default="json",
159-
help="output format. one of: {}".format(",".join(DOC_FORMATS)),
160-
)
161136
parsed_args = parser.parse_args(args)
162137

163138
if parsed_args.command == "serve":
164139
self._serve(parsed_args)
165-
elif parsed_args.command == "doc":
166-
self._generate_docs(parsed_args)
167140
else:
168141
parser.print_help()
169142
sys.exit(1)
@@ -185,16 +158,3 @@ def _serve(self, args):
185158

186159
def stop(self):
187160
self._server.stop(5)
188-
189-
def _generate_docs(self, args):
190-
generator = Generator(
191-
self._plugin.name(),
192-
self._plugin.get_tables(
193-
options=TableOptions(
194-
tables=["*"],
195-
skip_tables=[],
196-
skip_dependent_tables=False,
197-
)
198-
),
199-
)
200-
generator.generate(args.directory, args.format)

tests/docs/__init__.py

Whitespace-only changes.

tests/docs/snapshots/README.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

tests/docs/snapshots/test_table.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

tests/docs/snapshots/test_table_child.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

tests/docs/snapshots/test_table_composite_pk.md

Lines changed: 0 additions & 15 deletions
This file was deleted.

tests/docs/snapshots/test_table_grandchild.md

Lines changed: 0 additions & 15 deletions
This file was deleted.

tests/docs/snapshots/test_table_relations.md

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)