Skip to content

Commit

Permalink
fix CI (#13)
Browse files Browse the repository at this point in the history
* fix CI

* speed up builds

* fix CI

* fix scipy version

* update matrix

* fix test on macos

* fix scipy version, skip musllinux

* clean code, add mkdocs docs

* update docs

* update docs

* ready to release

* release to pypi
  • Loading branch information
district10 authored Mar 3, 2023
1 parent c3b1e19 commit 54999de
Show file tree
Hide file tree
Showing 23 changed files with 219 additions and 924 deletions.
7 changes: 0 additions & 7 deletions .github/dependabot.yml

This file was deleted.

48 changes: 0 additions & 48 deletions .github/workflows/conda.yml

This file was deleted.

5 changes: 3 additions & 2 deletions .github/workflows/pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:
strategy:
fail-fast: false
matrix:
platform: [windows-latest, macos-latest, ubuntu-latest]
python-version: ["3.6", "3.8", "3.11-dev"]
platform: [ubuntu-20.04, windows-2019, macos-11]
python-version: ["3.8", "3.9", "3.10"]

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

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

- name: Test
if: ${{ !startsWith(matrix.platform, 'macos') }}
run: python -m pytest
15 changes: 8 additions & 7 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,20 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
os: [ubuntu-20.04, windows-2019, macos-11]

steps:
- uses: actions/checkout@v3
with:
submodules: true

- uses: pypa/cibuildwheel@v2.11.2
- uses: pypa/cibuildwheel@v2.12.0
env:
CIBW_ARCHS_MACOS: auto universal2
CIBW_BUILD: cp38-* # speed up
CIBW_ARCHS: auto64
CIBW_BEFORE_BUILD: pip install numpy scipy --prefer-binary
# https://cibuildwheel.readthedocs.io/en/stable/options/#build-skip
CIBW_SKIP: pp*
CIBW_SKIP: pp* *i686 *musllinux*
CIBW_TEST_SKIP: "*macosx*"

- name: Verify clean directory
run: git diff --exit-code
Expand Down Expand Up @@ -76,6 +77,6 @@ jobs:
name: artifact
path: dist

- uses: pypa/gh-action-pypi-publish@v1.5.1
- uses: pypa/gh-action-pypi-publish@v1.6.4
with:
password: ${{ secrets.pypi_password }}
password: ${{ secrets.PYPI_API_TOKEN }}
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ repos:
- id: remove-tabs
exclude: ^(docs|Makefile)

- repo: https://gitlab.com/pycqa/flake8
- repo: https://github.com/PyCQA/flake8
rev: 3.9.2
hooks:
- id: flake8
Expand Down
7 changes: 7 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
formats: all
mkdocs:
fail_on_warning: false
python:
install:
- requirements: docs/requirements.txt
49 changes: 17 additions & 32 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,36 +1,21 @@
Copyright (c) 2016 The Pybind Development Team, All rights reserved.
The MIT License (MIT)

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

You are under no obligation whatsoever to provide any bug fixes, patches, or
upgrades to the features, functionality or performance of the source code
("Enhancements") to anyone; however, if you choose to make your Enhancements
available either publicly, or directly to the author of this software, without
imposing a separate written license agreement for such Enhancements, then you
hereby grant the following license: a non-exclusive, royalty-free perpetual
license to install, use, modify, prepare derivative works, incorporate into
other computer software, distribute, and sublicense such enhancements or
derivative works thereof, in binary and source code form.
SPDX-License-Identifier: MIT
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ python_test:
$(PYTHON) test.py
pytest --capture=tee-sys tests

docs_build:
mkdocs build
docs_serve:
mkdocs serve

# conda create -y -n py36 python=3.6
# conda create -y -n py37 python=3.7
# conda create -y -n py38 python=3.8
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@

A very fast 2D concave hull algorithm.

![](hull.png)
![](docs/hull.png)

Credits goes to:

- https://github.com/mapbox/concaveman
- https://github.com/sadaszewski/concaveman-cpp
- <https://github.com/mapbox/concaveman>
- <https://github.com/sadaszewski/concaveman-cpp>

## Install

### via pip

```
```bash
pip install concave_hull
```

Expand All @@ -26,7 +26,7 @@ pip install ./concave_hull

Or

```
```bash
pip install git+https://github.com/cubao/concave_hull.git
```

Expand Down
39 changes: 0 additions & 39 deletions conda.recipe/meta.yaml

This file was deleted.

Loading

0 comments on commit 54999de

Please sign in to comment.