Skip to content

Commit

Permalink
chore: integrate with codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
ohmycoffe committed Oct 18, 2023
1 parent 2218b16 commit b2d99b7
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 2 deletions.
31 changes: 30 additions & 1 deletion .github/workflows/tests.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@ on:
types:
- opened
- synchronize

paths:
- "src/**"
- "tests/**"
- "pyproject.toml"
- "poetry.lock"
- ".github/**"
- "Makefile"
- "tox.ini"
jobs:
lint:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -51,3 +58,25 @@ jobs:
run: |
poetry install
poetry run pytest
test-coverage-report:
runs-on: ubuntu-latest
name: Generate a test-coverage report
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v2
with:
python-version: "3.11"
- name: Set up PDM
uses: pdm-project/setup-pdm@v3
- name: Install Poetry Action
uses: snok/[email protected]
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Run tests and collect coverage
run: |
poetry install
poetry run pytest --cov=src --cov-report=xml
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v3
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# pandas-validity

[![PyPI - Version](https://img.shields.io/pypi/v/pandas-validity)](https://pypi.org/project/pandas-validity/)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pandas-validity)
[![Test and lint](https://github.com/ohmycoffe/pandas-validity/actions/workflows/test.yaml/badge.svg?branch=main)](https://github.com/ohmycoffe/pandas-validity/actions/workflows/test.yaml?query=branch%3Amain)
[![codecov](https://codecov.io/gh/ohmycoffe/organize-photos/graph/badge.svg?token=PAN0F7B4E8)](https://codecov.io/gh/ohmycoffe/organize-photos)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Checked with mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](https://mypy-lang.org/)
[![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/)
![PyPI - License](https://img.shields.io/pypi/l/organize-photos)
## What is it?
**pandas-validity** is a Python library for validation of pandas DataFrames. It provides a `DataFrameValidator` class that serves as a context manager. Within this context, you can perform multiple validations and checks. Any encountered errors are collected and raised at the end of the process. The `DataFrameValidator` raises a `ValidationErrorsGroup` exception to summarize the errors.

Expand Down
6 changes: 6 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
coverage:
status:
project:
default:
target: 100%
threshold: 1%

0 comments on commit b2d99b7

Please sign in to comment.