Skip to content

Commit 4c277e0

Browse files
authored
Update CI, update docs (#13)
* update docs * update docs * update packaging * fix * fix pip
1 parent 5faf983 commit 4c277e0

File tree

20 files changed

+207
-826
lines changed

20 files changed

+207
-826
lines changed

.appveyor.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

.github/workflows/pip.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
platform: [windows-latest, macos-latest, ubuntu-latest]
16-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
15+
platform: [ubuntu-20.04, windows-2019, macos-11]
16+
python-version: ["3.8", "3.9", "3.10"]
1717

1818
runs-on: ${{ matrix.platform }}
1919

@@ -33,4 +33,5 @@ jobs:
3333
run: pip install --verbose .[test]
3434

3535
- name: Test
36+
if: ${{ startsWith(matrix.platform, 'ubuntu') }}
3637
run: python -m pytest

.github/workflows/wheels.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,22 @@ jobs:
4343
with:
4444
submodules: true
4545

46+
- name: Set up QEMU
47+
if: runner.os == 'Linux'
48+
uses: docker/setup-qemu-action@v2
49+
with:
50+
platforms: all
51+
4652
- uses: pypa/cibuildwheel@v2.12.0
4753
env:
48-
CIBW_ARCHS_MACOS: auto universal2
54+
# CIBW_ARCHS: auto64
55+
CIBW_ARCHS_LINUX: x86_64 aarch64
56+
CIBW_ARCHS_WINDOWS: AMD64 # ARM64
57+
CIBW_ARCHS_MACOS: x86_64 arm64
58+
CIBW_BEFORE_BUILD: pip install numpy --prefer-binary
4959
# https://cibuildwheel.readthedocs.io/en/stable/options/#build-skip
50-
CIBW_SKIP: pp* *i686
60+
CIBW_SKIP: pp* *i686 *musllinux*
61+
CIBW_TEST_SKIP: "*macosx* *win* *aarch64"
5162

5263
- name: Verify clean directory
5364
run: git diff --exit-code
@@ -77,4 +88,4 @@ jobs:
7788

7889
- uses: pypa/gh-action-pypi-publish@v1.6.4
7990
with:
80-
password: ${{ secrets.pypi_password }}
91+
password: ${{ secrets.PYPI_API_TOKEN }}

.readthedocs.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: 2
2+
formats: all
3+
mkdocs:
4+
fail_on_warning: false
5+
python:
6+
install:
7+
- requirements: docs/requirements.txt

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ build:
1717
cmake .. && make
1818
.PHONY: build
1919

20+
docs_build:
21+
mkdocs build
22+
docs_serve:
23+
mkdocs serve -a 0.0.0.0:8088
24+
2025
DOCKER_TAG_WINDOWS ?= ghcr.io/cubao/build-env-windows-x64:v0.0.1
2126
DOCKER_TAG_LINUX ?= ghcr.io/cubao/build-env-manylinux2014-x64:v0.0.1
2227
DOCKER_TAG_MACOS ?= ghcr.io/cubao/build-env-macos-arm64:v0.0.1

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ The Ramer-Douglas-Peucker algorithm is an algorithm for reducing the number of p
1111

1212
### via pip
1313

14-
```
15-
pip install pybind11-rdp
14+
```bash
15+
pip install -U pybind11-rdp
1616
```
1717

1818
### from source
@@ -73,7 +73,7 @@ make python_test
7373
As <https://github.com/fhirschmann/rdp/issues/13> points out, `pdist` in `rdp` is **WRONGLY** Point-to-Line distance.
7474
We use Point-to-LineSegment distance.
7575

76-
```
76+
```python
7777
from rdp import rdp
7878
print(rdp([[0, 0], [10, 0.1], [1, 0]], epsilon=1.0)) # wrong
7979
# [[0.0, 0.0],

docs/Makefile

Lines changed: 0 additions & 216 deletions
This file was deleted.

docs/about/license.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# License
2+
3+
The legal stuff.
4+
5+
---
6+
7+
## Included projects
8+
9+
* [pybind/pybind11](https://github.com/pybind/pybind11/blob/master/LICENSE) (BSD)
10+
* [pybind/cmake_example](https://github.com/pybind/cmake_example/blob/master/LICENSE) (BSD)
11+
12+
## License (BSD)
13+
14+
See <https://github.com/cubao/pybind11-rdp/blob/master/LICENSE>.

docs/about/release-notes.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Release Notes
2+
3+
---
4+
5+
## Upgrading
6+
7+
To upgrade `pybind11-rdp` to the latest version, use pip:
8+
9+
```bash
10+
pip install -U pybind11-rdp
11+
```
12+
13+
## Version 0.1.2 (2023-03-02)
14+
15+
* Identical API to rdp, notice difference
16+
17+
## Version 0.1.1 (2022-11-03)
18+
19+
* Fix source packaging
20+
21+
## Version 0.1.0 (2022-11-03)
22+
23+
* Export `LineSegment`
24+
25+
## Version 0.0.1 (2022-10-15)
26+
27+
* First release to pypi
28+
29+
---
30+
31+
You can also checkout releases on:
32+
33+
- GitHub: <https://github.com/cubao/pybind11-rdp/releases>
34+
- PyPi: <https://pypi.org/project/pybind11-rdp>

0 commit comments

Comments
 (0)