libpysal icon indicating copy to clipboard operation
libpysal copied to clipboard

Logic for pushing tags to trigger release needs to be revisited

Open sjsrey opened this issue 3 years ago • 3 comments

run Changelog will set start_date equal to the date of the most recent tag on upstream. If we are relying on a pushed tag to trigger this, then the start_date==release_date and the logic of parsing the commits since the last release is broken. This results in a truncated changelog.

sjsrey avatar Nov 17 '22 23:11 sjsrey

A possible fix is to change cell 1 of tools/gitcount.ipynb from:

from subprocess import Popen, PIPE
x, err = Popen(
    'git log -1 --tags --simplify-by-decoration --pretty="%ai"| cat',
    stdin=PIPE,
    stdout=PIPE,
    stderr=PIPE,
    shell=True
).communicate()
start_date = x.split()[0].decode("utf-8")

to

from subprocess import Popen, PIPE
x, err = Popen(
    'git log -2 --tags --simplify-by-decoration --pretty="%ai"| cat',
    stdin=PIPE,
    stdout=PIPE,
    stderr=PIPE,
    shell=True
).communicate()
start_date = x.decode("utf-8").split("\n")[1].split()[0]

But since this is likely being used elsewhere through the federation, we should discuss first.

sjsrey avatar Nov 17 '22 23:11 sjsrey

Or we just get the date of the last release for start_date. This could be done by changing cell 1 of tools/gitcount.ipynb to:

import requests
response = requests.get('https://api.github.com/repos/pysal/libpysal/releases/latest')
start_date = response.json()['created_at'][:10]

sjsrey avatar Nov 18 '22 00:11 sjsrey

I would say we take another look at implementing the GHA for creating release notes that is being used in spaghetti and spopt across the federation. It is customizable through release.yml and the generated summary is pretty good (here is spopt's most recent one, for example).

jGaboardi avatar Nov 18 '22 01:11 jGaboardi

closing as we have a new tooling setup

knaaptime avatar Jul 18 '24 15:07 knaaptime