@@ -7,12 +7,15 @@ Python as a network service.
7
7
```
8
8
.
9
9
├── 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
11
12
├── src/func_python
12
- │ ├── http.py - HTTP Middleware
13
+ │ ├── http.py - HTTP Middleware
14
+ │ ├── cloudevents.py - CloudEvent Middleware
13
15
├── 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
16
19
```
17
20
18
21
## Development
@@ -25,7 +28,7 @@ Run suite:
25
28
To enable more granular log levels:
26
29
` poetry run pytest --log-cli-level=INFO `
27
30
28
- ## Example Main
31
+ ## Example Commands
29
32
30
33
Minimal example of running the test command, which shows how this
31
34
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
63
66
64
67
8 . (optional) pull into local fork's main and push to remote fork main.
65
68
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
+
66
95
## Releasing
67
96
68
97
NOTE: This process is currently undergoing minor tweaks, and thus contains
@@ -99,31 +128,6 @@ automated.
99
128
100
129
10 . Update the GitHub release's notes to be the changelog section's contents .
101
130
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
-
127
131
128
132
### Potential improvements
129
133
0 commit comments