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

Running dbt schema builder tool section added #38

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jazibhumayun
Copy link
Contributor

Description: Describe in a couple of sentences what this PR adds

JIRA: Link to JIRA ticket

Dependencies: dependencies on other outstanding PRs, issues, etc.

Merge deadline: List merge deadline (if any)

Installation instructions: List any non-trivial installation
instructions.

Testing instructions:

  1. Open page A
  2. Do thing B
  3. Expect C to happen
  4. If D happened instead - check failed.

Reviewers:

  • tag reviewer
  • tag reviewer

Merge checklist:

  • All reviewers approved
  • CI build is green
  • Version bumped
  • Documentation updated (not only docstrings)
  • Commits are squashed

Post merge:

  • Create a tag
  • Check new version is pushed to PyPI after tag-triggered build is
    finished.
  • Delete working branch (if not needed anymore)

Author concerns: List any concerns about this PR - inelegant
solutions, hacks, quick-and-dirty implementations, concerns about
migrations, etc.

README.rst Outdated
Getting Started
-----------------
If you want to run dbt-schema-builder locally, clone this repository on your local system.
You need a python virtual environment to run this, use the following commands to create and activate python 3.6.12 virtual environment
Copy link
Contributor

Choose a reason for hiding this comment

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

Not everyone uses pyenv to manage their virtual environments, it might make sense to call out here that this example uses pyenv, or just say "create a Python 3.6 virtual environment using your favorite tool"

README.rst Outdated

Next, you will run following commands
::
$ pip install -U pip-tools
Copy link
Contributor

Choose a reason for hiding this comment

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

Users shouldn't need to install pip-tools or do a pip-compile to get started, and doing so might upgrade dependencies to a non-working state. They should just be able to do a make upgrade to get the pinned dependencies that are already checked in.

Copy link
Member

Choose a reason for hiding this comment

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

FWIW, this was a required step for both jazib and I. It was some weird compatibility issue with an old version of pip-tools---the makefile would install the old broken pip-tools which would break any/all subsequent lines in the make recipe. However, I think codifying this one-time fix is not appropriate, so we should remove these steps like you recommend.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will make the changes in this readme file generic as @bmedx suggested, I will write these troubleshooting and warehouse-transform related steps in internal wiki

README.rst Outdated
::
$ pip install .

Now you will be all set to run dbt-schema-builder tool locally, cd into warehouse-transforms project directory in which you want to run dbt-schema-builder tool
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a public repo, so not everyone will have access to warehouse transforms. I think you can generalize this to "cd into the dbt project directory in which you want to run..."

README.rst Outdated
::
$ cd warehouse-transforms/projects/automated/applications

Replace the --profiles-dir path
Copy link
Contributor

Choose a reason for hiding this comment

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

The flags on this command will all be different for people who aren't using the edX repos, so we should generalize this example as well.

@jazibhumayun
Copy link
Contributor Author

@bmedx Hey! I have made the changes and tried to make it generic.

@jazibhumayun jazibhumayun force-pushed the jazibhumayun/gettingstarted-added branch from e697ceb to ca5626c Compare February 12, 2021 16:18
@pwnage101
Copy link
Member

Sorry, I just noticed we test multiple versions of python (3.6 and 3.8). How come we're recommending to use a specific version (3.6) in the docs?

README.rst Outdated
Comment on lines 65 to 68
Inside dbt-schema-builder folder, run the following to update the versions in all of the local requirements files
::
$ cd dbt-schema-builder
$ make upgrade
Copy link
Member

Choose a reason for hiding this comment

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

Also, I don't think we need to tell people to run make upgrade if they're just trying to run schema builder. That's a maintenance task left for the maintainers (us).

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah agreed. I think this should be make requirements, I always confuse the two.

Copy link
Contributor Author

@jazibhumayun jazibhumayun Feb 12, 2021

Choose a reason for hiding this comment

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

Sorry, I just noticed we test multiple versions of python (3.6 and 3.8). How come we're recommending to use a specific version (3.6) in the docs?

I saw 3.6 version from this doc https://openedx.atlassian.net/wiki/spaces/DE/pages/1121059960/dbt+Upgrade+Checklist, if I works on multiple versions of python for sure I can change the text form here.
Actually this PR isn't part of any story I was just trying to document the steps that I did in order to run dbt-schema-builder (in a similar way that warehouse-transform repository has getting started steps), I wasn't aware of this being a public repository

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh yes it should be make requirements

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for catching all these things in the review, my intent was to document steps for internal team members, but its good to have it here as well from perspective of external users, thanks for detailed review.

Copy link
Contributor

@bmedx bmedx left a comment

Choose a reason for hiding this comment

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

Thanks for writing it up! It's always the small PRs that get all of the feedback. :) 👍🏼 once the doc style things are fixed.

@jazibhumayun jazibhumayun changed the title Getting Started section added Running dbt schema builder tool section added Feb 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants