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

Update dependencies v0.61 #683

Merged
merged 7 commits into from
Apr 14, 2023
Merged

Update dependencies v0.61 #683

merged 7 commits into from
Apr 14, 2023

Conversation

juhoinkinen
Copy link
Member

@juhoinkinen juhoinkinen commented Mar 16, 2023

This updates some outdated dependencies:

Also pins (at least) minor versions of all non-dev dependencies to the versions currently being installed and removes some unnecessary dependencies (swagger_ui_bundle, codecov).

@juhoinkinen juhoinkinen added this to the 0.61 milestone Mar 16, 2023
@codecov
Copy link

codecov bot commented Mar 16, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.03 🎉

Comparison is base (3a5fc50) 99.57% compared to head (7d2e98d) 99.61%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #683      +/-   ##
==========================================
+ Coverage   99.57%   99.61%   +0.03%     
==========================================
  Files          88       89       +1     
  Lines        6138     6166      +28     
==========================================
+ Hits         6112     6142      +30     
+ Misses         26       24       -2     

see 33 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@juhoinkinen
Copy link
Member Author

juhoinkinen commented Mar 20, 2023

I think swagger_ui_bundle = "*" is nowdays not needed as a direct dependency and could be removed.

The dependency was added in #215 due to a problem discussed in spec-first/connexion#406 (comment), which seems to be fixed now.

Done: Remove unnecessary swagger_ui_bundle dependency

@osma
Copy link
Member

osma commented Mar 21, 2023

Would it make sense to pin major/minor versions, at least for all non-dev dependencies? At least nltk and gunicorn are not pinned currently and this could cause sudden API breakage.

@juhoinkinen
Copy link
Member Author

TensorFlow 2.12.0 has some breaking changes:

tf.keras:

Moved all saving-related utilities to a new namespace, keras.saving, for example: keras.saving.load_model, keras.saving.save_model, keras.saving.custom_object_scope, keras.saving.get_custom_objects, keras.saving.register_keras_serializable,keras.saving.get_registered_name and keras.saving.get_registered_object. The previous API locations (in keras.utils and keras.models) will be available indefinitely, but we recommend you update your code to point to the new API locations.

Annif imports load_model, which could or should be updated:

from tensorflow.keras.models import Model, load_model

And also atomic_save apparently uses the old location.

But now I see there is a conflict in installing the new TF version and numpy:

Because tensorflow-cpu (2.12.0) depends on numpy (>=1.22,<1.24)
 and no versions of tensorflow-cpu match >2.12.0,<2.13.0, tensorflow-cpu (>=2.12.0,<2.13.0) requires numpy (>=1.22,<1.24).
So, because annif depends on both numpy (1.24.*) and tensorflow-cpu (2.12.*), version solving failed.

@juhoinkinen
Copy link
Member Author

Force-pushed to drop upgrading to TensorFlow v2.12.0, which conflicted with Numpy.

@sonarcloud
Copy link

sonarcloud bot commented Apr 14, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Copy link
Member

@osma osma left a comment

Choose a reason for hiding this comment

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

LGTM

@juhoinkinen juhoinkinen marked this pull request as ready for review April 14, 2023 11:53
@juhoinkinen juhoinkinen merged commit 62fa6c2 into main Apr 14, 2023
@juhoinkinen juhoinkinen deleted the update-dependencies-v0.61 branch April 14, 2023 11:54
@juhoinkinen juhoinkinen mentioned this pull request Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants