mirror of
https://github.com/dbt-labs/dbt-core
synced 2025-12-17 19:31:34 +00:00
Compare commits
11 Commits
enable-pos
...
changie-ma
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3d749d5b7c | ||
|
|
14d9282848 | ||
|
|
c5a5d2564e | ||
|
|
6716734294 | ||
|
|
b09d5783e8 | ||
|
|
9d6eaea95e | ||
|
|
b3f8129687 | ||
|
|
84d3c63c95 | ||
|
|
8b27ed1f05 | ||
|
|
701c4e3e51 | ||
|
|
30a148ddcd |
3530
.changes/1.1.0.md
Normal file
3530
.changes/1.1.0.md
Normal file
File diff suppressed because it is too large
Load Diff
8
.changes/1.1.1.md
Normal file
8
.changes/1.1.1.md
Normal file
@@ -0,0 +1,8 @@
|
||||
## 1.1.1 - February 14, 2022
|
||||
### Fixes
|
||||
- Fixing old changelog issues to prove you can. ([#4444](https://github.com/dbt-labs/dbt-core/issues/4444), [#5555](https://github.com/dbt-labs/dbt-core/pull/5555))
|
||||
### Features
|
||||
- Update contributing docs to reflect changie. ([#1111](https://github.com/dbt-labs/dbt-core/issues/1111), [#2222](https://github.com/dbt-labs/dbt-core/pull/2222))
|
||||
|
||||
Contributors:
|
||||
- [@not-emmyoop](https://github.com/not-emmyoop) [#5555](https://github.com/dbt-labs/dbt-core/pull/5555)
|
||||
8
.changes/header.tpl.md
Executable file
8
.changes/header.tpl.md
Executable file
@@ -0,0 +1,8 @@
|
||||
# Changelog
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
|
||||
and is generated by [Changie](https://github.com/miniscruff/changie).
|
||||
|
||||
Everything above this line (including this line) can be customized in `.changes/header.tpl.md`.
|
||||
0
.changes/unreleased/.gitkeep
Executable file
0
.changes/unreleased/.gitkeep
Executable file
7
.changes/unreleased/Under the Hood-20220214-093141.yaml
Normal file
7
.changes/unreleased/Under the Hood-20220214-093141.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
kind: Under the Hood
|
||||
body: Added `dbt-core` to version line of `CHANGELOG`.
|
||||
time: 2022-02-14T09:31:41.562892-06:00
|
||||
custom:
|
||||
Author: oliver
|
||||
Issue: "6655"
|
||||
PR: "5544"
|
||||
29
.changie.yaml
Executable file
29
.changie.yaml
Executable file
@@ -0,0 +1,29 @@
|
||||
changesDir: .changes
|
||||
unreleasedDir: unreleased
|
||||
headerPath: header.tpl.md
|
||||
versionHeaderPath: ""
|
||||
changelogPath: CHANGELOG.md
|
||||
versionExt: md
|
||||
versionFormat: '## dbt-core {{.Version}} - {{.Time.Format "January 02, 2006"}}'
|
||||
kindFormat: '### {{.Kind}}'
|
||||
changeFormat: '- {{.Body}} ([#{{.Custom.Issue}}](https://github.com/dbt-labs/dbt-core/issues/{{.Custom.Issue}}), [#{{.Custom.PR}}](https://github.com/dbt-labs/dbt-core/pull/{{.Custom.PR}})) ContributorData {{.Custom.Author}} {{.Custom.PR}}'
|
||||
kinds:
|
||||
- label: Fixes
|
||||
- label: Features
|
||||
- label: Under the Hood
|
||||
- label: Breaking Changes
|
||||
- label: Docs
|
||||
- label: Dependancies
|
||||
custom:
|
||||
- key: Author
|
||||
label: GitHub Name
|
||||
type: string
|
||||
minLength: 3
|
||||
- key: Issue
|
||||
label: GitHub Issue Number
|
||||
type: int
|
||||
minLength: 4
|
||||
- key: PR
|
||||
label: GitHub Pull Request Number
|
||||
type: int
|
||||
minLength: 4
|
||||
20
CHANGELOG.md
Normal file → Executable file
20
CHANGELOG.md
Normal file → Executable file
@@ -1,3 +1,23 @@
|
||||
# Changelog
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
|
||||
and is generated by [Changie](https://github.com/miniscruff/changie).
|
||||
|
||||
Everything above this line (including this line) can be customized in `.changes/header.tpl.md`.
|
||||
|
||||
|
||||
## dbt-core 1.1.1 - February 14, 2022
|
||||
### Fixes
|
||||
- Fixing old changelog issues to prove you can. ([#4444](https://github.com/dbt-labs/dbt-core/issues/4444), [#5555](https://github.com/dbt-labs/dbt-core/pull/5555))
|
||||
### Features
|
||||
- Update contributing docs to reflect changie. ([#1111](https://github.com/dbt-labs/dbt-core/issues/1111), [#2222](https://github.com/dbt-labs/dbt-core/pull/2222))
|
||||
|
||||
Contributors:
|
||||
- [@not-emmyoop](https://github.com/not-emmyoop) [#5555](https://github.com/dbt-labs/dbt-core/pull/5555)
|
||||
|
||||
|
||||
## dbt-core 1.1.0 (TBD)
|
||||
|
||||
### Features
|
||||
|
||||
@@ -113,6 +113,8 @@ A short list of tools used in `dbt-core` testing that will be helpful to your un
|
||||
|
||||
A deep understanding of these tools in not required to effectively contribute to `dbt-core`, but we recommend checking out the attached documentation if you're interested in learning more about them.
|
||||
|
||||
- [changie](https://changie.dev/) for generating `CHANGELOG` lines.
|
||||
|
||||
#### virtual environments
|
||||
|
||||
We strongly recommend using virtual environments when developing code in `dbt-core`. We recommend creating this virtualenv
|
||||
|
||||
84
scripts/add-contributors.py
Normal file
84
scripts/add-contributors.py
Normal file
@@ -0,0 +1,84 @@
|
||||
import sys
|
||||
|
||||
|
||||
def format_contributors(version):
|
||||
"""
|
||||
Takes in a version matching a markdown file generated by changie in the .changes directory.
|
||||
Grabs the contributor info at the end of each change line, pulls it off and puts it all at the
|
||||
bottom of this bacth of changes in a contributing section.
|
||||
"""
|
||||
fp = f"../.changes/{version}.md"
|
||||
separator = "ContributorData "
|
||||
bullet = "-"
|
||||
|
||||
# this is pretty brute force
|
||||
core_team = [
|
||||
"emmyoop",
|
||||
"nathaniel-may",
|
||||
"gshank" "leahwicz",
|
||||
"ChenyuLInx",
|
||||
"stu-k",
|
||||
"iknox-fa",
|
||||
"VersusFacit",
|
||||
"McKnight-42",
|
||||
"jtcohen6",
|
||||
]
|
||||
|
||||
contributors = {}
|
||||
new_file_contents = ""
|
||||
|
||||
with open(fp, "r+") as f:
|
||||
string_list = f.readlines()
|
||||
# pull the contributor info off the end of the lines
|
||||
for line in string_list:
|
||||
if line[0] == bullet:
|
||||
# TODO: handle is this data is blank
|
||||
|
||||
# Ex: `- This is my change text (#1234, #4567) ContributorData userName 4567`
|
||||
# first split the line by the changelog contents and the bits we
|
||||
# need to generate the contributors sections
|
||||
a, b = line.split(separator)
|
||||
|
||||
# split up the contributors section into useful bits
|
||||
user, pr = b.split(" ")
|
||||
|
||||
# only non-core team members are part of the contributors section
|
||||
if user and user not in core_team:
|
||||
if user in contributors:
|
||||
contributors[user].append(pr.strip("\n"))
|
||||
else:
|
||||
contributors[user] = [pr.strip("\n")]
|
||||
|
||||
# update the line minus the extra contributors bits
|
||||
# Ex: `- This is my change text (#1234, #4567)
|
||||
line = f"{a}\n"
|
||||
new_file_contents += line
|
||||
|
||||
# overwrite the file with the new format, without any contributor infornmation (for now)
|
||||
f.seek(0)
|
||||
f.write(new_file_contents)
|
||||
|
||||
# create new section of Contributors at the bottom, if there are any
|
||||
if contributors:
|
||||
f.write("\nContributors:\n")
|
||||
for key, value in contributors.items():
|
||||
user = f"[@{key}](https://github.com/{key})"
|
||||
pr = ""
|
||||
for i in value:
|
||||
pr += f" [#{i}](https://github.com/dbt-labs/dbt-core/pull/{i})"
|
||||
entry = f"{bullet} {user}{pr}\n"
|
||||
f.write(entry)
|
||||
|
||||
|
||||
def main():
|
||||
try:
|
||||
version = sys.argv[1]
|
||||
except IndexError:
|
||||
raise Exception("A version is required.")
|
||||
|
||||
format_contributors(version)
|
||||
print(f"Contributing section added to .changes/{version}.md.")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user