Skip to content

Commit

Permalink
docs: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ohmycoffe committed Oct 18, 2023
1 parent 8b8bb0e commit 68f21d7
Showing 1 changed file with 9 additions and 36 deletions.
45 changes: 9 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,45 +10,14 @@
![PyPI - License](https://img.shields.io/pypi/l/organize-photos)

## What is it?

**pandas-validity** is a Python library for the 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.

## Installation

You can easily install the latest released version using binary installers from the [Python Package Index (PyPI)](https://pypi.org/project/pandas-validity):

```sh
pip install pandas-validity
```

### Development Installation

**Prerequisites**: [poetry](https://python-poetry.org/) for environment management

The source code is currently hosted on GitHub at [ohmycoffe/pandas-validity](https://github.com/ohmycoffe/pandas-validity). To get the development version:

```shell
git clone [email protected]:ohmycoffe/pandas-validity.git
```

To install the project and development dependencies:

```shell
make install
```

To run tests:

```shell
make test
```

To view all possible commands, use:

```shell
make help
```

## Usage
```python
import pandas as pd
Expand Down Expand Up @@ -86,7 +55,6 @@ with DataFrameValidator(df) as validator:
```

**Output:**

```shell
Error occurred: (<class 'pandas_validity.exceptions.ValidationError'>) The dataframe has missing columns: ['E']
Error occurred: (<class 'pandas_validity.exceptions.ValidationError'>) The dataframe has redundant columns: ['D']
Expand All @@ -111,27 +79,32 @@ The library supports the following data types for validation:
- predefined: `"str"`, `"int"`, `"float"`,`"datetime"`, `"bool"`
- or any `Callable` that accepts a data `type/dtype` object and returns a boolean value to indicate the validation status - example: `pd.api.types.is_string_dtype`


## Development
**Prerequisites**: [poetry](https://python-poetry.org/) for environment management

The source code is currently hosted on GitHub at:
[https://github.com/ohmycoffe/pandas-validity](https://github.com/ohmycoffe/pandas-validity)
The source code is currently hosted on GitHub at [ohmycoffe/pandas-validity](https://github.com/ohmycoffe/pandas-validity). To get the development version:

```shell
git clone [email protected]:ohmycoffe/pandas-validity.git
```

To install the project and development dependencies:

```shell
make install
```

To run tests:

```shell
make test
```

To view all possible commands, use:

```shell
make
make help
```

## License
This project is licensed under the terms of the [MIT](LICENSE) license.

0 comments on commit 68f21d7

Please sign in to comment.