Version file for client and isort

pull/457/head
kompotkot 2021-11-24 09:42:59 +00:00
rodzic 42025382e7
commit 45032157dd
5 zmienionych plików z 15 dodań i 7 usunięć

Wyświetl plik

@ -0,0 +1,3 @@
[settings]
profile = black
multi_line_output = 3

Wyświetl plik

@ -0,0 +1,3 @@
[settings]
profile = black
multi_line_output = 3

Wyświetl plik

@ -1,20 +1,18 @@
from dataclasses import dataclass, field
import logging
import os
from dataclasses import dataclass, field
from typing import Any, Dict, List, Optional
import requests
from .version import MOONSTREAM_CLIENT_VERSION
logger = logging.getLogger(__name__)
log_level = logging.INFO
if os.environ.get("DEBUG", "").lower() in ["true", "1"]:
log_level = logging.DEBUG
logger.setLevel(log_level)
# Keep this synchronized with the version in setup.py
CLIENT_VERSION = "0.0.2"
ENDPOINT_PING = "/ping"
ENDPOINT_VERSION = "/version"
ENDPOINT_NOW = "/now"
@ -100,7 +98,7 @@ class Moonstream:
self.timeout = timeout
self._session = requests.Session()
self._session.headers.update(
{"User-Agent": f"Moonstream Python client (version {CLIENT_VERSION})"}
{"User-Agent": f"Moonstream Python client (version {MOONSTREAM_CLIENT_VERSION})"}
)
def ping(self) -> Dict[str, Any]:

Wyświetl plik

@ -0,0 +1 @@
MOONSTREAM_CLIENT_VERSION = "0.0.3"

Wyświetl plik

@ -1,12 +1,14 @@
from setuptools import find_packages, setup
from moonstream.version import MOONSTREAM_CLIENT_VERSION
long_description = ""
with open("README.md") as ifp:
long_description = ifp.read()
setup(
name="moonstream",
version="0.0.2",
version=MOONSTREAM_CLIENT_VERSION,
packages=find_packages(),
package_data={"moonstream": ["py.typed"]},
install_requires=["requests", "dataclasses; python_version=='3.6'"],
@ -14,6 +16,7 @@ setup(
"dev": [
"black",
"mypy",
"isort",
"wheel",
"types-requests",
"types-dataclasses",