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

ci: 👷 update numpy dependency to a simplified version constraint #1671

Merged
merged 1 commit into from
Nov 18, 2024

Conversation

onuralpszr
Copy link
Collaborator

Description

Please include a summary of the change and which issue is fixed or implemented. Please also include relevant motivation and context (e.g. links, docs, tickets etc.).

List any dependencies that are required for this change.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How has this change been tested, please provide a testcase or example of how you tested the change?

YOUR_ANSWER

Any specific deployment considerations

For example, documentation changes, usability, usage/costs, secrets, etc.

Docs

  • Docs updated? What were the changes:

@onuralpszr onuralpszr force-pushed the refactor/numpy/pyproject_toml branch from b09b35a to 40e3f23 Compare November 15, 2024 13:35
pyproject.toml Outdated Show resolved Hide resolved
@onuralpszr onuralpszr force-pushed the refactor/numpy/pyproject_toml branch 2 times, most recently from 01c6c36 to de3a607 Compare November 16, 2024 10:06
@onuralpszr
Copy link
Collaborator Author

@LinasKo this change for helping inference to bump supervision version to latest and based on feedback I got @PawelPeczek-Roboflow asked me to relax numpy version for py38 and py39 and with this change it can install higher version than previously.

Side note : I also remove pandas-stubs from metrics and based on tests all fine I am moving stubs under other typing package for mypy.

@LinasKo
Copy link
Contributor

LinasKo commented Nov 18, 2024

  1. If we're removing stubbs, we can remove the line entirely, rather than commenting it out.
  2. What do you mean by a separate package for types? supervision-stubs, that we'd publish to PyPi?
  3. To continue using pandas after calling metric_result.as_pandas(), you'd likely need to import pandas as pd. That line prompts installing stubbs. Would it not be more clear to the user if we installed it together with pandas? Or is that not a problem you see / not the ideal solution?

@onuralpszr
Copy link
Collaborator Author

  1. If we're removing stubbs, we can remove the line entirely, rather than commenting it out.
  2. What do you mean by a separate package for types? supervision-stubs, that we'd publish to PyPi?
  3. To continue using pandas after calling metric_result.as_pandas(), you'd likely need to import pandas as pd. That line prompts installing stubbs. Would it not be more clear to the user if we installed it together with pandas? Or is that not a problem you see / not the ideal solution?

1 - ) I can remove entirely for sure +1
2 - ) I mean we can move other typing mypy packages for "dev" we don't publish to pypi at all
3 - ) Pandas itself enough to have it. Mypy stub package not needed. (I tested metrics and didn't see any requirement or error at all for pandas-stubs, We only need "pandas". Stubs for "mypy" only)

@onuralpszr onuralpszr force-pushed the refactor/numpy/pyproject_toml branch from de3a607 to 1f42a8f Compare November 18, 2024 13:27
@onuralpszr onuralpszr marked this pull request as ready for review November 18, 2024 13:37
@onuralpszr onuralpszr self-assigned this Nov 18, 2024
@LinasKo
Copy link
Contributor

LinasKo commented Nov 18, 2024

  1. Okay. I've checked it, and the messages I see are mypy-specific. Sure - let's remove it for now. If we go the mypy route, we should offer something equivalent or offer stubs of our own, that also install pandas stubs.

I say this because as a user of mypy, having just installed supervision[metrics] to use pandas, seeing that I need to install more things is annoying.

image

pyproject.toml Outdated Show resolved Hide resolved
@onuralpszr onuralpszr force-pushed the refactor/numpy/pyproject_toml branch from 1f42a8f to 89769e4 Compare November 18, 2024 16:34
@onuralpszr onuralpszr merged commit aec0bc3 into develop Nov 18, 2024
46 checks passed
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