-
Notifications
You must be signed in to change notification settings - Fork 30
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 #174 from knaaptime/newinfra
- Loading branch information
Showing
22 changed files
with
231 additions
and
2,316 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
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,57 +1,59 @@ | ||
name: Unit Tests | ||
on: | ||
push: | ||
branches: | ||
- "*" | ||
pull_request: | ||
branches: | ||
- "*" | ||
schedule: | ||
- cron: "0 0 * * 0" | ||
name: Unit Tests | ||
on: | ||
push: | ||
branches: | ||
- '*' | ||
pull_request: | ||
branches: | ||
- '*' | ||
schedule: | ||
- cron: '59 23 * * *' | ||
|
||
jobs: | ||
unittests: | ||
name: CI (${{ matrix.os }}-${{ matrix.environment-file }}) | ||
runs-on: ${{ matrix.os }} | ||
continue-on-error: true | ||
timeout-minutes: 45 | ||
strategy: | ||
matrix: | ||
os: ["ubuntu-latest", "macos-latest", "windows-latest"] | ||
environment-file: [.ci/37.yml, .ci/38.yml, .ci/39.yml] | ||
fail-fast: [false] | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/cache@v2 | ||
env: | ||
CACHE_NUMBER: 0 | ||
with: | ||
path: ~/conda_pkgs_dir | ||
key: ${{ matrix.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles(matrix.environment-file) }} | ||
- uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
miniconda-version: "latest" | ||
mamba-version: "*" | ||
channels: conda-forge | ||
channel-priority: true | ||
auto-update-conda: false | ||
auto-activate-base: false | ||
environment-file: ${{ matrix.environment-file }} | ||
activate-environment: test | ||
use-only-tar-bz2: true | ||
- run: conda info --all | ||
- run: conda list | ||
- run: conda config --show-sources | ||
- run: conda config --show | ||
- run: pip install -e . --no-deps --force-reinstall | ||
- name: Pytest | ||
run: py.test -v tobler --cov=tobler --cov-report=xml | ||
- name: codecov (${{ matrix.os }}, ${{ matrix.environment-file }}) | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
file: ./coverage.xml | ||
name: tobler-codecov | ||
jobs: | ||
unittests: | ||
name: CI (${{ matrix.os }}-${{ matrix.environment-file }}) | ||
runs-on: ${{ matrix.os }} | ||
continue-on-error: false | ||
timeout-minutes: 45 | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
environment-file: [ .ci/39.yml, .ci/310.yml, .ci/311.yml] | ||
fail-fast: false | ||
|
||
steps: | ||
- name: checkout repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: setup micromamba | ||
uses: mamba-org/provision-with-micromamba@main | ||
with: | ||
environment-file: ${{ matrix.environment-file }} | ||
micromamba-version: 'latest' | ||
|
||
- name: reinstall tobler - bash | ||
shell: bash -l {0} | ||
run: pip install -e . --no-deps --force-reinstall | ||
if: matrix.os != 'windows-latest' | ||
|
||
- name: reinstall tobler - powershell | ||
shell: powershell | ||
run: pip install -e . --no-deps --force-reinstall | ||
if: matrix.os == 'windows-latest' | ||
|
||
- name: run pytest - bash | ||
shell: bash -l {0} | ||
run: pytest -v tobler --cov=tobler --cov-report=xml | ||
if: matrix.os != 'windows-latest' | ||
|
||
- name: run pytest - powershell | ||
shell: powershell | ||
run: pytest -v tobler --cov=tobler --cov-report=xml | ||
if: matrix.os == 'windows-latest' | ||
|
||
- name: codecov | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
file: ./coverage.xml | ||
name: tobler-codecov |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
[build-system] | ||
requires = ["setuptools>=61.0", "setuptools_scm[toml]>=6.2"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.setuptools_scm] | ||
|
||
[project] | ||
name = "tobler" | ||
dynamic = ["version"] | ||
authors = [ | ||
{ name = "Eli Knaap", email = "[email protected]" }, | ||
{ name = "Serge Rey", email = "[email protected]" }, | ||
] | ||
maintainers = [{ name = "pysal contributors" }] | ||
license = { text = "BSD 3-Clause" } | ||
description = "Tobler is a Python library for areal interpolation." | ||
keywords = [ | ||
"dasymetric mapping, spatial analysis, interpolation, change of support" | ||
] | ||
readme = { text = """\ | ||
Spatial interpolation, Dasymetric Mapping, & Change of Support" | ||
""", content-type = "text/x-rst" } | ||
classifiers = [ | ||
"Programming Language :: Python :: 3", | ||
"License :: OSI Approved :: BSD License", | ||
"Operating System :: OS Independent", | ||
"Intended Audience :: Science/Research", | ||
"Topic :: Scientific/Engineering :: GIS", | ||
] | ||
requires-python = ">=3.9" | ||
dependencies = [ | ||
"numpy", | ||
"pandas", | ||
"geopandas >=0.13", | ||
"rasterio", | ||
"scipy", | ||
"statsmodels", | ||
"rasterstats", | ||
"libpysal", | ||
"tqdm", | ||
"joblib" | ||
] | ||
|
||
[project.urls] | ||
Home = "https://github.com/pysal/tobler/" | ||
Repository = "https://github.com/pysal/tobler" | ||
|
||
[project.optional-dependencies] | ||
dev = ["pre-commit"] | ||
docs = [ | ||
"nbsphinx", | ||
"numpydoc", | ||
"pandoc", | ||
"sphinx", | ||
"sphinxcontrib-bibtex", | ||
"sphinx_bootstrap_theme", | ||
"mkdocs-jupyter", | ||
"myst-parser" | ||
] | ||
tests = [ | ||
"codecov", | ||
"coverage", | ||
"pytest", | ||
"pytest-mpl", | ||
"pytest-cov", | ||
"watermark", | ||
"h3", | ||
"astropy" | ||
] | ||
|
||
[tool.setuptools.packages.find] | ||
include = ["tobler", "tobler.*"] | ||
|
||
[tool.black] | ||
line-length = 88 | ||
|
||
[tool.ruff] | ||
line-length = 88 | ||
select = ["E", "F", "W", "I", "UP", "N", "B", "A", "C4", "SIM", "ARG"] | ||
target-version = "py39" | ||
ignore = [ | ||
"B006", | ||
"B008", | ||
"B009", | ||
"B010", | ||
"C408", | ||
"E731", | ||
"F401", | ||
"F403", | ||
"N803", | ||
"N806", | ||
"N999", | ||
"UP007" | ||
] | ||
exclude = ["tobler/tests/*", "docs/*"] | ||
|
||
[tool.coverage.run] | ||
source = ["./tobler"] | ||
|
||
[tool.coverage.report] | ||
exclude_lines = [ | ||
"if self.debug:", | ||
"pragma: no cover", | ||
"raise NotImplementedError", | ||
"except ModuleNotFoundError:", | ||
"except ImportError", | ||
] | ||
ignore_errors = true | ||
omit = ["tobler/tests/*", "docs/conf.py"] |
Oops, something went wrong.