From 55eaf568a953fb59a732dd6a16edb8b435eaf51b Mon Sep 17 00:00:00 2001 From: Brant Watson Date: Sun, 10 Nov 2024 14:53:42 -0600 Subject: [PATCH] Remove dependency on WTForms and fix a misleading docstring --- common/auth/keys/lib.py | 2 +- pyproject.toml | 47 ++++++++++++++++------------------------- 2 files changed, 19 insertions(+), 30 deletions(-) diff --git a/common/auth/keys/lib.py b/common/auth/keys/lib.py index 88ab97c..80d9c80 100644 --- a/common/auth/keys/lib.py +++ b/common/auth/keys/lib.py @@ -94,7 +94,7 @@ def extract_key(value: str) -> AuthenticationKeyParts: Given an authenticaton key, extract the key id and passphrase. An authentication key is always 2 components of identical length. A UUID representing the primary key for the API - key, and the actual passphrase which is also a UUID. + key, and the actual passphrase which is a string of random characters. """ key_bytes: bytes = b64decode(value) key_text = key_bytes.decode("utf-8") diff --git a/pyproject.toml b/pyproject.toml index c552140..c8b174d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,9 +1,5 @@ [build-system] -requires = [ - "setuptools ~= 65.3", - "wheel", - "build" -] +requires = ["setuptools ~= 65.3", "wheel", "build"] build-backend = "setuptools.build_meta" [project] @@ -11,8 +7,7 @@ name = "Observability" version = "2.0.0" description = "DataOops Observability" urls = { "homepage" = "https://datakitchen.io" } -authors = [ -] +authors = [] license = { "file" = "LICENSE" } readme = "README.md" classifiers = [ @@ -45,7 +40,6 @@ dependencies = [ "requests_extensions~=1.1.3", "tomli==2.0.1", "Werkzeug==2.2.3", - "WTForms==3.0.1", "yoyo-migrations~=8.2.0", ] @@ -66,12 +60,7 @@ dev = [ "types-requests==2.28.11.15", "types-setuptools==65.3.0", ] -build = [ - "build", - "setuptools~=65.3", - "wheel", - "trove-classifiers", -] +build = ["build", "setuptools~=65.3", "wheel", "trove-classifiers"] [project.entry-points.console_scripts] cli = "cli.__main__:main" @@ -91,18 +80,18 @@ include-package-data = true # see the important note for why we glob. TL;DR: Otherwise you don't get submodules # https://setuptools.pypa.io/en/latest/userguide/package_discovery.html#finding-simple-packages include = [ - "agent_api*", - "observability_api*", - "common*", - "conf*", - "event_api*", - "cli*", - "rules_engine*", - "run_manager*", - "scheduler*", - "subcommand*", + "agent_api*", + "observability_api*", + "common*", + "conf*", + "event_api*", + "cli*", + "rules_engine*", + "run_manager*", + "scheduler*", + "subcommand*", ] -exclude = [ "*.tests", "tests*", "deploy*", "scripts*", "testlib*"] +exclude = ["*.tests", "tests*", "deploy*", "scripts*", "testlib*"] [tool.pytest.ini_options] minversion = "7.0" @@ -123,7 +112,7 @@ markers = [ ] filterwarnings = [ # remove when resolved: https://github.com/marshmallow-code/apispec/issues/739 - 'ignore:distutils Version classes are deprecated:DeprecationWarning:apispec' + 'ignore:distutils Version classes are deprecated:DeprecationWarning:apispec', ] # see: https://mypy.readthedocs.io/en/stable/config_file.html#using-a-pyproject-toml-file @@ -289,7 +278,7 @@ exclude = ''' # See: https://coverage.readthedocs.io/en/latest/config.html [tool.coverage.run] -branch=true +branch = true # Every time there is a new top-level module, this will need to be expanded. source = [ "agent_api", @@ -306,7 +295,7 @@ source = [ # We don't need to report the coverage lines on tests omit = ["*/*tests/*"] # This skips __init__.py and other empty files. -skip_empty=true +skip_empty = true [tool.ruff] target-version = "py310" @@ -317,5 +306,5 @@ line-length = 120 [tool.ruff.extend-per-file-ignores] "*/tests/*" = [ - "F811", # Shadow unused imports; pytest fixtures + "F811", # Shadow unused imports; pytest fixtures ]