Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename the http folder to a better name, than python #24

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/fhttp/main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import argparse
import logging
from func_python.http import serve
from func_http.http import serve
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking now at this I see that func_http.http is a bit unfortunate as well 😅


# Set the default logging level to INFO
logging.basicConfig(level=logging.INFO)
Expand Down
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
name = "func-python"
version = "0.2.0"
description = "Knative Functions Python Middleware"
packages = [
{ include = "func_http", from = "src" },
]

Comment on lines +5 to +8
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason the folder is named func_python is such that it matches the package name as published on PyPI func-python. Hence the reason there's no need for an explicit packages section in the pyproject.toml

authors = ["Luke Kingland <[email protected]>"]
readme = "README.md"
license = "Apache-2.0"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/test_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import signal
import threading
import time
from func_python.http import serve
from func_http.http import serve
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With an http.py and a cloudevents.py file in the func_python directory, the two imports would be:
from func_python.http import serve for HTTP middleware and
from func_python.cloudevents import serve for CloudEVent middleware
That seems correct to me


logging.basicConfig(level=logging.INFO)

Expand Down
Loading