diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 57ad690..d154ca7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -10,10 +10,10 @@ jobs: fail-fast: false matrix: os: ["windows-latest", "ubuntu-latest", "macos-latest"] - python-version: ["3.10", "3.11", "3.12"] + python-version: ["3.11", "3.12", "3.13"] experimental: [false] include: - - python-version: "3.12" + - python-version: "3.13" os: "ubuntu-latest" experimental: true @@ -73,12 +73,6 @@ jobs: run: | pytest --cov=geotiepoints geotiepoints/tests --cov-report=xml --cov-report= - # FIXME: These fail -# - name: Test website -# shell: bash -l {0} -# run: | -# cd doc && mkdir doctest && sphinx-build -E -n -b doctest ./source ./doctest && cd .. - - name: Upload unittest coverage to Codecov uses: codecov/codecov-action@v5 with: diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 7b060df..7462999 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -1,6 +1,5 @@ name: Deploy sdist and wheels - on: push: pull_request: @@ -28,46 +27,41 @@ jobs: path: dist/*.tar.gz build_wheels: - name: "Build wheels on ${{ matrix.os }} ${{ matrix.cibw_archs }}" + name: "Build wheels on ${{ matrix.os }} ${{ matrix.arch }}" runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: include: - - os: windows-latest - cibw_archs: "AMD64 ARM64" - artifact_name: "win" - - os: macos-latest - cibw_archs: "x86_64 arm64" - artifact_name: "mac" - - os: "ubuntu-latest" - cibw_archs: "aarch64" - artifact_name: "ubuntu-aarch" - - os: "ubuntu-latest" - cibw_archs: "x86_64" - artifact_name: "ubuntu-x86_64" + - os: windows-2022 + arch: "AMD64" + - os: windows-11-arm + arch: "ARM64" + - os: macos-13 + arch: "x86_64" + - os: macos-14 + arch: "arm64" + - os: "ubuntu-24.04-arm" + arch: "aarch64" + - os: "ubuntu-24.04" + arch: "x86_64" steps: - uses: actions/checkout@v4 - run: | git fetch --prune --unshallow - - name: Set up QEMU - if: runner.os == 'Linux' - uses: docker/setup-qemu-action@v3 - with: - platforms: all - - name: Build wheels uses: pypa/cibuildwheel@v3.1.4 env: - CIBW_SKIP: "cp38-* *-manylinux_i686 *-musllinux_i686 *-musllinux_aarch64 *-win32" - CIBW_ARCHS: "${{ matrix.cibw_archs }}" + CIBW_SKIP: "cp39-* cp310-* *-manylinux_i686 *-musllinux_i686 *-musllinux_aarch64 *-win32" + CIBW_ARCHS: "${{ matrix.arch }}" CIBW_TEST_SKIP: "*_arm64" + CIBW_ENABLE: cpython-freethreading - uses: actions/upload-artifact@v4 with: - name: wheels-${{ matrix.artifact_name }} + name: wheels-${{ matrix.os }}-${{ matrix.arch }} path: ./wheelhouse/*.whl upload_to_pypi: @@ -79,25 +73,11 @@ jobs: with: name: sdist path: dist - - name: Download wheels artifact - win - uses: actions/download-artifact@v5 - with: - name: wheels-win - path: dist - - name: Download wheels artifact - mac - uses: actions/download-artifact@v5 - with: - name: wheels-mac - path: dist - - name: Download wheels artifact - ubuntu aarch - uses: actions/download-artifact@v5 - with: - name: wheels-ubuntu-aarch - path: dist - - name: Download wheels artifact - ubuntu x86_64 + - name: Download wheels artifact uses: actions/download-artifact@v5 with: - name: wheels-ubuntu-x86_64 + pattern: wheels-* + merge-multiple: true path: dist - name: Publish package to Test PyPI if: github.event.action != 'published' && github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') diff --git a/.gitignore b/.gitignore index f1f0c30..cfacac5 100644 --- a/.gitignore +++ b/.gitignore @@ -34,4 +34,4 @@ geotiepoints/*.c .idea # vscode -.vscode \ No newline at end of file +.vscode diff --git a/.readthedocs.yml b/.readthedocs.yml new file mode 100644 index 0000000..3136b9e --- /dev/null +++ b/.readthedocs.yml @@ -0,0 +1,19 @@ +version: 2 + +build: + os: "ubuntu-20.04" + tools: + python: "3.11" + jobs: + post_checkout: + - git fetch --tags + pre_install: + - git update-index --assume-unchanged rtd_requirements.txt doc/source/conf.py +sphinx: + configuration: doc/source/conf.py + fail_on_warning: true +python: + install: + - requirements: rtd_requirements.txt + - method: pip + path: . diff --git a/doc/source/conf.py b/doc/source/conf.py index bab74dc..55d7f90 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -154,8 +154,7 @@ def __getattr__(cls, name): # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -#html_static_path = ['.static'] -html_static_path = ['sphinx_static'] +#html_static_path = [] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. diff --git a/doc/source/index.rst b/doc/source/index.rst index 0537e94..8e25c32 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -11,7 +11,7 @@ package should be generic enough to be used for any kind of data. The source code of the module can be found on the github_ page. -.. _github: http://github.com/adybbroe/python-geotiepoints +.. _github: http://github.com/pytroll/python-geotiepoints .. contents:: @@ -24,7 +24,7 @@ You can install the latest version of python-geotiepoints with pip:: Alternatively, you can download the source code from github_:: - git clone git://github.com/adybbroe/python-geotiepoints.git + git clone git://github.com/pytroll/python-geotiepoints.git and then run:: diff --git a/pyproject.toml b/pyproject.toml index 57e52e0..18a5122 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,8 +1,15 @@ [build-system] -requires = ["setuptools", "wheel", "numpy>=2.0.0rc1,<3", "Cython>=3", "versioneer"] +requires = ["setuptools", "wheel", "numpy>=2.0.0,<3", "Cython>=3.1.2", "versioneer[toml]"] build-backend = "setuptools.build_meta" [tool.coverage.run] relative_files = true plugins = ["Cython.Coverage"] omit = ["geotiepoints/version.py"] + +[tool.versioneer] +VCS = "git" +style = "pep440" +versionfile_source = "geotiepoints/version.py" +versionfile_build = "geotiepoints/version.py" +tag_prefix = "v" diff --git a/rtd_requirements.txt b/rtd_requirements.txt new file mode 100644 index 0000000..8b14fbd --- /dev/null +++ b/rtd_requirements.txt @@ -0,0 +1,8 @@ +xarray +dask[array] +pyresample +pyproj +sphinx +sphinxcontrib-apidoc +pytest + diff --git a/setup.cfg b/setup.cfg index 6b415cd..2bc7a8c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,14 +1,3 @@ -[bdist_rpm] -requires=numpy cython scipy -release=1 - [flake8] max-line-length = 120 ignore = D107 - -[versioneer] -VCS = git -style = pep440 -versionfile_source = geotiepoints/version.py -versionfile_build = geotiepoints/version.py -tag_prefix = v diff --git a/setup.py b/setup.py index a397172..cd265fe 100644 --- a/setup.py +++ b/setup.py @@ -23,7 +23,7 @@ from Cython.Distutils import Extension requirements = ['numpy', 'scipy', 'pandas'] -test_requires = ['pytest', 'pytest-cov', 'h5py', 'xarray', 'dask', 'pyproj', "pyresample"] +test_requires = ['pytest', 'pytest-cov', 'h5py', 'xarray', 'dask[array]', 'pyproj', "pyresample"] if sys.platform.startswith("win"): extra_compile_args = [] @@ -67,6 +67,7 @@ cython_directives = { "language_level": "3", + "freethreading_compatible": True, } define_macros = [("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION")] if cython_coverage: @@ -96,19 +97,25 @@ long_description_content_type='text/markdown', author='Adam Dybbroe, Martin Raspaud', author_email='martin.raspaud@smhi.se', - classifiers=["Development Status :: 5 - Production/Stable", - "Intended Audience :: Science/Research", - "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Cython", - "Topic :: Scientific/Engineering"], + classifiers=[ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Science/Research", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Cython", + "Topic :: Scientific/Engineering", + "Programming Language :: Python :: Free Threading :: 1 - Unstable", + ], + license="GPL-3.0-or-later", + license_files=["LICENSE.txt"], url="https://github.com/pytroll/python-geotiepoints", packages=find_packages(), - python_requires='>=3.10', + python_requires='>=3.11', cmdclass=cmdclass, install_requires=requirements, ext_modules=EXTENSIONS, - tests_require=test_requires, + extras_require={ + "tests": test_requires, + }, zip_safe=False )