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

Add scheduled workflow to run tests with unpinned dependencies #1310

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

matt-graham
Copy link
Collaborator

@matt-graham matt-graham commented Apr 8, 2024

Fixes #1161

Adds a new workflow plus associated tox environment to run tests with unpinned dependencies on latest stable Python version once a week (Satuday at midnight). This currently is set up to run on GitHub hosted runners to allow testing across multiple operating systems and uses pytest-xdist plug-in to parallelise across available cores on the runner, rather than creating a matrix to parallelise across test files as in the main tests workflow. It is not clear if the full tests will complete in the 6 hours maximum GitHub Actions job time on GitHub hosted runners (may do though given Ubuntu runners now have 4 cores by default and I think the MacOS runners have 3 cores).

Questions:

  • Do we want to test against a specific Python version (3.11?) rather than or in addition to latest stable Python version?
  • Is once a week the appropriate frequency? Possibly once a month would suffice?
  • Should this be done on self-hosted runners instead?

.github/workflows/tests-unpinned.yml Outdated Show resolved Hide resolved
tox.ini Show resolved Hide resolved
@tamuri
Copy link
Collaborator

tamuri commented May 9, 2024

Do we want to test against a specific Python version (3.11?) rather than or in addition to latest stable Python version?

This workflow should be our canary in the coal mine - latest stable Python & packages. To that end, we state pandas~=2.0.0 in the pyproject. Can we ignore that too?

Is once a week the appropriate frequency? Possibly once a month would suffice?

Once a month is probably okay. Don't want to get too distracted.

Should this be done on self-hosted runners instead?

We'd only be targetting Linux in that case. I do like the the extensive coverage we get if we use GH runners.

@matt-graham
Copy link
Collaborator Author

This workflow should be our canary in the coal mine - latest stable Python & packages. To that end, we state pandas~=2.0.0 in the pyproject. Can we ignore that too?

Agree it would be worth testing against unpinned pandas versions as this is probably most likely dependency we'll get breaking changes in. We could remove the version specified for pandas from dependencies in pyproject.toml altogether or relax ~=2.0.0 to >=2, ~=2.0 or similar. While this would then mean the new workflow here tests against latest stable pandas version, it would also mean that it becomes more of a pain to update the requirements files with pip-compile, as without the version specifier pip-compile would also I think resolve to the latest stable pandas version at the time run, and currently the tlo package will not work with pandas v2.1 or newer I believe. It looks like this would be relatively easy to workaround by using the --upgrade--packages argument to pip-compile to specify a constraint on the pandas versions though. Altermatively we could install the dependencies manually in the new tox environment, and force it to not ignore / not install package dependencies by updating the install_command option with --no-deps but this feels a bit hacky and requires us to keep the base requirements in two different places.

Once a month is probably okay. Don't want to get too distracted.

Will update.

We'd only be targetting Linux in that case. I do like the the extensive coverage we get if we use GH runners.

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add scheduled workflow job running tests on latest stable versions of dependencies
3 participants