Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions .coveragerc

This file was deleted.

27 changes: 12 additions & 15 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ on:
workflow_dispatch:

jobs:
format_check:
name: format check
source_check:
name: source check
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -35,7 +35,7 @@ jobs:

- name: black check
run: |
python -m black --check pykrige/ examples/ tests/
python -m black --check --diff --color pykrige/ examples/ tests/

build_sdist:
name: sdist and coveralls
Expand All @@ -56,15 +56,8 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements_setup.txt
pip install -r requirements.txt
pip install -r requirements_test.txt
pip install coveralls>=3.0.0

- name: Build sdist
run: |
python setup.py sdist -d dist
python setup.py build_ext --inplace
pip install build coveralls>=3.0.0
pip install --editable .[test]

- name: Run tests
env:
Expand All @@ -73,6 +66,11 @@ jobs:
python -m pytest --cov pykrige --cov-report term-missing -v tests/
python -m coveralls --service=github

- name: Build sdist
run: |
# PEP 517 package builder from pypa
python -m build --sdist --outdir dist .

- uses: actions/upload-artifact@v2
with:
path: dist/*.tar.gz
Expand All @@ -91,11 +89,10 @@ jobs:
fetch-depth: '0'

- name: Build wheels
uses: joerick/cibuildwheel@v1.10.0
uses: pypa/cibuildwheel@v2.1.1
env:
CIBW_BUILD: cp36-* cp37-* cp38-* cp39-*
CIBW_BEFORE_BUILD: pip install numpy==1.19.* scipy==1.5.* cython==0.29.* setuptools
CIBW_TEST_REQUIRES: pytest scikit-learn
CIBW_TEST_EXTRAS: test
CIBW_TEST_COMMAND: pytest -v {project}/tests
with:
output-dir: dist
Expand Down
14 changes: 14 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 2

sphinx:
configuration: docs/source/conf.py

formats: all

python:
version: 3.7
install:
- method: pip
path: .
extra_requirements:
- doc
12 changes: 6 additions & 6 deletions MANIFEST.in
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
include README.md
include MANIFEST.in
include setup.py
include setup.cfg
prune *
graft tests
recursive-include pykrige *.py *.pyx *.pxd
recursive-include tests *.py *.txt *.asc
include LICENSE
recursive-exclude pykrige *.c *.cpp
include LICENSE README.md pyproject.toml setup.py setup.cfg
exclude CHANGELOG.md
global-exclude __pycache__ *.py[cod] .*
3 changes: 0 additions & 3 deletions docs/requirements.txt

This file was deleted.

8 changes: 0 additions & 8 deletions docs/requirements_doc.txt

This file was deleted.

63 changes: 63 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
[build-system]
requires = [
"setuptools>=42",
"wheel",
"setuptools_scm[toml]>=3.5",
"oldest-supported-numpy",
"scipy>=1.1.0,<2",
"Cython>=0.28.3,<3.0",
]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
write_to = "pykrige/_version.py"
write_to_template = "__version__ = '{version}'"
local_scheme = "no-local-version"
fallback_version = "0.0.0.dev0"

[tool.black]
target-version = [
"py36",
"py37",
"py38",
]

[tool.coverage]
[tool.coverage.run]
source = ["pykrige"]
omit = [
"*docs*",
"*examples*",
"*tests*",
]

[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"def __str__",
]

[tool.pylint]
[tool.pylint.master]
extension-pkg-whitelist = [
"numpy",
"scipy",
]
ignore = "_version.py"

[tool.pylint.message_control]
disable = [
"R0801",
]

[tool.pylint.reports]
output-format = "colorized"

[tool.pylint.design]
max-args = 20
max-locals = 50
max-branches = 30
max-statements = 80
max-attributes = 25
max-public-methods = 75
2 changes: 0 additions & 2 deletions requirements.txt

This file was deleted.

4 changes: 0 additions & 4 deletions requirements_setup.txt

This file was deleted.

5 changes: 0 additions & 5 deletions requirements_test.txt

This file was deleted.

81 changes: 80 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,82 @@
[metadata]
description-file = README.md
name = PyKrige
description = Kriging Toolkit for Python.
long_description = file: README.md
long_description_content_type = text/markdown
url = https://github.com/GeoStat-Framework/PyKrige
author = Benjamin S. Murphy, Sebastian Müller
author_email = info@geostat-framework.org
maintainer = Sebastian Mueller, Roman Yurchak
maintainer_email = info@geostat-framework.org
license = BSD-3-Clause
license_file = LICENSE
platforms = any
classifiers =
Development Status :: 5 - Production/Stable
Intended Audience :: Developers
Intended Audience :: End Users/Desktop
Intended Audience :: Science/Research
License :: OSI Approved :: BSD License
Natural Language :: English
Operating System :: MacOS
Operating System :: MacOS :: MacOS X
Operating System :: Microsoft
Operating System :: Microsoft :: Windows
Operating System :: POSIX
Operating System :: Unix
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Topic :: Scientific/Engineering
Topic :: Scientific/Engineering :: GIS
Topic :: Utilities
project_urls =
Documentation = https://pykrige.readthedocs.io
Source = https://github.com/GeoStat-Framework/PyKrige
Tracker = https://github.com/GeoStat-Framework/PyKrige/issues
Changelog = https://github.com/GeoStat-Framework/PyKrige/blob/main/CHANGELOG.md
Conda-Forge = https://anaconda.org/conda-forge/pykrige

[options]
packages = find:
install_requires =
numpy>=1.14.5,<2
scipy>=1.1.0,<2
python_requires = >=3.6
include_package_data = True
zip_safe = False

[options.packages.find]
exclude =
tests*
docs*

[options.extras_require]
doc =
gstools>=1.1.1,<2
pillow
scikit-learn>=0.19
m2r2>=0.2.8,<1
matplotlib>=3,<4
meshzoo>=0.7,<1
numpydoc>=1.1,<2
pykrige>=1.5,<2
pyvista>=0.31,<1
sphinx>=3,<4
sphinx-gallery>=0.8,<1
sphinx-rtd-theme>=0.5,<1
sphinxcontrib-napoleon
plot =
matplotlib>=3,<4
sklearn =
scikit-learn>=0.19
test =
coverage[toml]>=5.2.1,<6
pytest>=6.0,<7
pytest-cov>=2.11.0,<3
gstools>=1.1.1,<2
scikit-learn>=0.19
84 changes: 3 additions & 81 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
# -*- coding: utf-8 -*-
"""Kriging Toolkit for Python."""
import os
from setuptools import setup, find_packages, Extension
from setuptools import setup, Extension
from Cython.Build import cythonize
import numpy as np

HERE = os.path.abspath(os.path.dirname(__file__))

# cython extensions ###########################################################

CY_MODULES = []
Expand All @@ -26,86 +24,10 @@
)
EXT_MODULES = cythonize(CY_MODULES) # annotate=True

# This is an important part. By setting this compiler directive, cython will
# embed signature information in docstrings. Sphinx then knows how to extract
# and use those signatures.
# python setup.py build_ext --inplace --> then sphinx build
# embed signatures for sphinx
for ext_m in EXT_MODULES:
ext_m.cython_directives = {"embedsignature": True}

# setup #######################################################################

with open(os.path.join(HERE, "README.md"), encoding="utf-8") as f:
README = f.read()
with open(os.path.join(HERE, "requirements.txt"), encoding="utf-8") as f:
REQ = f.read().splitlines()
with open(os.path.join(HERE, "requirements_setup.txt"), encoding="utf-8") as f:
REQ_SETUP = f.read().splitlines()
with open(os.path.join(HERE, "requirements_test.txt"), encoding="utf-8") as f:
REQ_TEST = f.read().splitlines()
with open(os.path.join(HERE, "docs", "requirements_doc.txt"), encoding="utf-8") as f:
REQ_DOC = f.read().splitlines()

REQ_DEV = REQ_SETUP + REQ_TEST + REQ_DOC

DOCLINE = __doc__.split("\n")[0]
CLASSIFIERS = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: End Users/Desktop",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Operating System :: MacOS",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Operating System :: Unix",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: GIS",
"Topic :: Utilities",
]

setup(
name="PyKrige",
description=DOCLINE,
long_description=README,
long_description_content_type="text/markdown",
author="Benjamin S. Murphy",
author_email="bscott.murphy@gmail.com",
maintainer="Sebastian Mueller, Roman Yurchak",
maintainer_email="info@geostat-framework.org",
url="https://github.com/GeoStat-Framework/PyKrige",
license="BSD (3 clause)",
classifiers=CLASSIFIERS,
platforms=["Windows", "Linux", "Solaris", "Mac OS-X", "Unix"],
include_package_data=True,
python_requires=">=3.6",
use_scm_version={
"relative_to": __file__,
"write_to": "pykrige/_version.py",
"write_to_template": "__version__ = '{version}'",
"local_scheme": "no-local-version",
"fallback_version": "0.0.0.dev0",
},
setup_requires=REQ_SETUP,
install_requires=REQ,
extras_require={
"plot": ["matplotlib"],
"sklearn": ["scikit-learn>=0.19"],
"doc": REQ_DOC,
"test": REQ_TEST,
"dev": REQ_DEV,
},
packages=find_packages(exclude=["tests*", "docs*"]),
ext_modules=EXT_MODULES,
include_dirs=[np.get_include()],
)
setup(ext_modules=EXT_MODULES, include_dirs=[np.get_include()])