@@ -38,136 +38,72 @@ prior to submitting a pull request.
38
38
39
39
---
40
40
41
- # Local developer installation
42
-
43
- The following steps outline how to install this repo for local development.
41
+ # Developer installation
44
42
45
43
## Prerequisites
46
44
47
- ### Clone repo
48
-
49
- ``` console
50
- git clone https://github.com/[ORG NAME]/[REPO NAME]
51
-
52
- cd [REPO NAME]
53
- ```
45
+ - [ ** uv** ] >= 0.6.3
54
46
55
- ### Virtual Environment
47
+ [ Installation options can be found here. ] ( https://docs.astral.sh/uv/getting-started/installation/ )
56
48
57
- Use a ([ ` venv ` ] ( https://docs.python.org/3/library/venv.html ) ), or equivalent,
58
- when working with python projects. Leveraging a ` venv ` will ensure the installed
59
- dependency files will not impact other python projects or any system
60
- dependencies.
49
+ Or just use [ pipx] ( https://pypi.org/project/pipx/ )
61
50
62
- ** Windows users** : Depending on your python install you will use ` py ` in place
63
- of ` python ` to create the ` venv ` .
64
-
65
- ** Linux/Mac users** : Replace ` python ` , if needed, with the appropriate call to
66
- the desired version while creating the ` venv ` . (e.g. ` python3 ` or ` python3.12 ` )
67
-
68
- ** All users** : Once inside an active ` venv ` all systems should allow the use of
69
- ` python ` for command line instructions. This will ensure you are using the
70
- ` venv ` 's python and not the system level python.
71
-
72
- ### Create the ` venv ` :
73
-
74
- ``` console
75
- python -m venv .venv
51
+ ``` bash
52
+ pipx install uv
76
53
```
77
54
78
- Activate the ` venv ` :
79
55
80
- ``` console
81
- # Linux/Mac
82
- . .venv/bin/activate
83
-
84
- # Windows
85
- .venv\Scripts\activate
86
- ```
87
-
88
- The command prompt should now have a ` (venv) ` prefix on it. ` python ` will now
89
- call the version of the interpreter used to create the ` venv `
90
-
91
- To deactivate (exit) the ` venv ` :
56
+ ### Clone repo
92
57
93
- ``` console
94
- deactivate
58
+ ``` bash
59
+ git clone https://github.com/[ORG NAME]/[REPO NAME]
95
60
```
96
61
97
62
---
98
63
99
- ## Developer Installation Steps
64
+ ## Developer Installation Commands
100
65
101
- ### Install editable library and development requirements
66
+ ### 1. Install editable library and development requirements
102
67
103
- ``` console
104
- python -m pip install --editable .[dev,test]
68
+ ``` bash
69
+ uv sync
105
70
```
106
71
107
- ### Install pre-commit [ (see below for details)] ( #pre-commit )
72
+ ### 2. Install pre-commit [ (see below for details)] ( #pre-commit )
108
73
109
- ``` console
74
+ ``` bash
110
75
pre-commit install
111
76
```
112
77
113
- ### Install with nox
114
-
115
- If you have ` nox ` installed with ` pipx ` or in the current venv you can use the
116
- following session. This is an alternative to the two steps above.
117
-
118
- ``` console
119
- nox -s install
120
- ```
121
-
122
78
---
123
79
124
- ## Pre-commit and nox tools
125
-
126
- ### Run pre-commit on all files
80
+ ## Nox sessions
127
81
128
- ``` console
129
- pre-commit run --all-files
130
- ```
82
+ This repo uses [ nox] ( https://nox.thea.codes/en/stable/index.html ) to simplify
83
+ workflow actions.
131
84
132
- ### Run tests with coverage (quick)
85
+ ### Run tests and report coverage (quick):
133
86
134
- ``` console
135
- nox -e coverage
87
+ ``` bash
88
+ nox --session coverage
136
89
```
137
90
138
- ### Run tests (slow)
91
+ ### Run tests against all supported versions (slow):
139
92
140
- ``` console
93
+ ``` bash
141
94
nox
142
95
```
143
96
144
- ### Build dist
145
-
146
- ``` console
147
- nox -e build
148
- ```
149
-
150
- ---
151
-
152
- ## Updating dependencies
153
-
154
- New dependencys can be added to the ` requirements-*.in ` file. It is recommended
155
- to only use pins when specific versions or upgrades beyond a certain version are
156
- to be avoided. Otherwise, allow ` pip-compile ` to manage the pins in the
157
- generated ` requirements-*.txt ` files.
158
-
159
- Once updated following the steps below, the package can be installed if needed.
160
-
161
- ### Update the generated files with changes
97
+ ### Run pre-commit on all files
162
98
163
99
``` console
164
- nox -e update
100
+ nox --session pre_commit
165
101
```
166
102
167
- ### Upgrade all generated dependencies
103
+ ### Build dist
168
104
169
105
``` console
170
- nox -e upgrade
106
+ nox --session build
171
107
```
172
108
173
109
---
@@ -178,9 +114,3 @@ nox -e upgrade
178
114
179
115
This repo is setup with a ` .pre-commit-config.yaml ` with the expectation that
180
116
any code submitted for review already passes all selected pre-commit checks.
181
-
182
- ---
183
-
184
- ## Error: File "setup.py" not found
185
-
186
- Update ` pip ` to at least version 22.3.1
0 commit comments