Skip to content

Commit e211db7

Browse files
adding readme
1 parent 8194c5e commit e211db7

1 file changed

Lines changed: 39 additions & 7 deletions

File tree

README.md

Lines changed: 39 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,54 @@ To check that this is working try importing the package and running a script
2626
.venv/bin/python scripts/example.py
2727
```
2828

29-
## Tesing
29+
## Tesing & Linting
3030

3131
Run tests
3232

3333
```bash
3434
.venv/bin/python -m pip install -e ".[test]"
3535
.venv/bin/pytest -v
36+
37+
.venv/bin/ruff format .
38+
.venv/bin/mypy src
3639
```
3740

38-
## Linting
41+
## Build wheels
3942

40-
Using ruff
43+
Locally you can build the wheels with
4144

4245
```bash
43-
.venv/bin/python -m pip install -e ".[test]"
44-
.venv/bin/ruff format .
46+
./scripts/build_wheel.sh
47+
```
4548

46-
.venv/bin/mypy src
47-
```
49+
If you are in MacOS they will be placed in `dist`. In Linux they will be repaired and placed in `wheelhouse`. In my M4-MacOS the wheel will be
50+
51+
```bash
52+
dist/package_example-0.0.1-cp313-cp313-macosx_26_0_arm64.whl
53+
```
54+
55+
Optionally, the Linux version can be compiled also in MacOS through a Docker container: build and run the docker image first and once in the container run the build
56+
57+
```bash
58+
TASK=build_image ./Docker/build-run.sh
59+
TASK=run_image ./Docker/build-run.sh
60+
./scripts/build_wheel.sh
61+
```
62+
63+
In my system it creates the wheel in `dist`
64+
65+
```bash
66+
dist/package_example-0.0.1-cp313-cp313-linux_aarch64.whl
67+
```
68+
69+
## CI-CD for testing and wheel publishing
70+
71+
The software is tested on GitHub Actions for python versions `3.10-3.13`, architectures `x86` and `arm64` and on `ubuntu`, `macos` and `windows` operating systems. On each push in a branch the actions in `.github/workflows/build-wheels.yml` is kicked off. This action tests and publishes the wheel internally.
72+
73+
To publish the wheels just tag the release, go to master branch and check the version in `__version__` variable of `setup.py`. E.g. for the initial commit the version is `0.0.1`. Then we would run
74+
75+
```bash
76+
VERSION=0.0.1
77+
git tag -a v${VERSION} -m "v${VERSION}"
78+
git push origin v${VERSION}
79+
```

0 commit comments

Comments
 (0)