Compare commits

...

11 Commits

Author SHA1 Message Date
Emily Rockman
3d749d5b7c reformat! 2022-02-14 10:47:23 -06:00
Emily Rockman
14d9282848 Merge branch 'er/changie-third' into changie-main 2022-02-14 09:32:41 -06:00
Emily Rockman
c5a5d2564e fixed changlog itself and format for future changelog generation 2022-02-14 09:32:29 -06:00
Emily Rockman
6716734294 result of changie merge 2022-02-14 09:29:42 -06:00
Emily Rockman
b09d5783e8 results of running add-contributors.py 2022-02-14 09:28:53 -06:00
Emily Rockman
9d6eaea95e results of changie batch 2022-02-14 09:26:55 -06:00
Emily Rockman
b3f8129687 Merge branch 'er/changie-second' into changie-main 2022-02-14 09:23:57 -06:00
Emily Rockman
84d3c63c95 fixed changelog inconsistency from the past 2022-02-14 09:23:45 -06:00
Emily Rockman
8b27ed1f05 Merge branch 'er/changie-first' into changie-main 2022-02-14 09:16:50 -06:00
Emily Rockman
701c4e3e51 add contributing docs 2022-02-14 09:16:12 -06:00
Emily Rockman
30a148ddcd initial setup to use changie 2022-02-14 08:58:20 -06:00
9 changed files with 3688 additions and 0 deletions

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
View 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
View 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
View File

View 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
View 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
View 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

View File

@@ -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

View 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()