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

Use dbt-adapters throughout the contributing guide #137

Merged
merged 5 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changes/unreleased/Docs-20240323-182010.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Docs
body: Use `dbt-adapters` throughout the contributing guide
time: 2024-03-23T18:20:10.796497-06:00
custom:
Author: dbeatty10
Issue: "136"
48 changes: 24 additions & 24 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Contributing to `dbt-adapter`
# Contributing to `dbt-adapters`

- [About this document](#about-this-document)
- [Getting the code](#getting-the-code)
Expand All @@ -10,8 +10,8 @@

## About this document

This document is a guide for anyone interested in contributing to `dbt-adapter`.
It outlines how to install `dbt-adapter` for development,
This document is a guide for anyone interested in contributing to `dbt-adapters`.
It outlines how to install `dbt-adapters` for development,
run tests locally, update documentation, and submit pull requests.
This guide assumes users are developing on a Linux or MacOS system.
The following utilities are needed or will be installed in this guide:
Expand All @@ -31,35 +31,35 @@ Almost all information there is applicable here.

## Getting the code

`git` is required to download, modify, and sync the `dbt-adapter` code.
`git` is required to download, modify, and sync the `dbt-adapters` code.
There are several ways to install Git. For MacOS:

- Install [Xcode](https://developer.apple.com/support/xcode/)
- Install [Xcode Command Line Tools](https://mac.install.guide/commandlinetools/index.html)

### External contributors

Contributors external to the `dbt-labs` GitHub organization can contribute to `dbt-adapter`
by forking the `dbt-adapter` repository. For more on forking, check out the
Contributors external to the `dbt-labs` GitHub organization can contribute to `dbt-adapters`
by forking the `dbt-adapters` repository. For more on forking, check out the
[GitHub docs on forking](https://help.github.com/en/articles/fork-a-repo). To contribute:

1. Fork the `dbt-labs/dbt-adapter` repository (e.g. `{forked-org}/dbt-adapter`)
2. Clone `{forked-org}/dbt-adapter` locally
1. Fork the `dbt-labs/dbt-adapters` repository (e.g. `{forked-org}/dbt-adapters`)
2. Clone `{forked-org}/dbt-adapters` locally
3. Check out a new branch locally
4. Make changes in the new branch
5. Push the new branch to `{forked-org}/dbt-adapter`
6. Open a pull request in `dbt-labs/dbt-adapter` to merge `{forked-org}/dbt-adapter/{new-branch}` into `main`
5. Push the new branch to `{forked-org}/dbt-adapters`
6. Open a pull request in `dbt-labs/dbt-adapters` to merge `{forked-org}/dbt-adapters/{new-branch}` into `main`

### dbt Labs contributors

Contributors in the `dbt Labs` GitHub organization have push access to the `dbt-adapter` repo.
Rather than forking `dbt-labs/dbt-adapter`, use `dbt-labs/dbt-adapter` directly. To contribute:
Contributors in the `dbt Labs` GitHub organization have push access to the `dbt-adapters` repo.
Rather than forking `dbt-labs/dbt-adapters`, use `dbt-labs/dbt-adapters` directly. To contribute:

1. Clone `dbt-labs/dbt-adapter` locally
1. Clone `dbt-labs/dbt-adapters` locally
2. Check out a new branch locally
3. Make changes in the new branch
4. Push the new branch to `dbt-labs/dbt-adapter`
5. Open a pull request in `dbt-labs/dbt-adapter` to merge `{new-branch}` into `main`
4. Push the new branch to `dbt-labs/dbt-adapters`
5. Open a pull request in `dbt-labs/dbt-adapters` to merge `{new-branch}` into `main`


## Developing
Expand All @@ -72,19 +72,19 @@ Rather than forking `dbt-labs/dbt-adapter`, use `dbt-labs/dbt-adapter` directly.
```
2. Configure and activate a virtual environment using `virtualenv` as described in
[Setting up an environment](https://github.com/dbt-labs/dbt-core/blob/HEAD/CONTRIBUTING.md#setting-up-an-environment)
3. Install `dbt-adapter` and development dependencies in the virtual environment
3. Install `dbt-adapters` and development dependencies in the virtual environment
```shell
pip install -e .[dev]
```

When `dbt-adapter` is installed this way, any changes made to the `dbt-adapter` source code
When `dbt-adapters` is installed this way, any changes made to the `dbt-adapters` source code
will be reflected in the virtual environment immediately.


## Testing

`dbt-adapter` contains [unit](https://github.com/dbt-labs/dbt-adapter/tree/main/tests/unit)
and [functional](https://github.com/dbt-labs/dbt-adapter/tree/main/tests/functional) tests.
`dbt-adapters` contains [unit](https://github.com/dbt-labs/dbt-adapters/tree/main/tests/unit)
and [functional](https://github.com/dbt-labs/dbt-adapters/tree/main/tests/functional) tests.

### Unit tests

Expand Down Expand Up @@ -134,7 +134,7 @@ python -m pytest tests/functional/$test_dir_and_filename.py::$test_class_name::$

### User documentation

Many changes will require an update to `dbt-adapter` user documentation.
Many changes will require an update to `dbt-adapters` user documentation.
All contributors, whether internal or external, are encouraged to open an issue or PR
in the docs repo when submitting user-facing changes. Here are some relevant links:

Expand All @@ -145,7 +145,7 @@ in the docs repo when submitting user-facing changes. Here are some relevant lin

### CHANGELOG entry

`dbt-adapter` uses [changie](https://changie.dev) to generate `CHANGELOG` entries.
`dbt-adapters` uses [changie](https://changie.dev) to generate `CHANGELOG` entries.
Follow the steps to [install `changie`](https://changie.dev/guide/installation/).

Once changie is installed and the PR is created, run:
Expand All @@ -172,11 +172,11 @@ Even without a CLA, anyone is welcome to open issues and comment on existing iss

### Opening a pull request

A `dbt-adapter` maintainer will be assigned to review each PR based on priority and capacity.
A `dbt-adapters` maintainer will be assigned to review each PR based on priority and capacity.
They may suggest code revisions for style and clarity or they may request additional tests.
These are good things! dbt Labs believes that contributing high-quality code is a collaborative effort.
The same process is followed whether the contributor is external or another `dbt-adapter` maintainer.
The same process is followed whether the contributor is external or another `dbt-adapters` maintainer.
Once all tests are passing and the PR has been approved by the appropriate code owners,
a `dbt-adapter` maintainer will merge the changes into `main`.
a `dbt-adapters` maintainer will merge the changes into `main`.

And that's it! Happy developing :tada:
Loading