Skip to content

Commit

Permalink
Merge pull request #187 from phobson/readme-and-stuff
Browse files Browse the repository at this point in the history
updated readme and codecov things
  • Loading branch information
phobson authored Feb 26, 2024
2 parents 5127076 + 8e9d475 commit 2de2830
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 129 deletions.
27 changes: 13 additions & 14 deletions .github/workflows/check-test-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,24 @@ on:
branches: [ main ]

jobs:
run:
build:
runs-on: ubuntu-latest
name: Check Code Coverage
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.11
python-version: '3.11'
- name: Generate coverage report
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements_dev.txt ]; then pip install -r requirements_dev.txt; fi
coverage run --source wqio check_wqio.py --doctest-modules --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
# directory: ./coverage/reports/
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true
path_to_write_report: ./codecov_report.gz
coverage run --source wqio check_wqio.py --doctest-modules --cov --cov-report=xml
- name: Upload coverage reports to Codecov
run: |
# Replace `linux` below with the appropriate OS
# Options are `alpine`, `linux`, `macos`, `windows`
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov -t ${{ secrets.CODECOV_TOKEN }}
70 changes: 70 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# `wqio`: water qualiity inflow and outflow

[![Publish Python 🐍 distribution 📦 to PyPI](https://github.com/International-BMP-Database/wqio/actions/workflows/python-publish-pypi.yml/badge.svg)](https://github.com/International-BMP-Database/wqio/actions/workflows/python-publish-pypi.yml)
[![ruff 'n' stuff](https://github.com/International-BMP-Database/wqio/actions/workflows/black.yml/badge.svg)](https://github.com/International-BMP-Database/wqio/actions/workflows/black.yml)
[![Run coverage via codecov](https://github.com/International-BMP-Database/wqio/actions/workflows/check-test-coverage.yml/badge.svg)](https://github.com/International-BMP-Database/wqio/actions/workflows/check-test-coverage.yml)
[![Run basic unit tests](https://github.com/International-BMP-Database/wqio/actions/workflows/python-runtests-basic.yml/badge.svg)](https://github.com/International-BMP-Database/wqio/actions/workflows/python-runtests-basic.yml)
[![Run image comparison tests](https://github.com/International-BMP-Database/wqio/actions/workflows/python-runtests-img-comp.yml/badge.svg)](https://github.com/International-BMP-Database/wqio/actions/workflows/python-runtests-img-comp.yml)

Tools to visualize and compare water quality data collected at different monitoring locations.
Includes: bias-corrected and accelerated (BCA) bootstrapping, censored (non-detect) data imputation via regression-on-order statistics (ROS), and paired data analysis.

## Installation

`wqio` is pure python, so installation on any platform should be straight-forward

### Via pip

```shell
python -m pip install wqio
```

Or:

### From source

```shell
git clone [email protected]:International-BMP-Database/wqio.git
cd wqio
pip install -e .
```

## Running tests

### From an installed package

```python
import wqio
wqio.test()
```

### From the source tree

```shell
python check_wqio.py
```

## Releases

There are two Github actions that are run when tags are pushed.
The first builds and uploads to TestPyPI if the tag is in the form `v<major>.<minor>.<micro>/*/test`.

The second builds, uploads to PyPI, then signs the release and creates a Github release with a bunch of different assets if the tag is in the form `v<major>.<minor>.<micro>/release`.

To execute the builda, create a new tag ends with e.g., `/test` (i.e., `v0.6.3/test`) and push that.

If that works, create Yet Another tag that ends with `/release` (i.e., `v0.6.3/release`) and push that.

All in all, that workflow looks like this:

```shell
# get latest source
git switch main
git fetch upstream
git merge --ff-only upstream/main
git tag -a "v0.6.4/test" # add comment in text editor
git push upstream --tags
# watch, wait for CI to sucessfully build on TestPyPI
git tag -a "v0.6.4/release" # add comment in text editor
# watch, wait for CI to sucessfully build on actual PyPI
```
115 changes: 0 additions & 115 deletions readme.rst

This file was deleted.

0 comments on commit 2de2830

Please sign in to comment.