You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+28-11Lines changed: 28 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,22 +48,27 @@ Improvements to existing functionality are tracked as [GitHub issues using the U
48
48
49
49
### Set up your dev environment
50
50
51
-
#### Using Docker
51
+
#### Using uv
52
52
53
-
The easiest way to get up and running is to use the dockerized development environment which you can launch using:
53
+
The recommended way to get up and running is to use [`uv`](https://github.com/astral-sh/uv) for managing the Python environment:
54
54
55
55
```sh
56
-
make develop
57
-
```
56
+
# Install dependencies including test tools
57
+
uv sync --extra test
58
+
59
+
# Run tests
60
+
uv run pytest
58
61
59
-
Within the `develop` shell, any of the `make` targets that do not require `docker` can be run directly. The shell has the local files mounted, so changes to the files on your host machine will be reflected when commands are run in the `develop` shell.
62
+
# Run formatting
63
+
uv run pre-commit run --all-files
64
+
```
60
65
61
66
#### Locally
62
67
63
68
You can also develop locally using standard python development practices. You'll need to install the dependencies for the unit tests. It is recommended that you do this in a virtual environment such as [`conda`](https://docs.conda.io/en/latest/miniconda.html) or [`pyenv`](https://github.com/pyenv/pyenv) so that you avoid version conflicts in a shared global dependency set.
64
69
65
70
```sh
66
-
pip install -r requirements_test.txt
71
+
pip install -e ".[test]"
67
72
```
68
73
69
74
### Run unit tests
@@ -74,14 +79,19 @@ Running the tests is as simple as:
74
79
make test
75
80
```
76
81
77
-
If you want to use the full set of [`pytest` CLI arguments](https://docs.pytest.org/en/6.2.x/usage.html), you can run the `scripts/run_tests.sh` script directly with any arguments added to the command.
82
+
If you want to use the full set of [`pytest` CLI arguments](https://docs.pytest.org/en/6.2.x/usage.html), you can run the `scripts/run_tests.sh` script directly with any arguments added to the command. For example, to run only a single test without capturing output, you can do:
This project uses [pre-commit](https://pre-commit.com/) to enforce coding style using [black](https://github.com/psf/black). To set up `pre-commit` locally, you can:
90
+
This project uses [pre-commit](https://pre-commit.com/) to enforce coding style using [black](https://github.com/psf/black) and [isort](https://pycqa.github.io/isort/). To set up `pre-commit` locally, you can:
82
91
83
92
```sh
84
93
pip install pre-commit
94
+
pre-commit install
85
95
```
86
96
87
97
Coding style is enforced by the CI tests, so if not installed locally, your PR will fail until formatting has been applied.
@@ -97,7 +107,7 @@ Unsure where to begin contributing? You can start by looking through these issue
97
107
98
108
To contribute to this repo, you'll use the Fork and Pull model common in many open source repositories. For details on this process, watch [how to contribute](https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github).
99
109
100
-
When ready, you can create a pull request. Pull requests are often referred to as "PR". In general, we follow the standard [github pull request](https://help.github.com/en/articles/about-pull-requests) process. Follow the template to provide details about your pull request to the maintainers.
110
+
When ready, you can create a pull request. Pull requests are often referred to as "PR". In general, we follow the standard [github pull request](https://help.github.com/en/articles/about-pull-request) process. Follow the template to provide details about your pull request to the maintainers.
101
111
102
112
Before sending pull requests, make sure your changes pass tests.
103
113
@@ -110,6 +120,13 @@ Once you've [created a pull request](#how-to-contribute), maintainers will revie
110
120
- Write detailed commit messages
111
121
- Break large changes into a logical series of smaller patches, which are easy to understand individually and combine to solve a broader issue
112
122
113
-
<!-- ## Releasing (Maintainers only)
123
+
## Releasing (Maintainers only)
124
+
125
+
The responsibility for releasing new versions of the libraries falls to the maintainers. Releases will follow standard [semantic versioning](https://semver.org/) and be hosted on [pypi](https://pypi.org/project/tls-test-tools/).
126
+
127
+
To create a release:
114
128
115
-
The responsibility for releasing new versions of the libraries falls to the maintainers. Releases will follow standard [semantic versioning](https://semver.org/) and be hosted on [pypi](https://pypi.org/project/jtd-to-proto/). -->
129
+
1. Tag the release: `git tag -a vX.Y.Z -m "Release vX.Y.Z"`
130
+
2. Push the tag: `git push origin vX.Y.Z`
131
+
3. Create a GitHub release for the tag
132
+
4. The CI will automatically build and publish to PyPI
0 commit comments