Skip to content

Commit

Permalink
Tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
joshlk committed Oct 3, 2024
1 parent a542835 commit 713c029
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 23 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# Check for latest setpup: https://github.com/pypa/cibuildwheel/blob/main/examples/github-with-qemu.yml
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
python: [cp310, cp311, cp312] # As of 3/Oct/24 ortools was not compatible with cp313
include:
Expand All @@ -41,10 +42,10 @@ jobs:
steps:
- name: Set up QEMU
if: matrix.arch == 'aarch64'
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build and test wheels
uses: pypa/[email protected] # You may need to update to get latest Python versions
env:
Expand All @@ -58,6 +59,6 @@ jobs:
# Test
CIBW_BEFORE_TEST: "pip install --upgrade pip && pip install -r requirements-dev.txt && pip list"
CIBW_TEST_COMMAND: "pytest {project}/tests"
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![PyPI](https://img.shields.io/pypi/v/k-means-constrained)](https://pypi.org/project/k-means-constrained/)
![Python](https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12%20%7C%203.13-blue)
![Python](https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12-blue)
[![Build](https://github.com/joshlk/k-means-constrained/actions/workflows/build_wheels.yml/badge.svg)](https://github.com/joshlk/k-means-constrained/actions/workflows/build_wheels.yml)
[**Documentation**](https://joshlk.github.io/k-means-constrained/)

Expand Down Expand Up @@ -120,7 +120,7 @@ Below is a runtime comparison between k-means and k-means-constrained whereby th

# Change log

* v0.7.4 compatible with Numpy +v2.1.1. Added Python 3.12 and 3.13 support. Dropped Python 3.8 and 3.9 support (in line with Numpy).
* v0.7.4 compatible with Numpy +v2.1.1. Added Python 3.12 support and dropped Python 3.8 and 3.9 support (due to Numpy).
* v0.7.3 compatible with Numpy v1.23.0 to 1.26.4

# Citations
Expand Down
23 changes: 5 additions & 18 deletions README_dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,52 +24,39 @@ pytest
```

2. Push changes to GitHub to build it for all platforms (if you get errors check notes above)
MacOS isn't tested so download a copy and test locally.

3. Add changes to change log and bump version (major, minor or patch):

```shell script
bump2version patch
```



Push to GitHub to build for many version. The MacOS ARM build isn't automatically tested and so should be tested locally.

# Push to PyPi
Requires: `pip install twine`
Don't forget to increment version number

Bump version (major, minor or patch):



Download distributions (artifacts)
4. Download distributions (artifacts)

```shell script
make download-dists ID=$BUILD_ID
```

Upload to test PyPi
5. Upload to test PyPi

```shell script
make check-dist
make test-pypi
```

Activate virtual env (might need to `make venv-create`)
6. Activate virtual env (might need to `make venv-create`)

```shell script
source k-means-env/bin/activate
```

Test install (in virtual env. *****Remember to cd out of k-means-constrained folder*****):
7. Test install (in virtual env. *****Remember to cd out of k-means-constrained folder*****):

```shell script
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple k-means-constrained
```

Then push to real PyPI:
8. Then push to real PyPI:

```shell script
make pypi-upload
Expand Down

0 comments on commit 713c029

Please sign in to comment.