Skip to content

Commit

Permalink
Merge pull request #599 from ESMValGroup/release_notes
Browse files Browse the repository at this point in the history
Add v2.0.0b9 release notes
  • Loading branch information
bouweandela authored Mar 31, 2020
2 parents 28e9cf4 + e58a3a9 commit a0b022c
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 8 deletions.
26 changes: 25 additions & 1 deletion doc/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
Changelog
=========

v2.0.0b9
--------

For older releases, see the release notes on https://github.com/ESMValGroup/ESMValCore/releases.
This release includes

Bug fixes
~~~~~~~~~

- Cast dtype float32 to output from zonal and meridional area preprocessors (`#581 <https://github.com/ESMValGroup/ESMValCore/pull/581>`__) `Valeriu Predoi <https://github.com/valeriupredoi>`__

Improvements
~~~~~~~~~~~~

- Unpin on Python<3.8 for conda package (run) (`#570 <https://github.com/ESMValGroup/ESMValCore/pull/570>`__) `Valeriu Predoi <https://github.com/valeriupredoi>`__
- Update pytest installation marker (`#572 <https://github.com/ESMValGroup/ESMValCore/pull/572>`__) `Bouwe Andela <https://github.com/bouweandela>`__
- Remove vmrh2o (`#573 <https://github.com/ESMValGroup/ESMValCore/pull/573>`__) `Mattia Righi <https://github.com/mattiarighi>`__
- Restructure documentation (`#575 <https://github.com/ESMValGroup/ESMValCore/pull/575>`__) `Bouwe Andela <https://github.com/bouweandela>`__
- Fix mask in land variables for CCSM4 (`#579 <https://github.com/ESMValGroup/ESMValCore/pull/579>`__) `Klaus Zimmermann <https://github.com/zklaus>`__
- Fix derive scripts wrt required method (`#585 <https://github.com/ESMValGroup/ESMValCore/pull/585>`__) `Klaus Zimmermann <https://github.com/zklaus>`__
- Check coordinates do not have repeated standard names (`#558 <https://github.com/ESMValGroup/ESMValCore/pull/558>`__) `Javier Vegas-Regidor <https://github.com/jvegasbsc>`__
- Added derivation script for co2s (`#587 <https://github.com/ESMValGroup/ESMValCore/pull/587>`__) `Manuel Schlund <https://github.com/schlunma>`__
- Adapted custom co2s table to match CMIP6 version (`#588 <https://github.com/ESMValGroup/ESMValCore/pull/588>`__) `Manuel Schlund <https://github.com/schlunma>`__
- Increase version to v2.0.0b9 (`#593 <https://github.com/ESMValGroup/ESMValCore/pull/593>`__) `Bouwe Andela <https://github.com/bouweandela>`__
- Add a method to save citation information (`#402 <https://github.com/ESMValGroup/ESMValCore/pull/402>`__) `SarahAlidoost <https://github.com/SarahAlidoost>`__

For older releases, see the release notes on https://github.com/ESMValGroup/ESMValCore/releases.
31 changes: 24 additions & 7 deletions esmvalcore/utils/draft_release_notes.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,17 @@
"~/.github_api_key, see:\nhttps://help.github.com/en/github/"
"authenticating-to-github/creating-a-personal-access-token-"
"for-the-command-line")

from esmvalcore import __version__

VERSION = f"v{__version__}"
GITHUB_REPO = "ESMValGroup/ESMValCore"

TITLES = {
'bug': 'Bug fixes',
'enhancement': 'Improvements',
}


def draft_notes_since(previous_release_date, labels):
"""Draft release notes containing the merged pull requests.
Expand Down Expand Up @@ -57,26 +66,34 @@ def draft_notes_since(previous_release_date, labels):

user = pull.user
username = user.login if user.name is None else user.name
line = (f"- {pull.title} (#{pull.number}) "
f"[{username}](https://github.com/{user.login})")
line = (
f"- {pull.title} (`#{pull.number} "
f"<https://github.com/{GITHUB_REPO}/pull/{pull.number}>`__) "
f"`{username} <https://github.com/{user.login}>`__")
if label not in lines:
lines[label] = []
lines[label].append((pull.closed_at, line))

# Create sections
sections = ["This release includes"]
sections = [
VERSION,
'-' * len(VERSION),
'',
"This release includes",
]
for label in sorted(lines):
sections.append('\n' + label)
lines[label].sort() # sort by merge time
sections.append('\n'.join(line for _, line in lines[label]))
entries = sorted(lines[label]) # sort by merge time
label = TITLES.get(label, label)
sections.append('\n'.join(['', label, '~' * len(label), '']))
sections.append('\n'.join(entry for _, entry in entries))
notes = '\n'.join(sections)

print(notes)


if __name__ == '__main__':

PREVIOUS_RELEASE = datetime.datetime(2020, 1, 17)
PREVIOUS_RELEASE = datetime.datetime(2020, 3, 6)
LABELS = ('bug', 'fix for dataset')

draft_notes_since(PREVIOUS_RELEASE, LABELS)

0 comments on commit a0b022c

Please sign in to comment.