-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* change version for beta6 release * added script to help generate release notes for development releases * add default title for issues and added documentation issue template * sort issues by number, improve formatting for release notes title, add logging to alert users what is happening when timely github queries are running * added release notes for beta6 release * Add option to component version script to return 'develop' if the input version is a beta or rc version to preserve previous behavior of GHA scripts. Update GHA scripts to use new option * applied suggestions from feedback in PR #2736 * bold some release notes
- Loading branch information
1 parent
86327e0
commit 5ba60f7
Showing
9 changed files
with
288 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
--- | ||
name: Documentation | ||
about: Update the documentation | ||
title: 'Documentation: ' | ||
labels: 'alert: NEED ACCOUNT KEY, alert: NEED MORE DEFINITION, alert: NEED CYCLE ASSIGNMENT, type: documentation' | ||
assignees: '' | ||
|
||
--- | ||
|
||
*Replace italics below with details for this issue.* | ||
|
||
## Describe the Task ## | ||
*Provide a description of the task here.* | ||
|
||
### Time Estimate ### | ||
*Estimate the amount of work required here.* | ||
*Issues should represent approximately 1 to 3 days of work.* | ||
|
||
### Sub-Issues ### | ||
Consider breaking the task down into sub-issues. | ||
- [ ] *Add a checkbox for each sub-issue here.* | ||
|
||
### Relevant Deadlines ### | ||
*List relevant project deadlines here or state NONE.* | ||
|
||
### Funding Source ### | ||
*Define the source of funding and account keys here or state NONE.* | ||
|
||
## Define the Metadata ## | ||
|
||
### Assignee ### | ||
- [ ] Select appropriate **assignee** for this issue | ||
|
||
### Labels ### | ||
- [ ] Review default **alert** labels | ||
- [ ] Select **component(s)** | ||
- [ ] Select **priority** | ||
- [ ] Select **requestor(s)** | ||
|
||
### Milestone and Projects ### | ||
- [ ] Select **Milestone** as a **METplus-Wrappers-X.Y.Z** version, **Consider for Next Release**, or **Backlog of Development Ideas** | ||
- [ ] For a **METplus-Wrappers-X.Y.Z** version, select the **METplus-Wrappers-X.Y.Z Development** project | ||
|
||
## Define Related Issue(s) ## | ||
Consider the impact to the other METplus components. | ||
- [ ] [METplus](https://github.com/dtcenter/METplus/issues/new/choose), [MET](https://github.com/dtcenter/MET/issues/new/choose), [METdataio](https://github.com/dtcenter/METdataio/issues/new/choose), [METviewer](https://github.com/dtcenter/METviewer/issues/new/choose), [METexpress](https://github.com/dtcenter/METexpress/issues/new/choose), [METcalcpy](https://github.com/dtcenter/METcalcpy/issues/new/choose), [METplotpy](https://github.com/dtcenter/METplotpy/issues/new/choose) | ||
|
||
## Task Checklist ## | ||
See the [METplus Workflow](https://metplus.readthedocs.io/en/latest/Contributors_Guide/github_workflow.html) for details. | ||
- [ ] Complete the issue definition above, including the **Time Estimate** and **Funding Source**. | ||
- [ ] Fork this repository or create a branch of **develop**. | ||
Branch name: `feature_<Issue Number>_<Description>` | ||
- [ ] Complete the development and test your changes. | ||
- [ ] Add/update log messages for easier debugging. | ||
- [ ] Add/update unit tests. | ||
- [ ] Add/update documentation. | ||
- [ ] Add any new Python packages to the [METplus Components Python Requirements](https://metplus.readthedocs.io/en/develop/Users_Guide/appendixA.html#metplus-components-python-packages) table. | ||
- [ ] For any new datasets, an entry to the [METplus Verification Datasets Guide](https://metplus.readthedocs.io/en/latest/Verification_Datasets/index.html). | ||
- [ ] Push local changes to GitHub. | ||
- [ ] Submit a pull request to merge into **develop**. | ||
Pull request: `feature <Issue Number> <Description>` | ||
- [ ] Define the pull request metadata, as permissions allow. | ||
Select: **Reviewer(s)** and **Development** issue | ||
Select: **Milestone** as the next official version | ||
Select: **METplus-Wrappers-X.Y.Z Development** project for development toward the next official release | ||
- [ ] Iterate until the reviewer(s) accept and merge your changes. | ||
- [ ] Delete your fork or branch. | ||
- [ ] Close this issue. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
#! /usr/bin/env python3 | ||
|
||
import sys | ||
import os | ||
|
||
from github import Github | ||
from datetime import datetime, timezone | ||
|
||
GITHUB_ORG = 'dtcenter' | ||
|
||
CATEGORIES = ( | ||
'Enhancement', | ||
'Bugfix', | ||
'New Wrapper', | ||
'New Use Case', | ||
'Documentation', | ||
'Internal', | ||
) | ||
|
||
|
||
def main(dev_name, dev_start_date, dev_end_date=datetime.today(), repo_name='METplus'): | ||
token = os.getenv('GITHUB_TOKEN') | ||
if not token: | ||
print("ERROR: Must set GITHUB_TOKEN environment variable") | ||
sys.exit(1) | ||
|
||
all_issues = get_all_issues_since_dev_start(token, repo_name, dev_start_date) | ||
issues_by_category = get_issues_by_category(all_issues) | ||
|
||
print_banner('ADD THIS TO docs/Users_Guide/release-notes.rst') | ||
|
||
print_header(repo_name, dev_name, dev_end_date) | ||
print_issues_by_category(repo_name, issues_by_category) | ||
|
||
print_banner('ADD THIS TO METplus Coordinated Release Acceptance Testing') | ||
|
||
print_release_testing(repo_name, dev_name, all_issues) | ||
|
||
|
||
def get_all_issues_since_dev_start(token, repo_name, dev_start_date): | ||
print(f"Finding issues in {GITHUB_ORG}/{repo_name} that were closed after {dev_start_date.strftime('%Y-%m-%d')}...") | ||
github_obj = Github(token) | ||
org = github_obj.get_organization(GITHUB_ORG) | ||
repo = org.get_repo(repo_name) | ||
|
||
all_issues = repo.get_issues(state='closed', since=dev_start_date) | ||
all_issues = [issue for issue in all_issues if issue.pull_request is None] | ||
all_issues = [issue for issue in all_issues if not issue.title.startswith('Update Truth')] | ||
all_issues.sort(key=lambda x: x.number) | ||
return all_issues | ||
|
||
|
||
def print_banner(msg): | ||
print(f"\n{'*' * len(msg)}\n{msg}\n{'*' * len(msg)}\n") | ||
|
||
|
||
def print_header(repo_name, dev_name, dev_end_date): | ||
dev_fmt = dev_name.replace('-', '').replace('beta', 'Beta ').replace('rc', 'RC ') | ||
header = f"{repo_name} Version {dev_fmt} Release Notes ({dev_end_date.strftime('%Y-%m-%d')})" | ||
print(header) | ||
print('-' * len(header)) | ||
|
||
|
||
def print_issues_by_category(repo_name, issues_by_category): | ||
for category, issues in issues_by_category.items(): | ||
print() | ||
if category != 'none': | ||
print(f" .. dropdown:: {category}\n") | ||
else: | ||
print('COULD NOT PARSE CATEGORY FROM THESE:\n') | ||
if issues is None: | ||
print(' NONE') | ||
continue | ||
for issue in issues: | ||
title = issue.title.removeprefix(category).lstrip(' :') | ||
num = issue.number | ||
print(f" * {title}") | ||
print(f" (`#{num} <https://github.com/{GITHUB_ORG}/{repo_name}/issues/{num}>`_)") | ||
|
||
|
||
def get_issues_by_category(all_issues): | ||
issues_by_category = dict.fromkeys(CATEGORIES) | ||
issues_by_category['none'] = [] | ||
for issue in all_issues: | ||
found_cat = False | ||
for category in CATEGORIES: | ||
if issue.title.startswith(f"{category}:"): | ||
if issues_by_category[category] is None: | ||
issues_by_category[category] = [] | ||
issues_by_category[category].append(issue) | ||
found_cat = True | ||
break | ||
if not found_cat: | ||
if issues_by_category['none'] is None: | ||
issues_by_category['none'] = [] | ||
issues_by_category['none'].append(issue) | ||
return issues_by_category | ||
|
||
|
||
def print_release_testing(repo_name, dev_name, all_issues): | ||
dev_info = dev_name.split('-')[1] | ||
for issue in all_issues: | ||
num = issue.number | ||
print(f"| **OPEN** || [#{num}](https://github.com/{GITHUB_ORG}/{repo_name}/issues/{num}) | {dev_info} |||") | ||
|
||
|
||
if __name__ == '__main__': | ||
import argparse | ||
parser = argparse.ArgumentParser() | ||
parser.add_argument('dev_name', | ||
help="name of development cycle, e.g. 6.0.0-beta6") | ||
parser.add_argument('start_date', | ||
help="YYYYMMDD date when development cycle started") | ||
parser.add_argument('-r', '--repo', | ||
default='METplus', | ||
help="Repository to parse, default is METplus") | ||
args = parser.parse_args() | ||
|
||
ymd = args.start_date | ||
try: | ||
year = int(ymd[:4]) | ||
month = int(ymd[4:6]) | ||
day = int(ymd[6:8]) | ||
except ValueError: | ||
print('ERROR: Argument must be YYYYMMDD') | ||
sys.exit(1) | ||
|
||
start_date = datetime(year, month, day, tzinfo=timezone.utc) | ||
main(repo_name=args.repo, dev_name=args.dev_name, dev_start_date=start_date) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
6.0.0-beta6-dev | ||
6.0.0-beta6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters