Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run tests on all supported python versions, add codecov badge, python… #66

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
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
35 changes: 0 additions & 35 deletions .github/workflows/build.yml

This file was deleted.

59 changes: 59 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: test

on:
push:
branches: # on all branches except `typos`
- '**'
- '!typos'
paths-ignore:
- 'docs/**'
- 'notebooks/**'
- 'paper/**'
- '.git*'
- 'README.md'
pull_request:
branches:
- '**'
schedule: # Every Monday at 07:00 UTC, 00:00 PT
- cron: '0 7 * * 1'

jobs:
build:
strategy:
matrix:
python-version: [ "3.9", "3.10" ]
os: [ubuntu-latest]
fail-fast: false

name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@master
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .

- name: Test and generate coverage report
run: |
pip install pytest
pip install pytest-cov
pytest --cov=./ --cov-report=xml

- uses: codecov/codecov-action@v4
with:
files: ./coverage.xml # optional
name: codecov-umbrella # optional
token: ${{ secrets.CODECOV_TOKEN }} # required

- name: Notify on failure
if: failure() # This step will only run if any previous step fails
run: |
echo "Build or tests failed. Please check the logs."
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
[![build](https://github.com/IMMM-SFA/tell/actions/workflows/build.yml/badge.svg)](https://github.com/IMMM-SFA/tell/actions/workflows/build.yml) [![DOI](https://zenodo.org/badge/305802399.svg)](https://zenodo.org/badge/latestdoi/305802399)
[![test](https://github.com/IMMM-SFA/tell/actions/workflows/test.yml/badge.svg)](https://github.com/IMMM-SFA/tell/actions/workflows/test.yml)
[![DOI](https://zenodo.org/badge/305802399.svg)](https://zenodo.org/badge/latestdoi/305802399)
[![codecov](https://codecov.io/gh/IMMM-SFA/tell/graph/badge.svg?token=URP1KWRI6U)](https://codecov.io/gh/IMMM-SFA/tell)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/tell?pypiBaseUrl=https%3A%2F%2Fpypi.org&logo=python&logoColor=yellow)](https://pypi.org/project/tell/)


## tell
Expand All @@ -17,7 +20,7 @@
### Install `tell`

`tell` is available via GitHub repository by using the pip install functionality. `tell` requires a Python version between 3.8 and 4.0 as well as a pip install to import the package. `tell` has been tested on
Windows and Mac platforms. (Note: For those installing on Windows, `tell` is supported by GeoPandas functionality. Please see suggestions for installing GeoPandas on Windows here:
Windows and Mac platforms. (Note: For those installing on Windows, `tell` is supported by GeoPandas functionality. Please see suggestions for installing GeoPandas on Windows here:
https://geopandas.org/en/stable/getting_started/install.html)

```bash
Expand All @@ -34,7 +37,7 @@ New to `tell`? Get familiar with what `tell` is all about in our [Getting Start

### User guide

Our [User Guide](https://immm-sfa.github.io/tell/user_guide.html) provides in-depth information on the key concepts of `tell` and how the model works.
Our [User Guide](https://immm-sfa.github.io/tell/user_guide.html) provides in-depth information on the key concepts of `tell` and how the model works.

### Contributing to `tell`

Expand All @@ -44,4 +47,4 @@ Whether you find a typo in the documentation, find a bug, or want to develop fun
The [API Reference](https://immm-sfa.github.io/tell/modules.html) contains a detailed description of the `tell` API. The reference describes how the methods work and which parameters can be used. It assumes that you have an understanding of the key concepts.

### Contact/Help
Need help with `tell` or have a comment? Please open a [new Issue](https://github.com/IMMM-SFA/tell/issues/new/choose) with your question/comments.
Need help with `tell` or have a comment? Please open a [new Issue](https://github.com/IMMM-SFA/tell/issues/new/choose) with your question/comments.