Skip to content

Commit

Permalink
MNT: Migrate to use pyproject.toml (#767)
Browse files Browse the repository at this point in the history
  • Loading branch information
snowman2 authored Apr 3, 2024
1 parent bf6cbda commit 2ae061d
Show file tree
Hide file tree
Showing 9 changed files with 88 additions and 82 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ jobs:
export INSTALL_DEPS='rasterio${{ matrix.rasterio-version }} xarray${{ matrix.xarray-version }}'
[ "${{ matrix.run-with-scipy }}" = "YES" ] && export INSTALL_DEPS="${INSTALL_DEPS} scipy"
python -m pip install $INSTALL_DEPS
python -m pip install -e .[dev,doc]
python -m pip install -e .[all]
python -m pip install -r requirements/test.txt
- name: run tests
run: |
Expand Down Expand Up @@ -118,7 +119,8 @@ jobs:
[ "${{ matrix.run-with-scipy }}" = "YES" ] && export INSTALL_DEPS="${INSTALL_DEPS} scipy"
conda create -n test $INSTALL_DEPS
source activate test
python -m pip install -e .[dev,doc]
python -m pip install -e .[all]
python -m pip install -r requirements/dev.txt
- name: Check and Log Environment
shell: bash
Expand Down Expand Up @@ -191,6 +193,7 @@ jobs:
git+https://github.com/pyproj4/pyproj.git@main \
git+https://github.com/pydata/xarray.git@main;
python -m pip install -e .[all]
python -m pip install -r requirements/test.txt
- name: Check and Log Environment
shell: bash
Expand Down
3 changes: 2 additions & 1 deletion CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ Using python::

4. Install your local copy into a virtualenv.

$ pip install -e .[dev]
$ python -m pip install -e .[all]
$ python -m pip install -r requirements/dev.txt

5. Setup pre-commit hooks::

Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ dist: clean ## builds source and wheel package
report: install-dev coverage ## clean, install development version, run all tests, produce coverage report

install: clean ## install the package to the active Python's site-packages
pip install .
python -m pip install .[all]

install-dev: clean ## install development version to active Python's site-packages
pip install -e .[all]
python -m pip install -e .[all]
python -m pip install -r requirements/dev.txt
1 change: 1 addition & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ install:
# Install rioxarray
#-------------------------------------------------------------------------------
- python -m pip install -e .[all]
- python -m pip install -r requirements/test.txt

build: false

Expand Down
65 changes: 64 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,68 @@
# Minimum requirements for the build system to execute.
requires = ["setuptools", "wheel"]

[project]
name = "rioxarray"
version = "0.15.3.dev0"
description = "geospatial xarray extension powered by rasterio"
maintainers = [
{name = "rioxarray Contributors"},
]
keywords = [
"rioxarray",
"xarray",
"rasterio",
]
readme = "README.rst"
license = {text = "Apache"}
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Natural Language :: English",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Topic :: Scientific/Engineering :: GIS",
"Programming Language :: Python",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
]
requires-python = ">=3.10"
dependencies = [
"packaging",
"rasterio>=1.3",
"xarray>=2022.3.0",
"pyproj>=3.3",
"numpy>=1.23",
]

[project.urls]
homepage = "https://corteva.github.io/rioxarray/"
documentation = "https://corteva.github.io/rioxarray/"
repository = "https://github.com/corteva/rioxarray"
changelog = "https://corteva.github.io/rioxarray/stable/history.html"

[tool.setuptools.packages.find]
include = ["rioxarray", "rioxarray.*"]

[options.package_data]
rioxarray = [
"py.typed",
]

[project.entry-points."xarray.backends"]
rasterio = "rioxarray.xarray_plugin:RasterioBackend"

[project.optional-dependencies]
interp = [
"scipy"
]
all = [
"scipy"
]

[tool.black]
target_version = ['py310']
target_version = ["py310"]
5 changes: 5 additions & 0 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-r doc.txt
-r test.txt
pylint
mypy
pre-commit
3 changes: 3 additions & 0 deletions requirements/doc.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
sphinx-click
nbsphinx
sphinx_rtd_theme
5 changes: 5 additions & 0 deletions requirements/test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pytest>=3.6
pytest-cov
pytest-timeout
dask
netcdf4
76 changes: 0 additions & 76 deletions setup.cfg

This file was deleted.

0 comments on commit 2ae061d

Please sign in to comment.