-
Notifications
You must be signed in to change notification settings - Fork 1.1k
A basic CI asv check would be useful #1446
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
Comments
perhaps config the "ASV-build" action to only occur for release tags instead of every PR commit? that might be enough |
I have tried to finish this task these days. But there is a problem I have met. |
@roger-lcc are your workflow .yml file and the corresponding github actions log publicly available? Can you link them here? |
Here are my workflow.yml.https://github.com/roger-lcc/test/blob/main/.github/workflows/main.yml
However, there is another problem. It seems that CI can't identify https://github.com/roger-lcc/test/actions/runs/2208939226 |
Thanks @roger-lcc! I think the version parsing issue is because versioneer determines pvlib's version string by looking at the git tags in the repository, but the checkout action by default doesn't pull tags, so it's returning a version like Something else to consider is that we currently use asv 0.4.2 for the nightly job (see https://github.com/pvlib-benchmarker/pvlib-benchmarks/blob/master/README.md?plain=1#L20), and maybe it doesn't really make a difference here but I think we should be consistent about it. |
Thanks @kanderso-nrel! Here is my updated workflow.yml.
And I have also used asv 0.4.2 in the workflow.
When I test the workflow, it seems like that the |
Yes, you're right. I didn't realize that the test repository wasn't a normal fork of pvlib. I guess you could tag a commit as 0.9.1 just to make the benchmarks run correctly, or just leave them disabled for your test, since they're not really needed to see if the github action works as intended.
I don't immediately see a reason why the path filter wouldn't work. But I don't think we even need a path filter anyway because changes outside of the |
The workflow worked successfully when I pushed git tag. And there is my workflow.yml and result.
And CI failed when I added a wrong benchmark. There is my result. |
Thanks @roger-lcc, this looks great! A couple comments:
Is it time to open a PR containing that workflow file? It would be good to get this in place before merging #1443 and #1445. |
Is your feature request related to a problem? Please describe.
Currently there's no automated check to ensure that changes to the benchmarks are valid. For example in #1443 and #1445 I think currently the best way to be sure that the new benchmarks are valid (i.e. they won't error when being run in the nightly job) is to checkout the PR locally and try it out manually. It would be nice if this was done automatically somehow.
An automated benchmark check would also prevent us from forgetting to update the benchmarks when we make breaking changes to pvlib itself.
Describe the solution you'd like
A new github actions workflow that builds the asv environments and executes the benchmarks at least once to ensure validity. Note that I'm not suggesting that we actually use the timing results for anything: the goal is to verify that the benchmarks execute without error, not to detect performance regressions. The latter will still be the nightly VM's responsibility.
Describe alternatives you've considered
Running the benchmarks in earnest for PRs would also solve this, but that is still a complicated problem that I don't want to take on at this point. I think this small step in that direction makes more sense for now.
Additional context
asv run --quick
seems to do what I want (ref):--strict
is probably also useful here, although see airspeed-velocity/asv#1199The text was updated successfully, but these errors were encountered: