Skip to content

Commit bf3976c

Browse files
committed
Initial commit
0 parents  commit bf3976c

25 files changed

+431
-0
lines changed

.changes/1.0.0.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
## dbt-snowflake-query-tags 1.0.0 - February 08, 2023
2+
3+
### Features
4+
5+
- Initial release
6+
7+

.changes/header.tpl.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Changelog
2+
All notable changes to this project will be documented in this file.
3+
4+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5+
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
6+
and is generated by [Changie](https://github.com/miniscruff/changie).

.changes/unreleased/.gitkeep

Whitespace-only changes.

.changie.yaml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Mainly from https://github.com/dbt-labs/dbt-core/blob/main/.changie.yaml
2+
3+
changesDir: .changes
4+
unreleasedDir: unreleased
5+
headerPath: header.tpl.md
6+
changelogPath: CHANGELOG.md
7+
versionExt: md
8+
versionFormat: '## dbt-snowflake-query-tags {{.Version}} - {{.Time.Format "January 02, 2006"}}'
9+
kindFormat: '### {{.Kind}}'
10+
changeFormat: '- {{.Body}} ([#{{.Custom.PR}}](https://github.com/get-select/dbt-snowflake-query-tags/pull/{{.Custom.PR}}))'
11+
kinds:
12+
- label: Breaking Changes
13+
- label: Features
14+
- label: Fixes
15+
- label: Docs
16+
newlines:
17+
afterChangelogHeader: 1
18+
afterKind: 1
19+
afterChangelogVersion: 1
20+
beforeKind: 1
21+
endOfVersion: 1
22+
custom:
23+
- key: Author
24+
label: GitHub Username(s) (separated by a single space if multiple)
25+
type: string
26+
minLength: 3
27+
- key: PR
28+
label: GitHub Pull Request Number
29+
type: int
30+
minInt: 1
31+
32+
footerFormat: |
33+
{{- $contributorDict := dict }}
34+
{{- /* any names added to this list should be all lowercase for later matching purposes */}}
35+
{{- $core_team := list "niallrees" "ian-whitestone" }}
36+
{{- range $change := .Changes }}
37+
{{- $authorList := splitList " " $change.Custom.Author }}
38+
{{- /* loop through all authors for a PR */}}
39+
{{- range $author := $authorList }}
40+
{{- $authorLower := lower $author }}
41+
{{- /* we only want to include non-core team contributors */}}
42+
{{- if not (has $authorLower $core_team)}}
43+
{{- /* Docs kind link back to dbt-docs instead of dbt-core PRs */}}
44+
{{- $prLink := $change.Kind }}
45+
{{- /* check if this contributor has other PRs associated with them already */}}
46+
{{- if hasKey $contributorDict $author }}
47+
{{- $prList := get $contributorDict $author }}
48+
{{- $prList = append $prList $prLink }}
49+
{{- $contributorDict := set $contributorDict $author $prList }}
50+
{{- else }}
51+
{{- $prList := list $prLink }}
52+
{{- $contributorDict := set $contributorDict $author $prList }}
53+
{{- end }}
54+
{{- end}}
55+
{{- end}}
56+
{{- end }}
57+
{{- /* no indentation here for formatting so the final markdown doesn't have unneeded indentations */}}
58+
{{- if $contributorDict}}
59+
### Contributors
60+
{{- range $k,$v := $contributorDict }}
61+
- [@{{$k}}](https://github.com/{{$k}}) ({{ range $index, $element := $v }}{{if $index}}, {{end}}{{$element}}{{end}})
62+
{{- end }}
63+
{{- end }}

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 4
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
11+
[*.yml]
12+
indent_size = 2
13+
trim_trailing_whitespace = false
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: CI test package
2+
3+
on:
4+
workflow_dispatch:
5+
# all PRs, important to note that `pull_request_target` workflows
6+
# will run in the context of the target branch of a PR
7+
pull_request_target:
8+
9+
env:
10+
# These are configured in GitHub secrets
11+
DBT_PROFILES_DIR: /home/runner/work/${{ github.event.repository.name }}/${{ github.event.repository.name }}/integration_test_project
12+
GITHUB_SHA_OVERRIDE: ${{ github.event.pull_request.head.sha }} # We need the commit hash of the pull request branch's head, the GITHUB_SHA env var is always the base branch in a pull_request_target trigger
13+
DBT_ENV_SECRET_SNOWFLAKE_TEST_ACCOUNT: ${{ secrets.SNOWFLAKE_TEST_ACCOUNT }}
14+
DBT_ENV_SECRET_SNOWFLAKE_TEST_USER: ${{ secrets.SNOWFLAKE_TEST_USER }}
15+
DBT_ENV_SECRET_SNOWFLAKE_TEST_PASSWORD: ${{ secrets.SNOWFLAKE_TEST_PASSWORD }}
16+
DBT_ENV_SECRET_SNOWFLAKE_TEST_ROLE: ${{ secrets.SNOWFLAKE_TEST_ROLE }}
17+
DBT_ENV_SECRET_SNOWFLAKE_TEST_DATABASE: ${{ secrets.SNOWFLAKE_TEST_DATABASE }}
18+
DBT_ENV_SECRET_SNOWFLAKE_TEST_WAREHOUSE: ${{ secrets.SNOWFLAKE_TEST_WAREHOUSE }}
19+
20+
21+
jobs:
22+
integration-snowflake:
23+
runs-on: ubuntu-latest
24+
environment:
25+
name: Approve Integration Tests
26+
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v2
30+
with:
31+
ref: ${{ github.event.pull_request.head.sha }} # Check out the code of the PR
32+
33+
- name: Install tox
34+
run: python3 -m pip install tox
35+
36+
- name: Run Snowflake Tests
37+
run: tox -e snowflake
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Main branch test package
2+
3+
# triggers for the workflow
4+
on:
5+
workflow_dispatch:
6+
push:
7+
branches:
8+
- main
9+
10+
env:
11+
# These are configured in GitHub secrets
12+
DBT_PROFILES_DIR: /home/runner/work/${{ github.event.repository.name }}/${{ github.event.repository.name }}/integration_test_project
13+
GITHUB_SHA_OVERRIDE: ${{ github.event.pull_request.head.sha }} # We need the commit hash of the pull request branch's head, the GITHUB_SHA env var is always the base branch in a pull_request_target trigger
14+
DBT_ENV_SECRET_SNOWFLAKE_TEST_ACCOUNT: ${{ secrets.SNOWFLAKE_TEST_ACCOUNT }}
15+
DBT_ENV_SECRET_SNOWFLAKE_TEST_USER: ${{ secrets.SNOWFLAKE_TEST_USER }}
16+
DBT_ENV_SECRET_SNOWFLAKE_TEST_PASSWORD: ${{ secrets.SNOWFLAKE_TEST_PASSWORD }}
17+
DBT_ENV_SECRET_SNOWFLAKE_TEST_ROLE: ${{ secrets.SNOWFLAKE_TEST_ROLE }}
18+
DBT_ENV_SECRET_SNOWFLAKE_TEST_DATABASE: ${{ secrets.SNOWFLAKE_TEST_DATABASE }}
19+
DBT_ENV_SECRET_SNOWFLAKE_TEST_WAREHOUSE: ${{ secrets.SNOWFLAKE_TEST_WAREHOUSE }}
20+
21+
jobs:
22+
integration-snowflake:
23+
runs-on: ubuntu-latest
24+
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v2
28+
29+
- name: Install tox
30+
run: python3 -m pip install tox
31+
32+
- name: Run Snowflake Tests
33+
run: tox -e snowflake

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
target/
2+
dbt_packages/
3+
logs/
4+
logfile
5+
.DS_Store

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Changelog
2+
All notable changes to this project will be documented in this file.
3+
4+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5+
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
6+
and is generated by [Changie](https://github.com/miniscruff/changie).
7+
8+
## dbt-snowflake-query-tags 1.0.0 - February 08, 2023
9+
10+
### Features
11+
12+
- Initial release
13+
14+
15+

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 get-select
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)