-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #92 from mapbox/bill/future
rio-color 2.0
- Loading branch information
Showing
16 changed files
with
131 additions
and
103 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: rio-color test | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install -U pip | ||
python -m pip install -r requirements.txt -r requirements-dev.txt | ||
- name: Install module | ||
run: python -m pip install -e . | ||
|
||
- name: Run tests | ||
run: | | ||
pre-commit run --all-files | ||
python -m pytest --cov rio_color --cov-report term-missing |
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
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
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,13 +1,12 @@ | ||
affine | ||
cligj | ||
colormath==2.0.2 | ||
coveralls>=0.4 | ||
colormath==3.0.0 | ||
delocate | ||
numpy>=1.8.0 | ||
numpy==2.0.2 | ||
pre-commit | ||
pytest~=3.10.0 | ||
pytest~=8.3.4 | ||
pytest-cov>=2.2.0 | ||
rasterio==1.1.8 | ||
rasterio==1.4.3 | ||
setuptools>=0.9.8 | ||
snuggs>=1.2 | ||
wheel |
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,4 +1,4 @@ | ||
click~=8.0 | ||
rasterio~=1.0 | ||
rio-mucho | ||
enum34; python_version < "3.4" | ||
click~=8.1 | ||
numpy==2.0.2 | ||
rasterio~=1.4 | ||
rio-mucho |
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,3 +1,3 @@ | ||
"""rio-color""" | ||
|
||
__version__ = "1.0.4" | ||
__version__ = "2.0.0" |
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
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
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 |
---|---|---|
|
@@ -2,20 +2,13 @@ | |
|
||
import os | ||
import sys | ||
from setuptools import setup, find_packages | ||
from setuptools.extension import Extension | ||
|
||
# Use Cython if available. | ||
try: | ||
from Cython.Build import cythonize | ||
except ImportError: | ||
cythonize = None | ||
from setuptools import setup, find_packages, Extension | ||
from Cython.Build import cythonize | ||
import numpy as np | ||
|
||
include_dirs = [] | ||
try: | ||
import numpy | ||
|
||
include_dirs.append(numpy.get_include()) | ||
include_dirs.append(np.get_include()) | ||
except ImportError: | ||
print("Numpy and its headers are required to run setup(). Exiting.") | ||
sys.exit(1) | ||
|
@@ -40,56 +33,47 @@ def read(fname): | |
return open(os.path.join(os.path.dirname(__file__), fname)).read() | ||
|
||
|
||
if cythonize and "clean" not in sys.argv: | ||
ext_modules = cythonize( | ||
[ | ||
Extension( | ||
"rio_color.colorspace", | ||
["rio_color/colorspace.pyx"], | ||
extra_compile_args=["-O2"], | ||
) | ||
] | ||
extensions = [ | ||
Extension( | ||
"rio_color.colorspace", | ||
["rio_color/colorspace.pyx"], | ||
include_dirs=[np.get_include()], | ||
define_macros=[("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION")], | ||
) | ||
else: | ||
ext_modules = [Extension("rio_color.colorspace", ["rio_color/colorspace.c"])] | ||
|
||
inst_reqs = [ | ||
"click>=4.0", | ||
"rasterio~=1.0", | ||
"rio-mucho", | ||
"enum34 ; python_version < '3.4'", | ||
] | ||
|
||
inst_reqs = ["click>=8.0", "rasterio~=1.4", "rio-mucho"] | ||
|
||
setup( | ||
name="rio-color", | ||
version=version, | ||
description=u"Color correction plugin for rasterio", | ||
description="Color correction plugin for rasterio", | ||
long_description=long_description, | ||
python_requires=">=3.9", | ||
classifiers=[ | ||
"Development Status :: 5 - Production/Stable", | ||
"Intended Audience :: Developers", | ||
"Intended Audience :: Science/Research", | ||
"License :: OSI Approved :: MIT License", | ||
"Programming Language :: Cython", | ||
"Programming Language :: Python :: 2.7", | ||
"Programming Language :: Python :: 3.6", | ||
"Programming Language :: Python :: 2", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10" | ||
"Programming Language :: Python :: 3.11" | ||
"Topic :: Multimedia :: Graphics :: Graphics Conversion", | ||
"Topic :: Scientific/Engineering :: GIS", | ||
], | ||
keywords="", | ||
author=u"Charlie Loyd", | ||
author="Charlie Loyd", | ||
author_email="[email protected]", | ||
url="https://github.com/mapbox/rio-color", | ||
license="BSD", | ||
packages=find_packages(exclude=["ez_setup", "examples", "tests"]), | ||
include_package_data=True, | ||
zip_safe=False, | ||
install_requires=inst_reqs, | ||
ext_modules=ext_modules, | ||
ext_modules=cythonize(extensions), | ||
include_dirs=include_dirs, | ||
extras_require={"test": ["pytest", "colormath==2.0.2", "pytest-cov", "codecov"]}, | ||
extras_require={"test": ["pytest", "colormath==3.0.0", "pytest-cov", "codecov"]}, | ||
entry_points=""" | ||
[rasterio.rio_plugins] | ||
color=rio_color.scripts.cli:color | ||
|
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