-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
Refine GitHub Actions #246
Conversation
Codecov Report
@@ Coverage Diff @@
## master #246 +/- ##
==========================================
+ Coverage 72.31% 74.83% +2.52%
==========================================
Files 43 43
Lines 4515 5035 +520
==========================================
+ Hits 3265 3768 +503
- Misses 1250 1267 +17
Continue to review full report at Codecov.
|
Accomplishments in this PR:
Outstanding:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The matrix could be trimmed. Is there a reason why you are testing against astropy 3.x when 4.0.x is the current LTS? I think the important astropy versions to test against are: 4.0.x (LTS), 4.2 (latest stable), and dev
So the matrix could be trimmed down to 3 jobs (any more you add would be a bonus but I am not sure how necessary):
- Python 3.7 + astropy 4.0.x + your oldest numpy (1.17?)
- Python 3.8 + astropy 4.2 + latest stable numpy
- Python 3.9 + astropy dev + latest/dev numpy (dev numpy might be overkill)
The coverage job: Can it be attached to one of the matrix jobs above (maybe stable astropy + stable numpy)? See astropy
Actions + Tox setup for example.
Coverage reporting: I do see that it commented on the PR, so coverage upload works. astropy
does have a codecov.yml
that disables commenting but I don't think that is mutually exclusive with PR status posting. Maybe get this in master
first and see if the status then magically appears in subsequent PRs.
Doc build job: I would say it is unnecessary if you opt to use RTD PR builder (which also allows doc preview). Up to you though.
.github/workflows/cibuild.yml
Outdated
@@ -54,10 +55,40 @@ jobs: | |||
- name: Python 3.8 with astropy32 | |||
if: matrix.python-version == 3.8 | |||
run: tox -e py38-test-astropy32 | |||
- name: Python 3.8 with astropy40 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this works. astropy
has a different style if you are interested: https://github.com/astropy/astropy/blob/master/.github/workflows/ci_workflows.yml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I will do that if we agree to a regression matrix that is symmetrical.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pllim do you know if astropy
releases minor versions to work with newer Python version? E.g. recently released P3.9 expected to work with latest astropy4.0
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
astropy 4.0.4 should work with Python 3.9; I see the wheels for Python 3.9 at https://pypi.org/project/astropy/4.0.4/#files
@@ -3,6 +3,8 @@ name: CI | |||
on: | |||
push: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to prevent people from kicking off CI on their own feature branches in their forks, you can make this stricter.
push: | |
push: | |
branches: | |
- master | |
tags: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The matrix could be trimmed. Is there a reason why you are testing against astropy 3.x when 4.0.x is the current LTS? I think the important astropy versions to test against are: 4.0.x (LTS), 4.2 (latest stable), and dev
So the matrix could be trimmed down to 3 jobs (any more you add would be a bonus but I am not sure how necessary):
- Python 3.7 + astropy 4.0.x + your oldest numpy (1.17?)
- Python 3.8 + astropy 4.2 + latest stable numpy
- Python 3.9 + astropy dev + latest/dev numpy (dev numpy might be overkill)
The coverage job: Can it be attached to one of the matrix jobs above (maybe stable astropy + stable numpy)? See
astropy
Actions + Tox setup for example.Coverage reporting: I do see that it commented on the PR, so coverage upload works.
astropy
does have acodecov.yml
that disables commenting but I don't think that is mutually exclusive with PR status posting. Maybe get this inmaster
first and see if the status then magically appears in subsequent PRs.Doc build job: I would say it is unnecessary if you opt to use RTD PR builder (which also allows doc preview). Up to you though.
Thanks @pllim
I'm fine with dropping support for 3.x if that's astropy
policy. Do we have agreement. As for numpy
, as I've mentioned before, for the numpy
used in this project I don't think we should bother with different versions. That's dealt with upstream (i.e. astropy
)
I'm going to look into attaching coverage to one of the existing jobs in the matrix
How does the RTD builder app work? I haven't used it before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason not to do CI on feature branches? I use them in my fork and that's why I prefer to see the CI results after a push in a feature branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does the RTD builder app work?
Go to https://readthedocs.org/projects/pyvo/ -> Admin -> Advanced Settings (top left) -> check the "Build pull requests for this project" -> click "Save" (bottom)
Any push to PR after that would trigger a new job from RTD. It is controlled by your https://github.com/astropy/pyvo/blob/master/.readthedocs.yml but you do need to upgrade that YAML to RTD v2 first (https://docs.readthedocs.io/en/stable/config-file/v2.html). You also have the option to let it fail if there is any warning or not; up to you.
Any reason not to do CI on feature branches?
To save the Earth a little, I guess. But if you think those extra runs are necessary, then keep it as-is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As for dropping matrix for astropy
3.x, that is up to you. I don't see any minversion of astropy
defined in your setup.cfg
. Usually you want to test against the minversion that you say you support.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way you can ask PyVO stakeholders about this? No one should still be using Python 2 or 3.5, so I don't see why anyone needs astropy<4
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that astroquery
is the main stakeholder so I'll wait for @bsipocz word.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can ping @keflavich and @ceb8 too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we rely on astropy < 4; is that the question? haven't time to read back through whole convo now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that was the question. In this case, we'll drop support for 3.*
Co-authored-by: P. L. Lim <2090236+pllim@users.noreply.github.com>
@@ -3,6 +3,8 @@ name: CI | |||
on: | |||
push: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @pllim's suggestion on trimming the matrix, and see no reason to do anything with astropy
3.x. I would even be OK with us specifying astropy>=4.1
in setup.cfg
since that's not a big ask from our users and gives us consistent handling of string values in VOTables (no more byte strings).
For our convenience, I do like triggering CI on feature branches. It is overkill, but I have found it to save me headaches and dev time by catching weird things sooner. That helps me rationalize the extra runs along with the fact that the pyvo
test suite doesn't take long at all to run.
I yield to @pllim's opinion on the other matters, and admit to not fully grasping the details of the macOS and Windows build specs, but am happy to see how they run.
Another version with trimmed matrix is now available. |
@@ -3,6 +3,8 @@ name: CI | |||
on: | |||
push: | |||
pull_request: | |||
schedule: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've just noticed this section. What is the intended effect of this cron
? I'm new to this syntax so it looks like this scheduling is independent of the other triggers (so the CI would run every 3 hours all the time), but I could also imagine it somehow chaining with the push and pull_request to bin the CI runs once those triggers happen. Are there reasons to run other than when a push or pull_request trigger happens?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that spec tells it to run daily at 3 AM (UTC). If this is a low-traffic package, weekly might work too.
Cron job is to catch upstream changes that might break your code. So I don't think you should get rid of it. Most of the time, it would pass, but for that rare case a new upstream release breaks your code, you would want to know even when there is no push to master
. Most common example is that a new release finally removed that deprecated API and you have been ignoring the deprecation warning; or it removed/changed a hidden function that you have been using. Hope that clarifies the matter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The nightly build cron runs at 3:00UTC in the master.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, sorry, I don't know why I read that as every 3 hours. Daily seems OK to me. It's nice to see those upstream impacts sooner rather than later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I'm also nervous about build breakages due to outside things, even outside astropy, as sometimes it's a while between PRs.
README.rst
Outdated
.. image:: https://travis-ci.org/astropy/pyvo.svg | ||
:target: https://travis-ci.org/astropy/pyvo | ||
:alt: Travis Status | ||
.. image:: https://github.com/astropy/pyvo/workflows/CI/badge.svg?branch=master&event=schedule |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why event=schedule
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because it reflects the (more or less current) status of the master
branch. Where should we point it to?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe https://github.com/astropy/pyvo/workflows/CI/badge.svg?branch=master is enough so it picks up merge commit runs too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, you have a good point here. I'll update it.
astropy30: with astropy 3.0.* | ||
astropy31: with numpy 3.1.* | ||
astropy32: with numpy 3.2.* | ||
astropy40: with astropy 4.0.* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might also want to match your astropy
minversion to your numpy
minversion for cross-testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I don't understand. We don't have min versions specified and we've decided not to do cross-testing here, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case, I still recommend cross testing with the minversion of numpy that astropy 4.0 supports (numpy 1.16), but if you disagree, feel free to ignore; this is just a recommendation.
p.s. Weird, I don't see the RTD build here. Did you enable it on the RTD side? |
p.p.s. Is |
p.p.p.s. Test header won't show unless you move https://github.com/astropy/pyvo/blob/master/pyvo/conftest.py to root directory. Some people say that messes up the test runner (i.e., Also, I was thinking more like 3 jobs instead of 9 jobs.
|
Co-authored-by: P. L. Lim <2090236+pllim@users.noreply.github.com>
I thought I did. |
It was there from before so I just preserved it. I assume it was meant to do a quick check before spawning all the test jobs. |
Re: egginfo -- Ah, okay. Re: RTD -- Ops, I forgot. The webhook setting in this repo also has to be updated. I have updated it for you. So theoretically, in your next push, it should kick off. 🤞 |
What is the test header?
Really? 3 doesn't make a matrix :-). |
Awesome! Thanks! |
https://github.com/astropy/pytest-astropy-header ; it reports the dependency versions. I see that you have it set up. It is just not displaying in the CI log.
It all depends what you want to test, I guess. Is it really PyVO's problem when astropy 4.0 suddenly breaks in Python 3.9? Do you need to test all those combos for every commit on a PR? I can see that it might be useful for cron, but might be a little excessive for pull request? But if you disagree, feel free to keep it as is. I'll leave that to your good judgement. |
Got it. I've moved it to
I agree with you that it might be excessive but |
@pllim - good news is that RTD kicked, the bad news is that it failed. Do you happen to know why |
@tomdonaldson, @cbanek & @bsipocz - This is ready for the final review. @pllim has helped me iron out the last details (many thanks!). Please review at your earliest convenience or let me know if you are OK with me releasing it. There is at least another PR that is blocked on the CI and I'd like to get back to the user soon. Thanks. |
This all looks fine to me. Thanks very much @pllim for the discussion and guidance. I've learned a lot. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, so many thanks to @andamian for doing all the work and @pllim for all the great feedback. I echo @tomdonaldson that I learned a lot!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test header is still not appearing but it can be fixed as a separate PR, because I think you might as well move the dependencies metadata to setup.cfg
and apply APE 17 while you are at it.
Thanks for your hard work on this!
p.s. You are welcome! Glad to help.
#244