Skip to content

Commit 9348c87

Browse files
authored
docs: Add a development guide (GoogleCloudPlatform#359)
1 parent c6eab2f commit 9348c87

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

DEVELOPMENT.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Development
2+
3+
Quickstart for functions-framework maintainers.
4+
5+
## Environment setup
6+
7+
Install [tox](https://pypi.org/p/tox), the test runner:
8+
9+
```
10+
$ python -m pip install -U tox
11+
```
12+
13+
## Running linting
14+
15+
Linting can be run with:
16+
17+
```
18+
$ python -m tox -e lint
19+
```
20+
21+
## Running tests
22+
23+
All tests can be run with:
24+
25+
```
26+
$ python -m tox
27+
```
28+
29+
Tests for the current Python version can be run with:
30+
31+
```
32+
$ python -m tox -e py
33+
```
34+
35+
Tests for a specific Python version can be run with:
36+
37+
```
38+
$ python -m tox -e py3.12
39+
```
40+
41+
A specific test file (e.g. `tests/test_cli.py`) can be run with:
42+
43+
```
44+
$ python -m tox -e py -- tests/test_cli.py
45+
```
46+
47+
A specific test in the file (e.g. `test_cli_no_arguements` in `tests/test_cli.py`) can be run with:
48+
49+
```
50+
$ python -m tox -e py -- tests/test_cli.py::test_cli_no_arguments
51+
```
52+
53+
## Releasing
54+
55+
Releases are triggered via the [Release Please](https://github.com/apps/release-please) app, which in turn kicks off the [Release to PyPI](https://github.com/GoogleCloudPlatform/functions-framework-python/blob/main/.github/workflows/release.yml) workflow.

0 commit comments

Comments
 (0)