Skip to content

Commit 7142fba

Browse files
committed
github/copilot: Cleanups
Signed-off-by: Ryan Northey <[email protected]>
1 parent 42272b2 commit 7142fba

File tree

3 files changed

+30
-9
lines changed

3 files changed

+30
-9
lines changed

.github/copilot-instructions.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ This repository uses **two build systems**:
1818

1919
Pants is used for Python package development, testing, and linting.
2020

21+
**IMPORTANT:** DO NOT run ./get-pants.sh or try to install pants it should be available to you already
22+
You can run `pants` directly.
23+
2124
#### Running Pants Commands
2225

2326
```bash

.github/workflows/copilot-setup-steps.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,5 @@ jobs:
9191
- name: Pants
9292
run: |
9393
./get-pants.sh
94-
echo "PATH=~/.local/bin/:${PATH}"
9594
echo "PANTS_CA_CERTS_PATH=/etc/ssl/certs/ca-certificates.crt" >> $GITHUB_ENV
96-
9795
pants --version

DEVELOPER.md

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,26 @@ This allows tasks to be orchestrated efficiently, both for IO-bound tasks, or wh
3333

3434
The code also has a high level of coverage with unit tests and makes extensive use of type-hinting and checking.
3535

36+
## Install `pants`
37+
38+
```console
39+
$ ./get-pants.sh
40+
```
41+
42+
Add the pants bin to `PATH`:
43+
44+
```console
45+
$ export PATH=~/.local/bin:$PATH
46+
```
47+
48+
Run `pants`
49+
50+
```console
51+
$ pants --version
52+
```
53+
54+
You may wish to ensure `~/.local/bin` is always on your path to use pants immediately.
55+
3656
## Testing and linting with `pants`
3757

3858
The repo makes use of [pants](https://www.pantsbuild.org/) to manage the packages.
@@ -44,14 +64,14 @@ A basic introduction to the key tasks is given here, but you are encouraged to v
4464
To run all code tests, as tested in CI:
4565

4666
```shell
47-
$ ./pants test ::
67+
$ pants test ::
4868

4969
```
5070

5171
You can also test in an individual package, eg:
5272

5373
```shell
54-
$ ./pants test envoy.dependency.check::
74+
$ pants test envoy.dependency.check::
5575

5676
```
5777

@@ -60,14 +80,14 @@ $ ./pants test envoy.dependency.check::
6080
You can see the current coverage for all tests with:
6181

6282
```shell
63-
$ ./pants test --open-coverage ::
83+
$ pants test --open-coverage ::
6484

6585
```
6686

6787
Similarly you can see the coverage for a specific package:
6888

6989
```shell
70-
$ ./pants test --open-coverage envoy.dependency.check::
90+
$ pants test --open-coverage envoy.dependency.check::
7191

7292
```
7393

@@ -81,7 +101,7 @@ allows you to make use of `pdb` to introspect variables and step through and ove
81101
Assuming relevant `breakpoint`s have been added, you might debug while testing:
82102

83103
```shell
84-
$ ./pants test --debug envoy.dependency.check::
104+
$ pants test --debug envoy.dependency.check::
85105

86106
```
87107

@@ -93,7 +113,7 @@ For example, the following would run debug testing for tests containing `checker
93113

94114
```console
95115

96-
$ ./pants test --debug envoy.dependency.check:: -- -k checker_cves
116+
$ pants test --debug envoy.dependency.check:: -- -k checker_cves
97117

98118
```
99119

@@ -107,7 +127,7 @@ The repo is linted with `flake8` and the default config.
107127
To lint the entire repo:
108128

109129
```shell
110-
$ ./pants lint ::
130+
$ pants lint ::
111131

112132
```
113133

0 commit comments

Comments
 (0)