Skip to content

Commit de2f656

Browse files
authored
improve contributing guide (#775)
1 parent 066d5de commit de2f656

1 file changed

Lines changed: 33 additions & 8 deletions

File tree

CONTRIBUTING.md

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,46 @@ pip install -e '.[test]'
3232

3333
With your venv setup and active, as described previously, running rsconnect-python using your codebase is as simple as running the `rsconnect` command from the terminal.
3434

35-
Typical makefile targets are:
35+
### Linting
3636

3737
```bash
38-
# verify code formats are correct
39-
make fmt
40-
# lint the codebase
4138
make lint
42-
# run the tests (w/ python 3.8)
39+
```
40+
41+
This runs black (formatting check), flake8, and pyright.
42+
43+
> **NOTE**: pyright currently has known errors that are suppressed in the Makefile (see [#774](https://github.com/posit-dev/rsconnect-python/issues/774)). Until those are resolved, you can run just the enforced checks directly:
44+
>
45+
> ```bash
46+
> black --check --diff rsconnect/
47+
> flake8 rsconnect/
48+
> flake8 tests/
49+
> ```
50+
51+
To auto-format code:
52+
53+
```bash
54+
make fmt
55+
```
56+
57+
### Testing
58+
59+
```bash
60+
# run the tests
4361
make test
44-
# run the tests with all versions of python
62+
63+
# run tests with a specific Python version
64+
make test-3.12
65+
66+
# run tests across all supported Python versions
4567
make all-tests
4668
```
4769

48-
As another example, the [`test` job in the default GitHub Actions workflow](.github/workflows/main.yml)
49-
uses some of these targets during the CI for building and testing.
70+
The test suite includes integration tests that require a running Posit Connect server. These tests are skipped automatically unless the `CONNECT_SERVER` and `CONNECT_API_KEY` environment variables are set. If you have these variables in your environment from other work and see unexpected test failures, unset them:
71+
72+
```bash
73+
unset CONNECT_SERVER CONNECT_API_KEY
74+
```
5075

5176
## Proposing Change
5277

0 commit comments

Comments
 (0)