influxdata / influxdb-client-python

InfluxDB 2.0 python client
https://influxdb-client.readthedocs.io/en/stable/
MIT License
706 stars 185 forks source link

fix: packaging type info #654

Closed alespour closed 3 months ago

alespour commented 3 months ago

Closes #622

Proposed Changes

This adds PEP 561 distributing and packaging type information, which specifically resolves issue with MyPy error: Skipping analyzing "influxdb_client": module is installed, but missing library stubs or py.typed marker [import-untyped]

The required marker really is just an empty file py.typed. The same fix has been applied in v3 client.

Checklist

codecov-commenter commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 90.42%. Comparing base (08acb17) to head (e2dd513).

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #654 +/- ## ======================================= Coverage 90.42% 90.42% ======================================= Files 39 39 Lines 3510 3510 ======================================= Hits 3174 3174 Misses 336 336 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

max-accenta commented 3 months ago

Hi, for some reason installing the package with the latest version (1.43) from pip does not install the py.typed file. Steps to reproduce:

python -m venv venv
. venv/bin/activate
python -m pip install influxdb_client
ls -l venv/lib/python3.11/site-packages/influxdb_client | grep typed
# Nothing

Installing directly from the repo works though (pip install git+https://github.com/influxdata/influxdb-client-python). Thanks