Skip to content

Use pinned dependencies for testing #96

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 8 commits into from
Mar 7, 2025
Merged

Use pinned dependencies for testing #96

merged 8 commits into from
Mar 7, 2025

Conversation

rwb27
Copy link
Collaborator

@rwb27 rwb27 commented Mar 7, 2025

I was using pip install -e .[dev,server] to set up the Python environment in CI. This means that, if ruff or mypy (or indeed anything else) updates, it might cause the CI to fail. This then means fixes end up in random PRs, because otherwise the CI fails for those PRs. I am now using pinned dependencies as per usual best practice.

I've duplicated the tests rather than just pinning them: tests will run once with pinned deps, and once without. Testing without pinned dependencies helps spot issues people might run into if they just pip install the package, as most users would do. In the future, this should probably use the exact commands in the quickstart section.

This PR also updates the upload-artifact CI step to use v4, as v3 is now no longer supported.

I've also deleted requirements.txt as it wasn't being used.

rwb27 added 2 commits March 7, 2025 22:35
I've now duplicated the tests: they will run once with pinned deps, and once without.
My intention is to make it easy to spot failures due to updates in dependencies, while
also making it possible to separate out fixes due to
updates in dependencies (often changes in mypy or ruff) from the content of
particular MRs.

I've also deleted requirements.txt as it wasn't being used.
@rwb27 rwb27 force-pushed the ci-improvements branch from d00beaf to 1317dcc Compare March 7, 2025 22:43
I'm removing Python 3.9 from the tests as it's now really quite old.
@rwb27 rwb27 force-pushed the ci-improvements branch from 00c51b8 to d6ad41a Compare March 7, 2025 22:47
rwb27 added 2 commits March 7, 2025 23:00
I think this is due to a ruff update. This PR should make
these sort of changes easier to separate out.
Currently, only editable installs can validate Thing Descriptions. This should be fixed and is raised as #97
@rwb27 rwb27 force-pushed the ci-improvements branch from a91eddb to 77b3ad5 Compare March 7, 2025 23:13
rwb27 added 2 commits March 7, 2025 23:15
This has appeared as a result of changes to either mypy or numpy.
These types are a bit ugly, but do work as needed.
Improvement in the future would be very nice.
@rwb27 rwb27 force-pushed the ci-improvements branch from 77b3ad5 to 0bc2b58 Compare March 7, 2025 23:16
Copy link

barecheck bot commented Mar 7, 2025

Barecheck - Code coverage report

Total: 81.55%

Your code coverage diff: 0.00% ▴

✅ All code changes are covered

@rwb27 rwb27 merged commit 6c176c1 into main Mar 7, 2025
13 checks passed
@rwb27 rwb27 deleted the ci-improvements branch March 7, 2025 23:33
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.

1 participant