huvrdata / huvr-client

HUVR client
BSD 2-Clause "Simplified" License
5 stars 1 forks source link

use a version on release ( version.py && fix the request header to match ) #30

Open jsheffie opened 2 months ago

jsheffie commented 2 months ago

The following should show a version/release number ( and does not )

$ cd ~/workspace/huvr-integrations/examples/notebook/.venv/lib/python3.12/site-packages/huvr_client 
$ cat __version__.py 
__title__ = "huvr_client"
__description__ = "Python Client for HUVRdata"
__url__ = "https://www.huvrdata.com"
__author__ = "HUVRdata"
__author_email__ = "api@huvrdata.com"
__license__ = "BSD 2.0"
__copyright__ = "Copyright 2023 HUVRdata LLC"

This pip install of the huvr_client installed without a release/version number it was this release: 0.3.7: https://github.com/huvrdata/huvr-client/releases/tag/0.3.7 but did not contain 0.3.7 in the pacakge anywhere.

Reference

Urllib version looks like this

cd ../urllib3 
$ cat _version.py 
# This file is protected via CODEOWNERS
from __future__ import annotations

__version__ = "2.2.2"

dotenv has version like so

$ cd ../dotenv/
$ cat version.py 
__version__ = "1.0.1"

Furthermore ... looks like we shove the version in the header

$ cd ../huvr_client
$ ag 0.3.7
client.py
71:        self.session.headers["User-Agent"] = "huvr_client/0.3.7 python"