Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up auto #558

Merged
merged 6 commits into from
Apr 20, 2022
Merged

Set up auto #558

merged 6 commits into from
Apr 20, 2022

Conversation

jwodder
Copy link
Member

@jwodder jwodder commented Apr 6, 2022

Closes #557.

This PR also needs to be accompanied by the following changes:

  • Create the necessary labels for auto by running GH_TOKEN=... auto create-labels in a copy of this repository containing .autorc
  • All PRs merged since the previous release should receive appropriate labels. Done, this is the PRs: https://github.com/nipy/heudiconv/pulls?q=is%3Apr+is%3Aclosed+sort%3Acreated-desc+merged%3A%3E%3D2021-09-16
  • An auth token for uploading assets for the heudiconv project to PyPI must be saved as a secret named "PYPI_TOKEN"
  • A Docker Hub username and token for uploading nipy/heudiconv images must be saved as secrets named DOCKER_LOGIN and DOCKER_TOKEN, respectively (@yarikoptic is waiting for repronimservices to be added to the team to be used here did for another account)

@codecov
Copy link

codecov bot commented Apr 6, 2022

Codecov Report

Merging #558 (0442b39) into master (a1f63de) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #558      +/-   ##
==========================================
+ Coverage   81.24%   81.26%   +0.01%     
==========================================
  Files          41       41              
  Lines        3813     3817       +4     
==========================================
+ Hits         3098     3102       +4     
  Misses        715      715              
Impacted Files Coverage Δ
heudiconv/info.py 100.00% <ø> (ø)
heudiconv/__init__.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a1f63de...0442b39. Read the comment docs.

@yarikoptic
Copy link
Member

Re docker:

  • another sample pipeline from @satra: https://github.com/ABCD-ReproNim/reprohub/blob/reprohub/.github/workflows/docker-image.yml
  • I changed my mind: let's aim to mimic our prior setup and build not only for releases. Following docker image tags should be pushed off master
    • tag as master and push for every build
    • if state of master corresponds to a release tag (I guess pushed by auto):
      • push that image as that version tag (e.g. upcoming 0.11.0)
      • retag that image also as latest tag and push it too (ideally should be the same image hexsha, as it is now for 0.10.0 on docker hub)

@jwodder jwodder added the internal Changes only affect the internal API label Apr 8, 2022
@jwodder jwodder marked this pull request as ready for review April 8, 2022 13:57
@jwodder
Copy link
Member Author

jwodder commented Apr 8, 2022

@yarikoptic Dockerization added.

Copy link
Member

@yarikoptic yarikoptic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may be to add some CONTRIBUTING.md with brief description of this release process, and what to do if it doesn't work out, i.e. is there a way to at least introduce version adjustments?

but also I thought if it would be possible to add versioneer or your versioningit while at it , or it better be a separate PR? I am tired of --version to be not git informed in heudiconv.

id: latest-release
run: |
latest_tag="$(curl -fsSL https://api.github.com/repos/$GITHUB_REPOSITORY/releases/latest | jq -r .tag_name)"
echo "::set-output name=tag::$latest_tag"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why needs.auto-release.outputs.auto-version can't be used here? I am afraid if api.github has some delay in propagating effects of auto shipit we might end up using some wrong tag here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because auto version outputs a patch level, not a version number.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel that we had similar problem somewhere else and did find how to trick auto to tell us the full version, didn't we? I would really prefer to not rely on the logic of jumping through github without any validation that the tag does correspond to this state. Wouldn't prior step tag it, so we could just use git describe here and get a clean version?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Workflow adjusted.


prep_release:
# take previous one, and replace with the next one
utils/prep_release
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if github workflow fails somehow, how could we prep release locally? i.e. how at least bumpversion would be done?

I wonder if either Makefile or some documentation should be left behind on that.

@jwodder
Copy link
Member Author

jwodder commented Apr 11, 2022

@yarikoptic

but also I thought if it would be possible to add versioneer or your versioningit while at it

If we use versioningit, then presumably we would want to get rid of all the explicit version numbers bumped by prep_release/bump2version. This would mean:

  • Configuring whatever builds the docs to install the package beforehand so that the __version__ can be imported in docs/conf.py
  • Rewriting the Docker & Singularity pull commands in docs/installation.rst and the scripts in docs/usage.rst to no longer contain an explicit version number
    • Once we start pushing "latest" images to Docker Hub, we can use latest as the image tag in the docker pull command; would that work for Singularity as well?

@yarikoptic
Copy link
Member

All of the above sounds good to me. Yes, singularity should pull from docker hub, we will provide also images from ///repronim/containers later

@jwodder
Copy link
Member Author

jwodder commented Apr 11, 2022

@yarikoptic versioningit added; bump2version eliminated.

@yarikoptic
Copy link
Member

ok, let's proceed and see where it takes us

@yarikoptic yarikoptic merged commit 0da0323 into master Apr 20, 2022
@github-actions
Copy link

🚀 PR was released in v0.11.0 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal Changes only affect the internal API released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add auto and building/pushing of docker image
2 participants