Skip to content

Add workflow for uploading baseline images as a release asset #6782

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

Merged
merged 2 commits into from
Jun 10, 2022

Conversation

maxrjones
Copy link
Member

Description of proposed changes

Based on GenericMappingTools/pygmt#1317

Closes #5724

Reminders

  • Make sure that your code follows our style. Use the other functions/files as a basis.
  • Add tests for new features or tests that would have caught the bug that you're fixing.
  • Describe changes to function behavior and arguments in a comment below the function declaration.
  • If adding new functionality, add a detailed description to the documentation and/or an example.

@maxrjones maxrjones added the maintenance Boring but important stuff for the core devs label Jun 10, 2022
@seisman
Copy link
Member

seisman commented Jun 10, 2022

Looks good but I can't test it

@maxrjones
Copy link
Member Author

@seisman, do you think having this as a separate workflow is better than zipping up the files as part of the build-release script and adding the upload step to the draft-release workflow? I am undecided about which would be preferable.

@seisman
Copy link
Member

seisman commented Jun 10, 2022

zipping up the files as part of the build-release script and adding the upload step to the draft-release workflow

Uploading tarball in the draft-release workflow sounds a good idea to me, but we can't create the baseline image tarball in the build-release.sh script, because the script is run by Paul, not by any workflows.

@maxrjones
Copy link
Member Author

zipping up the files as part of the build-release script and adding the upload step to the draft-release workflow

we can't create the baseline image tarball in the build-release.sh script, because the script is run by Paul, not by any workflows.

I don't understand this point. The workflow commands are bash, and build-release.sh is a bash script so the code in

mkdir baseline-images
mkdir baseline-images/test
mkdir baseline-images/examples
mkdir baseline-images/scripts
cp -r test/baseline/* baseline-images/test
cp doc/examples/images/*.ps baseline-images/examples
cp doc/scripts/images/*.ps baseline-images/scripts
zip -r baseline-images baseline-images/ -x "*.dvc"
shasum -a 256 baseline-images.zip
would be possible to adapt to work in build-release.sh.

@seisman
Copy link
Member

seisman commented Jun 10, 2022

When making a release, Paul runs the build-release.sh script to build the source tarballs, create the macOS bundle and copy the source tarballs and macOS bundle to the GMT FTP server.

The script needs many commands like cmake and sphinx-build. We can improve the script so that it can create the tarball of baseline images, but if we want to run the script in CI, we have to install all the required commands.

@maxrjones
Copy link
Member Author

Right, it would need to be run by Paul and placed on the GMT FTP server with the other files. @PaulWessel, any opinions on whether to bundle and upload the baseline images manually as part of build-release.sh along with the other files or keep it separate as currently written in this PR?

@PaulWessel
Copy link
Member

I think it is probably fine as you have it in the CI - maybe one day the rest will follow.

@maxrjones maxrjones requested a review from a team June 10, 2022 16:47
@PaulWessel
Copy link
Member

In terms of release timing: I have all Saturday and maybe a short slice on Sunday but then it is in the car with the Watts and off to some serious hiking in the Lake District. Probably not going to be productive at some mountain cabin. Then on Tuesday I will be dropped off in Newcastle and take the train to Edinburgh for a Uni visit and talk. Then a 6 hour train trip back on Wednesday. So let's see if we can get lots of stuff done before then - otherwise the release may be end of next week.

@maxrjones
Copy link
Member Author

In terms of release timing: I have all Saturday and maybe a short slice on Sunday but then it is in the car with the Watts and off to some serious hiking in the Lake District. Probably not going to be productive at some mountain cabin. Then on Tuesday I will be dropped off in Newcastle and take the train to Edinburgh for a Uni visit and talk. Then a 6 hour train trip back on Wednesday. So let's see if we can get lots of stuff done before then - otherwise the release may be end of next week.

Sounds fun!
I can update the changelog, citation info, and test with PyGMT tomorrow AM EST. I think this is ready if I can get an approval on it.

@maxrjones maxrjones merged commit 83da187 into master Jun 10, 2022
@maxrjones maxrjones deleted the release-image-workflow branch June 10, 2022 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Boring but important stuff for the core devs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proposal for managing test baseline images using data version control (dvc)
3 participants