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

Fix stestr and mypy issues #559

Merged
merged 3 commits into from
Sep 19, 2023
Merged

Conversation

t-imamichi
Copy link
Collaborator

@t-imamichi t-imamichi commented Sep 18, 2023

Summary

Fix "stestr run" error by pinning python-subunit version.
Update stestr version that has been just released.
https://github.com/mtreinish/stestr/releases/tag/4.1.0

Fix mypy by modifying colormap access.

I found these errors in the recent scheduled CI.
https://github.com/qiskit-community/qiskit-optimization/actions/runs/6217275395

Details and comments

@t-imamichi t-imamichi changed the title (WIP) Fix stestr (pin python-subunit) Fix stestr and mypy issues Sep 18, 2023
@t-imamichi t-imamichi marked this pull request as ready for review September 18, 2023 10:01
@@ -3,7 +3,7 @@ matplotlib>=2.1
black[jupyter]~=22.0
pylint>=2.16.2
pylatexenc>=1.4
stestr>=2.0.0
stestr>=4.1.0
Copy link
Member

Choose a reason for hiding this comment

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

I guess this is fine - the constraint change that Qiskit did was simply closed. CI pulls in the latest version anyway even with >=2.0.0, but if you had some local older stestr install working this requires things to be updated if you pip install this dev file. Qiskit left their requirements-dev as it was before. I guess if you had things working locally and somehow just updated python-subunit then it would faili if you did not have anything installed then as of now, like CI, it would install 4.1.0 and work.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, I updated the version because someone may update only python-subunit and have the stestr trouble.

Copy link
Member

@woodsp-ibm woodsp-ibm left a comment

Choose a reason for hiding this comment

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

I put a comment in there - I think its ok like this but I'll leave it to you.

@mergify mergify bot merged commit e4804af into qiskit-community:main Sep 19, 2023
@t-imamichi t-imamichi deleted the fix-stestr branch September 19, 2023 04:42
@woodsp-ibm
Copy link
Member

@t-imamichi I was looking through the combined deprecation messages from the build, as this was the latest. I noticed this which seems related to what you fixed here but elsewhere

/home/runner/work/qiskit-optimization/qiskit-optimization/qiskit_optimization/applications/bin_packing.py:121: MatplotlibDeprecationWarning: The get_cmap function was deprecated in Matplotlib 3.7 and will be removed two minor releases later. Use matplotlib.colormaps[name] or matplotlib.colormaps.get_cmap(obj) instead.

@t-imamichi
Copy link
Collaborator Author

Thanks for the report. I found a line that uses get_cmap. I will fix it.

colors = plt.cm.get_cmap("jet", len(self._weights))

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