Skip to content

docs: add Readme for sdm commands #620

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 27, 2025
Merged

docs: add Readme for sdm commands #620

merged 4 commits into from
Jun 27, 2025

Conversation

ChristoGrab
Copy link
Collaborator

@ChristoGrab ChristoGrab commented Jun 27, 2025

What

Just adding a basic README for dev visibility on installing and running commands using the SDM CLI

Summary by CodeRabbit

  • Documentation
    • Added a comprehensive README for the source declarative manifest CLI, including installation steps, command descriptions, usage examples, and option details.
    • Enhanced module-level documentation to describe available command-line interfaces and reference relevant modules.
    • Included docstrings for improved clarity in both module and function documentation.

Important

Auto-merge enabled.

This PR is set to merge automatically when all requirements are met.

@github-actions github-actions bot added the docs label Jun 27, 2025
@ChristoGrab ChristoGrab marked this pull request as ready for review June 27, 2025 18:22
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a new README file for the Source Declarative Manifest CLI provided by the airbyte-cdk package, explaining installation and usage instructions.

  • Introduces installation instructions via pipx and virtual environments
  • Documents available commands and their options
  • Provides usage examples with a command options table
Comments suppressed due to low confidence (1)

airbyte_cdk/cli/source_declarative_manifest/README.md:15

  • The README uses both 'airbyte-cdk' and 'airbyte-python-cdk'; consider standardizing the naming to avoid confusion.
If you are using a cloned airbyte-python-cdk repo locally,

@ChristoGrab ChristoGrab requested review from pnilan and brianjlai June 27, 2025 18:23
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

coderabbitai bot commented Jun 27, 2025

📝 Walkthrough

Walkthrough

A new README file was added for the source_declarative_manifest CLI in the airbyte-cdk package. This documentation explains installation methods, command usage, available options, required arguments, and provides example commands for users to run and test manifest-only connectors locally. Additionally, module-level docstrings were enhanced in related files to include CLI usage information and link to the README. A docstring was also added to the CLI runner function.

Changes

File(s) Change Summary
airbyte_cdk/cli/source_declarative_manifest/README.md Added a comprehensive README documenting CLI installation, commands, options, and usage examples
airbyte_cdk/init.py Added module-level docstring section describing the two CLI tools and linking to their modules
airbyte_cdk/cli/source_declarative_manifest/init.py Added module-level docstring that includes README content via reStructuredText directive
airbyte_cdk/cli/source_declarative_manifest/_run.py Added a docstring to the run() function explaining its role in running the CLI by parsing command-line arguments

Possibly related PRs

Suggested reviewers

  • ChristoGrab

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 61b539d and 81020c1.

📒 Files selected for processing (3)
  • airbyte_cdk/__init__.py (1 hunks)
  • airbyte_cdk/cli/source_declarative_manifest/__init__.py (1 hunks)
  • airbyte_cdk/cli/source_declarative_manifest/_run.py (1 hunks)
✅ Files skipped from review due to trivial changes (3)
  • airbyte_cdk/cli/source_declarative_manifest/init.py
  • airbyte_cdk/cli/source_declarative_manifest/_run.py
  • airbyte_cdk/init.py
⏰ Context from checks skipped due to timeout of 90000ms (9)
  • GitHub Check: Check: source-pokeapi
  • GitHub Check: Check: source-intercom
  • GitHub Check: Check: source-amplitude
  • GitHub Check: Check: source-shopify
  • GitHub Check: Check: source-hardcoded-records
  • GitHub Check: Pytest (Fast)
  • GitHub Check: SDM Docker Image Build
  • GitHub Check: Pytest (All, Python 3.10, Ubuntu)
  • GitHub Check: Pytest (All, Python 3.11, Ubuntu)
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
airbyte_cdk/cli/source_declarative_manifest/README.md (2)

40-45: Drop the extra comma for smoother reading, wdyt?

The comma before “if” isn’t needed and slightly breaks the flow.

- - --components-path: The relative path to the custom components to mount, if they exist.
+ - --components-path: The relative path to the custom components to mount if they exist.

3-6: Consider wrapping the CLI name in back-ticks for clarity, wdyt?

Readers scanning the doc may appreciate the command standing out as code.
Example tweak:

- The source-declarative-manifest CLI is included in the airbyte-cdk package.
+ The `source-declarative-manifest` CLI is included in the `airbyte-cdk` package.

…and likewise in the example blocks (source-declarative-manifest check …, etc.).
This tiny change improves readability without altering meaning.

Also applies to: 59-65

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2bf39e9 and 61b539d.

📒 Files selected for processing (1)
  • airbyte_cdk/cli/source_declarative_manifest/README.md (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: aaronsteers
PR: airbytehq/airbyte-python-cdk#58
File: airbyte_cdk/cli/source_declarative_manifest/_run.py:62-65
Timestamp: 2024-11-15T01:04:21.272Z
Learning: The files in `airbyte_cdk/cli/source_declarative_manifest/`, including `_run.py`, are imported from another repository, and changes to these files should be minimized or avoided when possible to maintain consistency.
Learnt from: aaronsteers
PR: airbytehq/airbyte-python-cdk#58
File: airbyte_cdk/cli/source_declarative_manifest/spec.json:9-15
Timestamp: 2024-11-15T00:59:08.154Z
Learning: When code in `airbyte_cdk/cli/source_declarative_manifest/` is being imported from another repository, avoid suggesting modifications to it during the import process.
Learnt from: aaronsteers
PR: airbytehq/airbyte-python-cdk#58
File: pyproject.toml:108-111
Timestamp: 2024-11-15T00:58:15.446Z
Learning: In the project, the `run` function is defined in `airbyte_cdk/cli/source_declarative_manifest/_run.py` and is imported into the module's `__init__.py`.
Learnt from: pnilan
PR: airbytehq/airbyte-python-cdk#0
File: :0-0
Timestamp: 2024-12-11T16:34:46.319Z
Learning: In the airbytehq/airbyte-python-cdk repository, the `declarative_component_schema.py` file is auto-generated from `declarative_component_schema.yaml` and should be ignored in the recommended reviewing order.
Learnt from: ChristoGrab
PR: airbytehq/airbyte-python-cdk#90
File: Dockerfile:16-21
Timestamp: 2024-12-02T18:36:04.346Z
Learning: Copying files from `site-packages` in the Dockerfile maintains compatibility with both the old file structure that manifest-only connectors expect and the new package-based structure where SDM is part of the CDK.
Learnt from: ChristoGrab
PR: airbytehq/airbyte-python-cdk#90
File: Dockerfile:16-21
Timestamp: 2024-12-02T18:36:04.346Z
Learning: When building the Docker image for the `source-declarative-manifest`, copying files from `site-packages` ensures that the SDM code runs from an installed package context, maintaining import paths and module consistency.
Learnt from: ChristoGrab
PR: airbytehq/airbyte-python-cdk#58
File: airbyte_cdk/sources/declarative/yaml_declarative_source.py:0-0
Timestamp: 2024-11-18T23:40:06.391Z
Learning: When modifying the `YamlDeclarativeSource` class in `airbyte_cdk/sources/declarative/yaml_declarative_source.py`, avoid introducing breaking changes like altering method signatures within the scope of unrelated PRs. Such changes should be addressed separately to minimize impact on existing implementations.
airbyte_cdk/cli/source_declarative_manifest/README.md (7)
Learnt from: aaronsteers
PR: airbytehq/airbyte-python-cdk#58
File: airbyte_cdk/cli/source_declarative_manifest/_run.py:62-65
Timestamp: 2024-11-15T01:04:21.272Z
Learning: The files in `airbyte_cdk/cli/source_declarative_manifest/`, including `_run.py`, are imported from another repository, and changes to these files should be minimized or avoided when possible to maintain consistency.
Learnt from: aaronsteers
PR: airbytehq/airbyte-python-cdk#58
File: airbyte_cdk/cli/source_declarative_manifest/spec.json:9-15
Timestamp: 2024-11-15T00:59:08.154Z
Learning: When code in `airbyte_cdk/cli/source_declarative_manifest/` is being imported from another repository, avoid suggesting modifications to it during the import process.
Learnt from: ChristoGrab
PR: airbytehq/airbyte-python-cdk#58
File: airbyte_cdk/sources/declarative/yaml_declarative_source.py:0-0
Timestamp: 2024-11-18T23:40:06.391Z
Learning: When modifying the `YamlDeclarativeSource` class in `airbyte_cdk/sources/declarative/yaml_declarative_source.py`, avoid introducing breaking changes like altering method signatures within the scope of unrelated PRs. Such changes should be addressed separately to minimize impact on existing implementations.
Learnt from: pnilan
PR: airbytehq/airbyte-python-cdk#0
File: :0-0
Timestamp: 2024-12-11T16:34:46.319Z
Learning: In the airbytehq/airbyte-python-cdk repository, the `declarative_component_schema.py` file is auto-generated from `declarative_component_schema.yaml` and should be ignored in the recommended reviewing order.
Learnt from: aaronsteers
PR: airbytehq/airbyte-python-cdk#58
File: pyproject.toml:108-111
Timestamp: 2024-11-15T00:58:15.446Z
Learning: In the project, the `run` function is defined in `airbyte_cdk/cli/source_declarative_manifest/_run.py` and is imported into the module's `__init__.py`.
Learnt from: ChristoGrab
PR: airbytehq/airbyte-python-cdk#90
File: Dockerfile:16-21
Timestamp: 2024-12-02T18:36:04.346Z
Learning: Copying files from `site-packages` in the Dockerfile maintains compatibility with both the old file structure that manifest-only connectors expect and the new package-based structure where SDM is part of the CDK.
Learnt from: ChristoGrab
PR: airbytehq/airbyte-python-cdk#90
File: Dockerfile:16-21
Timestamp: 2024-12-02T18:36:04.346Z
Learning: When building the Docker image for the `source-declarative-manifest`, copying files from `site-packages` ensures that the SDM code runs from an installed package context, maintaining import paths and module consistency.
🪛 LanguageTool
airbyte_cdk/cli/source_declarative_manifest/README.md

[typographical] ~44-~44: Usually, there’s no comma before “if”.
Context: ...e path to the custom components to mount, if they exist. | Option | sp...

(IF_NO_COMMA)

⏰ Context from checks skipped due to timeout of 90000ms (9)
  • GitHub Check: Check: source-amplitude
  • GitHub Check: Check: source-pokeapi
  • GitHub Check: Check: source-intercom
  • GitHub Check: Check: source-shopify
  • GitHub Check: Check: source-hardcoded-records
  • GitHub Check: Pytest (Fast)
  • GitHub Check: SDM Docker Image Build
  • GitHub Check: Pytest (All, Python 3.11, Ubuntu)
  • GitHub Check: Pytest (All, Python 3.10, Ubuntu)

Copy link

github-actions bot commented Jun 27, 2025

PyTest Results (Fast)

3 676 tests  ±0   3 665 ✅ ±0   6m 11s ⏱️ -5s
    1 suites ±0      11 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit 81020c1. ± Comparison against base commit 2bf39e9.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Jun 27, 2025

PyTest Results (Full)

3 679 tests  ±0   3 668 ✅ ±0   18m 16s ⏱️ +37s
    1 suites ±0      11 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit 81020c1. ± Comparison against base commit 2bf39e9.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@aaronsteers aaronsteers left a comment

Choose a reason for hiding this comment

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

@ChristoGrab - this is awesome, thanks. I'm putting a block here to hold one sec while I review. I want to also integrate this with pdoc.

@aaronsteers
Copy link
Contributor

@ChristoGrab - I created a suggestions PR targeting this one:

I've tested locally by running poe docs-preview and everything looks like it is hooked up correctly. now. 👍

Copy link
Contributor

@aaronsteers aaronsteers left a comment

Choose a reason for hiding this comment

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

Merged the other into this one. Approving to merge whenever you are ready! 🚀

@ChristoGrab ChristoGrab enabled auto-merge (squash) June 27, 2025 19:42
@ChristoGrab ChristoGrab merged commit 4629a12 into main Jun 27, 2025
28 checks passed
@ChristoGrab ChristoGrab deleted the christo/sdm-readme branch June 27, 2025 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants