Skip to content

Commit bbe3c8c

Browse files
authored
Cloudevents (#39)
* fix formatting * update readme * cloudevents middleware * reorg README * remove example
1 parent 3043cc7 commit bbe3c8c

File tree

7 files changed

+599
-34
lines changed

7 files changed

+599
-34
lines changed

Diff for: README.md

+34-30
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,15 @@ Python as a network service.
77
```
88
.
99
├── cmd
10-
│   └── fhttp - Example a Function using the http middleware
10+
│   └── fhttp - Example Function using the http middleware
11+
│   └── fce - Example Function using the CloudEvent middleware
1112
├── src/func_python
12-
│   ├── http.py - HTTP Middleware
13+
│   ├── http.py - HTTP Middleware
14+
│   ├── cloudevents.py - CloudEvent Middleware
1315
├── tests
14-
│   ├── http_test.py - HTTP Middleware tests
15-
└── README.md - This Readme
16+
│   ├── http_test.py - HTTP Middleware tests
17+
│   ├── cloudevent_test.py - CloudEvent tests
18+
└── README.md - This Readme
1619
```
1720

1821
## Development
@@ -25,7 +28,7 @@ Run suite:
2528
To enable more granular log levels:
2629
`poetry run pytest --log-cli-level=INFO`
2730

28-
## Example Main
31+
## Example Commands
2932

3033
Minimal example of running the test command, which shows how this
3134
library is used when integrate with Functions, and can be useful during dev.
@@ -63,6 +66,32 @@ p. From a personal fork, create a new worktree for the bug, feature or chore
6366

6467
8. (optional) pull into local fork's main and push to remote fork main.
6568

69+
## Testing
70+
71+
To run the package level tests
72+
73+
To test if the package published to Test PyPI works, ensure the
74+
project has it added as an explicit source in pyproject.toml:
75+
```
76+
[[tool.poetry.source]]
77+
name = "test-pypi"
78+
url = "https://test.pypi.org/simple/"
79+
priority = "explicit"
80+
```
81+
Then update the dependency to explicitly pull the new version which is only
82+
available on TestPyPI. For example to test a hypothetical unreleased version
83+
0.1.2:
84+
```
85+
[tool.poetry.dependencies]
86+
func_python = {version = "0.1.2", source = "test-pypi"}
87+
```
88+
Run `poetry install` to install the unreleased version from Test PyPI
89+
90+
Note: do not check in this change.
91+
92+
93+
94+
6695
## Releasing
6796

6897
NOTE: This process is currently undergoing minor tweaks, and thus contains
@@ -99,31 +128,6 @@ automated.
99128

100129
10. Update the GitHub release's notes to be the changelog section's contents .
101130

102-
## Testing
103-
104-
To run the package level tests
105-
106-
To test if the package published to Test PyPI works, ensure the
107-
project has it added as an explicit source in pyproject.toml:
108-
```
109-
[[tool.poetry.source]]
110-
name = "test-pypi"
111-
url = "https://test.pypi.org/simple/"
112-
priority = "explicit"
113-
```
114-
Then update the dependency to explicitly pull the new version which is only
115-
available on TestPyPI. For example to test a hypothetical unreleased version
116-
0.1.2:
117-
```
118-
[tool.poetry.dependencies]
119-
func_python = {version = "0.1.2", source = "test-pypi"}
120-
```
121-
Run `poetry install` to install the unreleased version from Test PyPI
122-
123-
Note: do not check in this change.
124-
125-
126-
127131

128132
### Potential improvements
129133

Diff for: poetry.lock

+57-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: pyproject.toml

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ repository = "https://github.com/knative-extensions/func-python"
1010
[tool.poetry.dependencies]
1111
python = "^3.12"
1212
hypercorn = "^0.17.3"
13+
cloudevents = "^1.11.0"
1314

1415
[tool.pytest.ini_options]
1516
pythonpath = ["src"]

0 commit comments

Comments
 (0)