Skip to content

Commit

Permalink
organized test files, added contribution guide
Browse files Browse the repository at this point in the history
  • Loading branch information
anikolaienko committed Nov 13, 2022
1 parent d4f67b4 commit b9ce4be
Show file tree
Hide file tree
Showing 11 changed files with 45 additions and 20 deletions.
40 changes: 40 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Contribution guide <!-- omit in toc -->
Any contribution is welcome. If you noticed a bug or have a feature idea create a new Issue in [Github Issues](https://github.com/anikolaienko/py-automapper/issues). For small fixes it's enough to create PR with description.

Table of Contents:
- [Dev environment](#dev-environment)
- [Pre-commit](#pre-commit)
- [Run tests](#run-tests)

# Dev environment
* Install prerequisites from `dev-requirements.txt`:
```bash
pip install -r dev-requirements.txt
```
* Install `py-automapper` dependencies with poetry:
```bash
poetry install
```

# Pre-commit
This project is using `pre-commit` checks to format and verify code. Same checks are used on CI as well. Activate `pre-commit` for your local setup:
```bash
pre-commit install
```
After this code checks will run on `git commit` command.

If some of the `pre-commit` dependencies are not found make sure to activate appropriate poetry virtualenv. To check path to virtual environment run:
```bash
poetry env info -p
```

Or run pre-commit manually:
```
poetry run pre-commit run --all-files
```

# Run tests
To run unit tests use command:
```
poetry run pytest tests/
```
25 changes: 5 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,17 @@
<img src="logo.png" align="left" style="width:128px; margin-right: 20px;" />
<img src="logo.png" style="width:128px; margin-right: 20px;" />

# py-automapper

**Version**
1.2.0

**Author**
anikolaienko

**Copyright**
anikolaienko

**License**
The MIT License (MIT)

**Last updated**
7 Oct 2022

**Package Download**
https://pypi.python.org/pypi/py-automapper

**Build Status**
[![Main branch status](https://github.com/anikolaienko/py-automapper/actions/workflows/run_code_checks.yml/badge.svg?branch=main)](https://github.com/anikolaienko/py-automapper/actions?query=branch%3Amain)


---

Table of Contents:
- [py-automapper](#py-automapper)
- [Versions](#versions)
- [About](#about)
- [Contribute](#contribute)
- [Usage](#usage)
- [Different field names](#different-field-names)
- [Overwrite field value in mapping](#overwrite-field-value-in-mapping)
Expand All @@ -51,6 +33,9 @@ Inspired by: [object-mapper](https://github.com/marazt/object-mapper)

The major advantage of py-automapper is its extensibility, that allows it to map practically any type, discover custom class fields and customize mapping rules. Read more in [documentation](https://anikolaienko.github.io/py-automapper).

# Contribute
Read [CONTRIBUTING.md](/CONTRIBUTING.md) guide.

# Usage
Install package:
```bash
Expand Down
Empty file added tests/extensions/__init__.py
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit b9ce4be

Please sign in to comment.