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

Actually update the dependencies in updated_tests.yml #38

Merged
merged 1 commit into from
Nov 19, 2024

Conversation

hugobuddel
Copy link
Contributor

The goal of the updated tests was to run a project with the latest version of its dependencies, so we would discover breaking changes and/or deprecations early, so we don't "suddenly" have to fix those.

However, we did not actually update the dependencies. This rectifies that.

Note that this still does not actually test any dependency that has a newer 'major' version change.

E.g. see https://github.com/AstarVienna/ScopeSim_Data/actions/runs/11878297751/job/33098809058 , apparently "The 'strip_cdata' option of HTMLParser() has never done anything and will eventually be removed." Now this is something we can just ignore, as we don't directly use that option ourselves.

In fact, I believe this problem has been fixed in beautifulsoup 4.13.0b2, so apparently this change also does not update to beta releases.

@hugobuddel hugobuddel requested a review from teutoburg November 17, 2024 11:23
Copy link

codecov bot commented Nov 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (655de61) to head (f55815b).
Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #38   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         2           
  Lines            7         7           
=========================================
  Hits             7         7           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

Copy link
Contributor

@teutoburg teutoburg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why this poetry lock would change anything here. I thought this is just necessary when there's no lock file around, or when you want to react to a change in the toml file. We do have the lock file in the repos, so poetry install will install from those and then poetry update will change that lock file and install any dependencies that were updated. What am I misunderstanding? Or maybe we should just put the update command here before the poetry install?

@hugobuddel
Copy link
Contributor Author

Hmm yes you are right, this shouldn't matter. But why then did the CI not fail on these strip_cdata DeprecationWarnings?

I doubt this PR would fix that. (That is, would cause the CI to fail.)

Maybe we should revert AstarVienna/ScopeSim#504 (or create experimental branch from before that was merged) and see whether we can get the CI to fail.

@teutoburg
Copy link
Contributor

Maybe we should revert AstarVienna/ScopeSim#504 (or create experimental branch from before that was merged) and see whether we can get the CI to fail.

Yeah, just branch off from before and run the CI on that. Should even work locally by checking out an earlier commit and running poetry update and then poetry run pytest, that should catch it I guess? I can try it later or tomorrow, but feel free to try for yourself 🙂

@hugobuddel
Copy link
Contributor Author

Yeah it works locally. Just not on the CI. But now I see why: these are all webtests that fail (duh, xml parsing), and those are not tested with the updated dependencies.

But the webtests will be tested with updated dependencies once AstarVienna/ScopeSim_Data#20 is merged! (I should just use poetry update there too, although I guess it doesn't make much of a difference.)

I'll close this, thanks for catching my error.

@hugobuddel hugobuddel closed this Nov 17, 2024
@hugobuddel hugobuddel reopened this Nov 19, 2024
@hugobuddel
Copy link
Contributor Author

Reopening this, because poetry update will only update the main dependencies, while poetry lock will update also the dependency groups.

@hugobuddel
Copy link
Contributor Author

I suppose we could also instead do poetry update --with=test, but I'm not sure whether that would also update the dependencies installed with --all-extras, and at this point I don't want to spend any more time investigating poetry.

@teutoburg teutoburg self-requested a review November 19, 2024 13:23
Copy link
Contributor

@teutoburg teutoburg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it works (better) that way, let's just do this. If I ever find time to investigate what would be the proper way to do this with poetry, I can always go back and change it...

@hugobuddel
Copy link
Contributor Author

I created a little test project: https://github.com/hugobuddel/poetrytest

@hugobuddel hugobuddel merged commit 80a9d00 into main Nov 19, 2024
37 checks passed
@hugobuddel hugobuddel deleted the hb/actualy_update_dependencies_in_updated_tests branch November 19, 2024 13:32
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.

2 participants