Skip to content
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

dbt_ls_path: wrong docs and argument should support both Path and str types #773

Closed
seeholza opened this issue Dec 22, 2023 · 1 comment · Fixed by #788
Closed

dbt_ls_path: wrong docs and argument should support both Path and str types #773

seeholza opened this issue Dec 22, 2023 · 1 comment · Fixed by #788
Labels
area:docs Relating to documentation, changes, fixes, improvement dbt:parse Primarily related to dbt parse command or functionality parsing:dbt_ls Issues, questions, or features related to dbt_ls parsing

Comments

@seeholza
Copy link
Contributor

According to the documentation we support str as an argument to dbt_ls_path:

DbtDag(
        render_config=RenderConfig(
            load_method=LoadMode.DBT_MANIFEST, dbt_ls_path="/path/to/dbt_ls_file.txt"
        )
        # ...,
    )
  1. There is a typo in the docs: it should be LoadMode.DBT_LS_FILE
  2. The code in the doc will not run, since dbt_ls_path is expected to be a Path according to dbt_ls_path: Path | None = None in https://github.com/astronomer/astronomer-cosmos/blob/82e8db97d6a31757fb2da019fc36df52c342eb70/cosmos/config.py#L62C5-L62C36 . This is not consistent with other *_path arguments, which allow str | Path, for example dbt_project_path: InitVar[str | Path | None] = None in the line just above.

I propose to fix 1. and change allow str | Path types for the argument dbt_ls_path

Copy link

dosubot bot commented Dec 22, 2023

🤖

Thank you for your interest in contributing to Cosmos! Your proposed fix and improvement to the documentation seem valuable. Encouraging users to contribute to open-source projects like Cosmos helps to improve the overall quality and functionality of the software. Your attention to detail and willingness to contribute are greatly appreciated. I encourage you to go ahead and create a pull request with your proposed changes. Your contribution will be valuable to the community. Keep up the great work!


This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

@seeholza seeholza changed the title dbt_ls_path: doc fix and RenderConfig.dbt_ls_path should support Path and str but currently requires Path dbt_ls_path: wrong docs and argument should support both Path and str types Dec 22, 2023
@dosubot dosubot bot added area:docs Relating to documentation, changes, fixes, improvement dbt:parse Primarily related to dbt parse command or functionality parsing:dbt_ls Issues, questions, or features related to dbt_ls parsing labels Dec 22, 2023
tatiana pushed a commit that referenced this issue Jan 9, 2024
Fix docs and support str argument for `dbt_ls_file`

Closes: #773 

Co-authored-by: Alex Seeholzer <[email protected]>
arojasb3 pushed a commit to arojasb3/astronomer-cosmos that referenced this issue Jul 14, 2024
Fix docs and support str argument for `dbt_ls_file`

Closes: astronomer#773 

Co-authored-by: Alex Seeholzer <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:docs Relating to documentation, changes, fixes, improvement dbt:parse Primarily related to dbt parse command or functionality parsing:dbt_ls Issues, questions, or features related to dbt_ls parsing
Projects
None yet
1 participant