Skip to content

Commit

Permalink
add coverage report. update README
Browse files Browse the repository at this point in the history
  • Loading branch information
patel-zeel committed Aug 24, 2023
1 parent acbe0dc commit 0713e2b
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 23 deletions.
27 changes: 21 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
# This workflow will install Python dependencies, run tests and produce coveralls report.
# Inspired from https://github.com/wesselb/stheno/blob/master/.github/workflows/ci.yml

name: Tests

Expand All @@ -10,8 +10,7 @@ on:
branches: [ master ]

jobs:
build:

test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -33,6 +32,22 @@ jobs:
continue-on-error: true
run: |
pre-commit run --all-files
- name: Test with pytest
- name: Test
run: |
pytest -s
pytest -v --cov=stheno --cov-report term-missing
coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: ${{ matrix.test-name }}
COVERALLS_PARALLEL: true

finish:
name: Finish Coveralls
needs: test
runs-on: ubuntu-latest
steps:
- name: Finish Coveralls
uses: coverallsapp/github-action@v1
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true
29 changes: 12 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![Tests](https://github.com/sustainability-lab/polire/actions/workflows/tests.yml/badge.svg)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

[![Coverage](https://coveralls.io/repos/github/sustainability-lab/polire/badge.svg?branch=master)](https://coveralls.io/github/sustainability-lab/polire?branch=master)

## Polire

Expand All @@ -9,14 +9,14 @@ pip install polire
```


The word "interpolation" has Latin origin and is composed of two words - Inter meaning between and Polire meaning to polish.
The word "interpolation" has a Latin origin and is composed of two words - Inter, meaning between, and Polire, meaning to polish.


This repository is a collection of several spatial interpolation algorithms.

## Examples
Please refer to [the documentation](https://sustainability-lab.github.io/polire/) to check out practical examples on real datasets.

To checkout a practical example of how to use this library, please refer to [the documentation](https://sustainability-lab.github.io/polire/).
### Minimal example of interpolation
```python
import numpy as np
Expand Down Expand Up @@ -50,18 +50,21 @@ from polire import (
)
```

### Use GP kernels from GPy and regressors from sklearn (temporary unavailable)
### Use GP kernels from GPy (temporarily unavailable)
```python
from sklearn.linear_model import LinearRegression # or any Scikit-learn regressor
from GPy.kern import Matern32 # or any other GPy kernel

from polire import GP, CustomInterpolator

# GP model
model = GP(Matern32(input_dim=2))
```

### Regressors from sklearn
```py
from sklearn.linear_model import LinearRegression # or any Scikit-learn regressor
from polire import GP, CustomInterpolator

# Sklearn model
model = CustomInterpolator(LinearRegression(normalize = True))
model = CustomInterpolator(LinearRegression())
```

### Extract spatial features from spatio-temporal dataset
Expand All @@ -75,17 +78,9 @@ Features = spatial.fit_transform(X, y)
Features_new = spatial.transform(X_new)
```

## More info

Contributors: [S Deepak Narayanan](https://github.com/sdeepaknarayanan), [Zeel B Patel*](https://github.com/patel-zeel), [Apoorv Agnihotri](https://github.com/apoorvagnihotri), and [Nipun Batra*](https://github.com/nipunbatra) (People with * are currently active contributers).

This project is a part of Sustainability Lab at IIT Gandhinagar.

Acknowledgement to sklearn template for helping to package into a PiPy package.

## Citation

If you use this code, please cite the following paper:
If you use this library, please cite the following paper:

```
@inproceedings{10.1145/3384419.3430407,
Expand Down

0 comments on commit 0713e2b

Please sign in to comment.