Skip to content

Commit

Permalink
Merge pull request #8 from thorwolpert/main
Browse files Browse the repository at this point in the history
moving back flask & python versions
  • Loading branch information
thorwolpert authored May 14, 2024
2 parents e3ac8ce + a557ca1 commit bbaee78
Show file tree
Hide file tree
Showing 7 changed files with 91 additions and 17 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions python/gcp-queue/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -31,7 +31,6 @@ Install the dependencies
poetry install
```

Configure the .env

## How to Contribute

Expand Down
40 changes: 38 additions & 2 deletions python/gcp-queue/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions python/gcp-queue/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[tool.poetry]
name = "gcp_queue"
version = "0.2.0"
version = "0.3.0"
description = ""
authors = ["thorwolpert <[email protected]>"]
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"}
Expand Down
45 changes: 40 additions & 5 deletions python/structured-logging/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions python/structured-logging/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[tool.poetry]
name = "structured-logging"
version = "0.3.0"
version = "0.4.0"
description = ""
authors = ["thorwolpert <[email protected]>"]
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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit bbaee78

Please sign in to comment.