-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trying pyproject.toml and scikit-build-core (#378)
* trying a scikit-build-core setup * trying things * vendor FindCython * fix build * remove unused * cython tests working * fix lint action * coverage fix * drop annotation stuff for now, because i can't get it working * book building * all target * try again * don't install all * numpy! * pip install h3.tar.gz[test] * drop wheel builds for 3.6 and 3.7 * move coverage config to pyproject.toml * remove requirements-dev.txt * remove cmake from the build system requirements * single sourcing the version number in _version.py * i think scikitbuild-core doesn't work with dynamic = ['version']. try something else * uber's * alphabetical files in cmakelists.txt * tidy up files in the sdist * move pytest config to pyproject.toml * CIBW_TEST_COMMAND: pytest * CIBW_TEST_COMMAND: pytest {project}/tests * CIBW_TEST_REQUIRES: pytest pytest-cov numpy * get better coverage on the testing code * fix api reference link (#385) * Added Bindings for Vertex-Related Functions (#388) * Update CHANGELOG.md * Update h3lib.pxd * Update latlng.pxd * Update latlng.pyx * Update util.pxd * Update util.pyx * Update _version.py * Update __init__.py * Update __init__.py * Update test_h3.py * Update __init__.py * Update test_h3.py * Update CHANGELOG.md * Update __init__.py * Update test_h3.py * Update _version.py * Update test_h3.py * Update __init__.py * Update CMakeLists.txt * Update latlng.pxd * Update latlng.pyx * Create vertex.pxd * Create vertex.pyx * Update __init__.py * Update test_h3.py * Update __init__.py * Update api_quick.md * Bump actions/download-artifact from 4.1.4 to 4.1.7 in /.github/workflows (#392) Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4.1.4 to 4.1.7. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](actions/download-artifact@v4.1.4...v4.1.7) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * prep for v4.0.0b6 release (#394) * alphabetical files in cmakelists.txt * single * test with numpy>=2 * drop lower bound on numpy version --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Isaac Brodsky <[email protected]> Co-authored-by: Pieter Provoost <[email protected]> Co-authored-by: Shiran Yuan <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
- Loading branch information
1 parent
cec946a
commit 65c3d9e
Showing
18 changed files
with
159 additions
and
206 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,10 +23,10 @@ jobs: | |
- name: Install from source | ||
run: | | ||
pip install --upgrade pip setuptools wheel | ||
pip install .[all] | ||
pip install .[test] | ||
- name: Lint | ||
run: flake8 src/h3 setup.py tests | ||
run: flake8 src/h3 tests | ||
|
||
- name: Pylint | ||
# As a test for visibility of API bindings, we want to ensure that pylint has no | ||
|
@@ -35,24 +35,13 @@ jobs: | |
|
||
- name: Coverage | ||
run: | | ||
pip install Cython | ||
cythonize -i tests/test_cython/cython_example.pyx | ||
pytest --cov=h3 --full-trace --cov-report=xml | ||
pip install cython | ||
cythonize tests/test_cython/cython_example.pyx | ||
pytest --cov-report=xml | ||
- name: Upload coverage to Codecov | ||
uses: codecov/[email protected] | ||
with: | ||
file: ./coverage.xml | ||
fail_ci_if_error: true | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
- name: Copy Cython annotations to project dir | ||
run: | | ||
mkdir annotations | ||
cp _skbuild/*/cmake-build/src/h3/_cy/*.html ./annotations | ||
- name: Upload artifacts to GitHub | ||
uses: actions/[email protected] | ||
with: | ||
name: annotations | ||
path: ./annotations |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,12 +41,11 @@ jobs: | |
- name: Install from sdist | ||
run: | | ||
pip install --upgrade pip setuptools wheel | ||
pip install pytest | ||
cp dist/h3-*.tar.gz h3.tar.gz | ||
pip install h3.tar.gz[all] | ||
pip install h3.tar.gz[test] | ||
- name: Test sdist | ||
run: pytest --cov=h3 --full-trace | ||
run: pytest | ||
|
||
- name: Upload artifacts to GitHub | ||
uses: actions/[email protected] | ||
|
@@ -76,12 +75,6 @@ jobs: | |
build: 'cp*-manylinux_x86_64' | ||
name: Linux Intel glibc 64-bit | ||
|
||
- os: ubuntu-22.04 | ||
build: 'cp36-musllinux_x86_64' | ||
name: Linux Intel musl 64-bit 3.6 | ||
- os: ubuntu-22.04 | ||
build: 'cp37-musllinux_x86_64' | ||
name: Linux Intel musl 64-bit 3.7 | ||
- os: ubuntu-22.04 | ||
build: 'cp38-musllinux_x86_64' | ||
name: Linux Intel musl 64-bit 3.8 | ||
|
@@ -98,12 +91,6 @@ jobs: | |
build: 'cp312-musllinux_x86_64' | ||
name: Linux Intel musl 64-bit 3.12 | ||
|
||
- os: ubuntu-22.04 | ||
build: 'cp36-manylinux_aarch64' | ||
name: Linux Aarch64 3.6 | ||
- os: ubuntu-22.04 | ||
build: 'cp37-manylinux_aarch64' | ||
name: Linux Aarch64 3.7 | ||
- os: ubuntu-22.04 | ||
build: 'cp38-manylinux_aarch64' | ||
name: Linux Aarch64 3.8 | ||
|
@@ -143,7 +130,7 @@ jobs: | |
|
||
- uses: pypa/[email protected] | ||
env: | ||
CIBW_TEST_REQUIRES: pytest numpy | ||
CIBW_TEST_REQUIRES: pytest pytest-cov numpy | ||
CIBW_TEST_COMMAND: pytest {project}/tests | ||
CIBW_ARCHS_LINUX: auto aarch64 | ||
CIBW_BUILD: ${{ matrix.build }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,93 @@ | ||
[build-system] | ||
requires = [ | ||
'scikit-build', | ||
'cython', | ||
'cmake', | ||
requires = ['scikit-build-core', 'cython'] | ||
build-backend = 'scikit_build_core.build' | ||
|
||
[project] | ||
name = 'h3' | ||
version = '4.0.0b6' | ||
description = "Uber's hierarchical hexagonal geospatial indexing system" | ||
readme = 'readme.md' | ||
license = {file = 'LICENSE'} | ||
authors = [ | ||
{ name = 'Uber Technologies', email = '[email protected]' }, | ||
] | ||
maintainers = [ | ||
{ name = 'AJ Friend', email = '[email protected]' }, | ||
] | ||
requires-python = '>=3.8' | ||
|
||
dependencies = [] | ||
|
||
classifiers = [ | ||
'Development Status :: 5 - Production/Stable', | ||
'Intended Audience :: Developers', | ||
'Intended Audience :: Science/Research', | ||
'License :: OSI Approved :: Apache Software License', | ||
'Programming Language :: C', | ||
'Programming Language :: Cython', | ||
'Programming Language :: Python :: 3.8', | ||
'Programming Language :: Python :: 3.9', | ||
'Programming Language :: Python :: 3.10', | ||
'Programming Language :: Python :: 3.11', | ||
'Programming Language :: Python :: 3.12', | ||
'Operating System :: MacOS :: MacOS X', | ||
'Operating System :: POSIX :: Linux', | ||
'Operating System :: Microsoft :: Windows', | ||
'Topic :: Scientific/Engineering :: GIS', | ||
] | ||
|
||
[project.urls] | ||
Homepage = 'https://github.com/organization/package' | ||
Documentation = 'https://package.readthedocs.io/' | ||
'Bug Tracker' = 'https://github.com/organization/package/issues' | ||
Discussions = 'https://github.com/organization/package/discussions' | ||
Changelog = 'https://package.readthedocs.io/en/latest/changelog.html' | ||
|
||
|
||
[project.optional-dependencies] | ||
numpy = ['numpy'] | ||
test = ['pytest', 'pytest-cov', 'flake8', 'pylint', 'numpy'] | ||
all = [ | ||
'jupyter-book', | ||
'flake8', | ||
'sphinx>=7.3.3', # https://github.com/sphinx-doc/sphinx/issues/12290 | ||
'jupyterlab', | ||
'jupyterlab-geojson', | ||
'geopandas', | ||
'geodatasets', | ||
'matplotlib', | ||
'contextily', | ||
'cartopy', | ||
'geoviews', | ||
'numpy', | ||
'pytest', | ||
'pytest-cov', | ||
'pylint', | ||
] | ||
|
||
[tool.pytest.ini_options] | ||
addopts = "--cov=h3 --cov=tests --cov-report=term-missing --durations=10" | ||
|
||
[tool.coverage.run] | ||
omit = [ | ||
'*/h3/api/basic_int/__init__.py', | ||
'*/h3/api/memview_int/__init__.py', | ||
'*/h3/api/numpy_int/__init__.py' | ||
] | ||
|
||
|
||
[tool.scikit-build] | ||
sdist.exclude = [ | ||
'src/h3lib', | ||
'docs', | ||
'dev_notes.md', | ||
'makefile', | ||
] | ||
sdist.include = [ | ||
'src/h3lib/LICENSE', | ||
'src/h3lib/README.md', | ||
'src/h3lib/VERSION', | ||
'src/h3lib/CMakeLists.txt', | ||
'src/h3lib/cmake/*', | ||
'src/h3lib/src/h3lib/*' | ||
] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.