Skip to content

Commit ad72157

Browse files
committed
Add justfile, update README.md
1 parent f76a6b2 commit ad72157

File tree

2 files changed

+52
-9
lines changed

2 files changed

+52
-9
lines changed

README.md

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,13 @@ This package is maintained by [LabKey](http://www.labkey.com/). If you have any
121121
[LabKey Server developer support forum](https://www.labkey.org/home/developer/forum/project-start.view).
122122

123123
### Setup
124+
We use the Just command runner to simplify setup and development with this package. You'll want to install just to work
125+
on this package. Installation instructions can be found here: https://just.systems/man/en/packages.html
126+
124127
To install the necessary dependencies for local development you can run the following command:
125128

126129
```bash
127-
pip install -e '.[dev]'
130+
just install
128131
```
129132

130133

@@ -135,20 +138,27 @@ When contributing changes please use `Black` to format your code. To run Black y
135138
black .
136139
```
137140

138-
After black has run it may have formatted some files, commit the changed files before opening a PR.
141+
After black has run, it may have formatted some files, commit the changed files before opening a PR.
139142

140143
### Testing
141-
If you are looking to contribute please run the tests before issuing a PR. The tests can be run with:
144+
If you are looking to contribute please run the tests before issuing a PR.
145+
146+
To run only the unit tests, run the following command:
147+
148+
```bash
149+
just test-unit
150+
```
151+
152+
To run the integration tests, make sure you have a live server running, a netrc file, and run the following command:
142153

143154
```bash
144-
$ pytest .
155+
just test-integration
145156
```
146157

147-
The integration tests do not run by default. If you want to run the integration tests make sure you have a live server
148-
running, a netrc file, and run the following command:
158+
To run all tests, run the following command:
149159

150160
```bash
151-
$ pytest . -m "integration"
161+
just test
152162
```
153163

154164
### Maintainers
@@ -158,13 +168,13 @@ releases.
158168
To build the package before releasing you will need to install the build dependencies. This can be done by running:
159169

160170
```bash
161-
pip install -e '.[build]'
171+
just install-build
162172
```
163173

164174
To build the package you can run:
165175

166176
```bash
167-
python -m build
177+
just build
168178
```
169179

170180
You should now have a `dist/` folder with two files:

justfile

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
build:
2+
python -m build
3+
4+
release-test:
5+
hatch publish --repo test
6+
7+
release:
8+
hatch publish
9+
10+
install:
11+
pip install -e '.[dev,tests]'
12+
13+
install-build:
14+
pip install -e '.[build]'
15+
16+
uninstall:
17+
pip uninstall -y labkey
18+
19+
clean:
20+
rm -rf ./dist/
21+
rm -rf ./labkey.egg-info
22+
23+
test-unit:
24+
pytest .
25+
26+
test-integration:
27+
pytest . -m "integration"
28+
29+
test: test-unit test-integration
30+
31+
brt: clean build release-test
32+
33+
br: clean build release

0 commit comments

Comments
 (0)