dandi / dandisets

730 Dandisets, 807.1 TB total. DataLad super-dataset of all Dandisets from https://github.com/dandisets
10 stars 0 forks source link

mint release from a tag on github #337

Closed yarikoptic closed 1 year ago

yarikoptic commented 1 year ago

ATM it just lists them as tags, but not readily shows the most recent tag/release. So we should mint a proper release for tags we push.

jwodder commented 1 year ago

@yarikoptic What should be done about already-pushed tags? Should the script just create a release for every tag that lacks a release?

yarikoptic commented 1 year ago

ideally -- yes, create release for every tag matching the regex for our versions. Before that -- should be done in the order probably from older to newer. May be should not be done "all the time" but just as a helper command (release-already-existing-tags [dandisets]) which we could run once. Then we would just rely on new pushed tags to be accompanied with making a release for them.

jwodder commented 1 year ago

@yarikoptic

create release for every tag matching the regex for our versions.

Do you expect there to be tags that don't match the version regex?


I think always ensuring that all tags have releases would be easier than trying to figure out which tags were just pushed (unless you know an easy way to do that?).

yarikoptic commented 1 year ago

ATM I don't know of any tags which aren't release tags, but who knows -- we might add/push some later on. But ok, mint for every tag, although I would have limited to simple (not extended) semver ones (MAJOR.MINOR.PATCH) .

As for checking all tags upon every push - I think that would introduce unnecessary burden which would slow down otherwise possibly fast push which would not push any tag. But ok -- if you think that overhead is minimal, let's just always do that

yarikoptic commented 1 year ago
BTW, can't even quite get how/where do we push the tags since seems we use datalad's `Dataset.push` but that one seems to not bother pushing tags (unless git config sets what to push but we do not) ```shell ❯ python3 -c 'import datalad.api as dl, json; ds=dl.Dataset("."); res = ds.push(to="localhost", result_renderer=None); print(json.dumps(res, indent=2))' [ { "action": "publish", "refds": "/tmp/tttttt", "type": "dataset", "path": "/tmp/tttttt", "status": "notneeded", "target": "localhost", "refspec": "refs/heads/git-annex:refs/heads/git-annex", "operations": [ "uptodate" ], "hints": null, "message": "refs/heads/git-annex->localhost:refs/heads/git-annex [up to date]" }, { "action": "publish", "refds": "/tmp/tttttt", "type": "dataset", "path": "/tmp/tttttt", "status": "ok", "target": "localhost", "refspec": "refs/heads/master:refs/heads/master", "operations": [ "fast-forward" ], "hints": null, "message": "refs/heads/master->localhost:refs/heads/master c0fb8ec..06433db" } ] ❯ git push --tags localhost Enumerating objects: 1, done. Counting objects: 100% (1/1), done. Writing objects: 100% (1/1), 174 bytes | 174.00 KiB/s, done. Total 1 (delta 0), reused 0 (delta 0), pack-reused 0 To /tmp/tttttt-localhost * [new tag] 1234 -> 1234 * [new tag] tag2 -> tag2 ```
jwodder commented 1 year ago

@yarikoptic Tags are pushed here. Given this, creating releases will be easiest if a release is only created for a just-pushed tag. If you then want there to be a release-already-existing-tags command, should this be a subcommand of backups2datalad or a separate script?

yarikoptic commented 1 year ago

@yarikoptic Tags are pushed here. Given this, creating releases will be easiest if a release is only created for a just-pushed tag.

yeap -- great, let's add there.

If you then want there to be a release-already-existing-tags command, should this be a subcommand of backups2datalad or a separate script?

whatever is easiest/fastest -- I expect/hope to never use it again ;-)