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

chore: reenable ops.main type hints #298

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dimaqq
Copy link

@dimaqq dimaqq commented Sep 4, 2024

Type hints are finally fixed for ops.main() call in the upcoming ops release.

The mypy config includes warn_unused_ignores in this repo, which means that using new ops will trigger an error soon.

P.S. can only be merged when ops 2.17.0 is released.

@dimaqq
Copy link
Author

dimaqq commented Sep 4, 2024

P.S. can be tested locally with:

diff --git a/requirements.txt b/requirements.txt
index 0eeaba6..c8a95c5 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,6 +1,6 @@
 cosl
 distro
-ops >= 2.17.0
+git+https://github.com/canonical/operator.git@main#egg=ops
 jinja2
 redfish  # requests is included in this
 pydantic < 2

@rgildein
Copy link
Contributor

rgildein commented Sep 4, 2024

Hi @dimaqq I converted this PR to draft until 2.17 is not released, then we can convert it back and re-trigger CI.
Thanks for contribution!

@samuelallan72 samuelallan72 marked this pull request as ready for review October 2, 2024 01:41
@samuelallan72
Copy link
Contributor

ops 2.17.0 is released, so I retriggered the CI and marked the PR as ready for review :)

Pjack
Pjack previously approved these changes Oct 4, 2024
@gabrielcocenza
Copy link
Member

Can't we unpin the ops library?

samuelallan72
samuelallan72 previously approved these changes Oct 7, 2024
@samuelallan72
Copy link
Contributor

@dimaqq sorry, the CI is blocked on commits needing to be signed - could you gpg sign your commits (you can squash and force push to make it easier)?

@dimaqq dimaqq dismissed stale reviews from Pjack and samuelallan72 via 9a137e0 November 11, 2024 04:24
@dimaqq dimaqq force-pushed the chore-reenable-type-hints-on-ops-main branch from 58700d3 to 9a137e0 Compare November 11, 2024 04:24
@dimaqq
Copy link
Author

dimaqq commented Nov 11, 2024

Sorry I forgot to force-push earlier, here it is.

@dimaqq dimaqq force-pushed the chore-reenable-type-hints-on-ops-main branch 2 times, most recently from bb6feab to ef0a904 Compare November 11, 2024 04:36
@dimaqq
Copy link
Author

dimaqq commented Nov 11, 2024

re the other CI fail, I'll be releasing a hotfix for pypi:juju today 🙇🏻

@dimaqq dimaqq force-pushed the chore-reenable-type-hints-on-ops-main branch from ef0a904 to 9d33835 Compare November 11, 2024 05:20
@dimaqq
Copy link
Author

dimaqq commented Nov 15, 2024

The test fail is a mystery to me now.

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.

5 participants