diff --git a/README.md b/README.md index 530f1bc..b760d18 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,11 @@ ```bash gcloud init ``` - +Get your default credentials in place +```bash +gcloud auth application-default login +``` +Register the python artifact repo as _sbc-connect_ ```bash export SBC_CONNECT_PYTHON_REPO_URL="https://northamerica-northeast1-python.pkg.dev/c4hnrd-tools/python/" poetry config repositories.sbc-connect $SBC_CONNECT_PYTHON_REPO_URL diff --git a/python/gcp-queue/README.md b/python/gcp-queue/README.md index 0517126..9d51008 100644 --- a/python/gcp-queue/README.md +++ b/python/gcp-queue/README.md @@ -11,7 +11,7 @@ GCP Queue Flask Module ## Installing ```bash -export SBC_CONNECT_PYTHON_REPO_URL="https://northamerica-northeast1-python.pkg.dev/c4hnrd-tools/python/" +export SBC_CONNECT_PYTHON_REPO_URL="https://northamerica-northeast1-python.pkg.dev/c4hnrd-tools/python/simple/" poetry config repositories.sbc-connect $SBC_CONNECT_PYTHON_REPO_URL poetry source add --priority=explicit sbc-connect $SBC_CONNECT_PYTHON_REPO_URL poetry add --source sbc-connect gcp-queue @@ -31,7 +31,6 @@ Install the dependencies poetry install ``` -Configure the .env ## How to Contribute diff --git a/python/gcp-queue/poetry.lock b/python/gcp-queue/poetry.lock index 281a70a..bd9148b 100644 --- a/python/gcp-queue/poetry.lock +++ b/python/gcp-queue/poetry.lock @@ -334,6 +334,7 @@ files = [ [package.dependencies] blinker = ">=1.6.2" click = ">=8.1.3" +importlib-metadata = {version = ">=3.6.0", markers = "python_version < \"3.10\""} itsdangerous = ">=2.1.2" Jinja2 = ">=3.1.2" Werkzeug = ">=3.0.0" @@ -582,6 +583,25 @@ files = [ {file = "idna-3.7.tar.gz", hash = "sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc"}, ] +[[package]] +name = "importlib-metadata" +version = "7.1.0" +description = "Read metadata from Python packages" +optional = false +python-versions = ">=3.8" +files = [ + {file = "importlib_metadata-7.1.0-py3-none-any.whl", hash = "sha256:30962b96c0c223483ed6cc7280e7f0199feb01a0e40cfae4d4450fc6fab1f570"}, + {file = "importlib_metadata-7.1.0.tar.gz", hash = "sha256:b78938b926ee8d5f020fc4772d487045805a55ddbad2ecf21c6d60938dc7fcd2"}, +] + +[package.dependencies] +zipp = ">=0.5" + +[package.extras] +docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +perf = ["ipython"] +testing = ["flufl.flake8", "importlib-resources (>=1.3)", "jaraco.test (>=5.4)", "packaging", "pyfakefs", "pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy", "pytest-perf (>=0.9.2)", "pytest-ruff (>=0.2.1)"] + [[package]] name = "iniconfig" version = "2.0.0" @@ -1205,10 +1225,26 @@ files = [ [package.dependencies] flake8-import-order = "*" +importlib-metadata = {version = "*", markers = "python_version < \"3.10\""} pyflakes = "*" tomli = "*" +[[package]] +name = "zipp" +version = "3.18.1" +description = "Backport of pathlib-compatible object wrapper for zip files" +optional = false +python-versions = ">=3.8" +files = [ + {file = "zipp-3.18.1-py3-none-any.whl", hash = "sha256:206f5a15f2af3dbaee80769fb7dc6f249695e940acca08dfb2a4769fe61e538b"}, + {file = "zipp-3.18.1.tar.gz", hash = "sha256:2884ed22e7d8961de1c9a05142eb69a247f120291bc0206a00a7642f09b5b715"}, +] + +[package.extras] +docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-ignore-flaky", "pytest-mypy", "pytest-ruff (>=0.2.1)"] + [metadata] lock-version = "2.0" -python-versions = "^3.10" -content-hash = "c66c8f678da55bc94604d3bc2b69f40bfadc53c359d4ab1c574dee52e77cade7" +python-versions = "^3.9" +content-hash = "e6e6f7907043fd057122efafa4c24bbdb686553307933582bad88ead550ba996" diff --git a/python/gcp-queue/pyproject.toml b/python/gcp-queue/pyproject.toml index 9dc6059..48036e9 100644 --- a/python/gcp-queue/pyproject.toml +++ b/python/gcp-queue/pyproject.toml @@ -1,14 +1,14 @@ [tool.poetry] name = "gcp_queue" -version = "0.2.0" +version = "0.3.0" description = "" authors = ["thorwolpert "] readme = "README.md" packages = [{include = "gcp_queue", from = "src"}] [tool.poetry.dependencies] -python = "^3.10" -flask = "^3.0.2" +python = "^3.9" +flask = ">=1" google-auth = "^2.28.2" google-cloud-pubsub = "^2.20.2" simple-cloudevent = {git = "https://github.com/daxiom/simple-cloudevent.py.git"} diff --git a/python/structured-logging/poetry.lock b/python/structured-logging/poetry.lock index b265f8a..2cb5c79 100644 --- a/python/structured-logging/poetry.lock +++ b/python/structured-logging/poetry.lock @@ -2,13 +2,13 @@ [[package]] name = "blinker" -version = "1.8.1" +version = "1.8.2" description = "Fast, simple object-to-object and broadcast signaling" optional = false python-versions = ">=3.8" files = [ - {file = "blinker-1.8.1-py3-none-any.whl", hash = "sha256:5f1cdeff423b77c31b89de0565cd03e5275a03028f44b2b15f912632a58cced6"}, - {file = "blinker-1.8.1.tar.gz", hash = "sha256:da44ec748222dcd0105ef975eed946da197d5bdf8bafb6aa92f5bc89da63fa25"}, + {file = "blinker-1.8.2-py3-none-any.whl", hash = "sha256:1779309f71bf239144b9399d06ae925637cf6634cf6bd131104184531bf67c01"}, + {file = "blinker-1.8.2.tar.gz", hash = "sha256:8f77b09d3bf7c795e969e9486f39c2c5e9c39d4ee07424be2bc594ece9642d83"}, ] [[package]] @@ -64,6 +64,7 @@ files = [ [package.dependencies] blinker = ">=1.6.2" click = ">=8.1.3" +importlib-metadata = {version = ">=3.6.0", markers = "python_version < \"3.10\""} itsdangerous = ">=2.1.2" Jinja2 = ">=3.1.2" Werkzeug = ">=3.0.0" @@ -72,6 +73,25 @@ Werkzeug = ">=3.0.0" async = ["asgiref (>=3.2)"] dotenv = ["python-dotenv"] +[[package]] +name = "importlib-metadata" +version = "7.1.0" +description = "Read metadata from Python packages" +optional = false +python-versions = ">=3.8" +files = [ + {file = "importlib_metadata-7.1.0-py3-none-any.whl", hash = "sha256:30962b96c0c223483ed6cc7280e7f0199feb01a0e40cfae4d4450fc6fab1f570"}, + {file = "importlib_metadata-7.1.0.tar.gz", hash = "sha256:b78938b926ee8d5f020fc4772d487045805a55ddbad2ecf21c6d60938dc7fcd2"}, +] + +[package.dependencies] +zipp = ">=0.5" + +[package.extras] +docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +perf = ["ipython"] +testing = ["flufl.flake8", "importlib-resources (>=1.3)", "jaraco.test (>=5.4)", "packaging", "pyfakefs", "pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy", "pytest-perf (>=0.9.2)", "pytest-ruff (>=0.2.1)"] + [[package]] name = "iniconfig" version = "2.0.0" @@ -273,7 +293,22 @@ MarkupSafe = ">=2.1.1" [package.extras] watchdog = ["watchdog (>=2.3)"] +[[package]] +name = "zipp" +version = "3.18.1" +description = "Backport of pathlib-compatible object wrapper for zip files" +optional = false +python-versions = ">=3.8" +files = [ + {file = "zipp-3.18.1-py3-none-any.whl", hash = "sha256:206f5a15f2af3dbaee80769fb7dc6f249695e940acca08dfb2a4769fe61e538b"}, + {file = "zipp-3.18.1.tar.gz", hash = "sha256:2884ed22e7d8961de1c9a05142eb69a247f120291bc0206a00a7642f09b5b715"}, +] + +[package.extras] +docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-ignore-flaky", "pytest-mypy", "pytest-ruff (>=0.2.1)"] + [metadata] lock-version = "2.0" -python-versions = "^3.10" -content-hash = "b3f5913fb8bd3f252fc100f7ccc1c372f7750e3ceaf5a7f93bee86af694bec00" +python-versions = "^3.9" +content-hash = "186b8306a0db3b4bed606a93ca59630c664af8ac6dfa6c623b005b3d0aa5bcb4" diff --git a/python/structured-logging/pyproject.toml b/python/structured-logging/pyproject.toml index 4be70d3..c4b9409 100644 --- a/python/structured-logging/pyproject.toml +++ b/python/structured-logging/pyproject.toml @@ -1,15 +1,15 @@ [tool.poetry] name = "structured-logging" -version = "0.3.0" +version = "0.4.0" description = "" authors = ["thorwolpert "] readme = "README.md" packages = [{include = "structured_logging", from = "src"}] [tool.poetry.dependencies] -python = "^3.10" +python = "^3.9" structlog = "^24.1.0" -flask = ">= 2" +flask = ">= 1" [tool.poetry.group.dev.dependencies] pytest = "^8.2.0" diff --git a/python/structured-logging/tests/unit/test_structured_logging.py b/python/structured-logging/tests/unit/test_structured_logging.py index db1b522..30b3787 100644 --- a/python/structured-logging/tests/unit/test_structured_logging.py +++ b/python/structured-logging/tests/unit/test_structured_logging.py @@ -64,7 +64,7 @@ def test_flask_no_init_logger(capsys): json_out = json.loads(captured.out) assert isinstance(json_out, dict) assert json_out['severity'] == 'warning' - assert json_out['message'] == msg + assert json_out['message'] == msg check_logger = app.config.get(StructuredLogging.MODULE_NAME) assert not check_logger