Skip to content

Commit b9ce4be

Browse files
committed
organized test files, added contribution guide
1 parent d4f67b4 commit b9ce4be

11 files changed

+45
-20
lines changed

CONTRIBUTING.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Contribution guide <!-- omit in toc -->
2+
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.
3+
4+
Table of Contents:
5+
- [Dev environment](#dev-environment)
6+
- [Pre-commit](#pre-commit)
7+
- [Run tests](#run-tests)
8+
9+
# Dev environment
10+
* Install prerequisites from `dev-requirements.txt`:
11+
```bash
12+
pip install -r dev-requirements.txt
13+
```
14+
* Install `py-automapper` dependencies with poetry:
15+
```bash
16+
poetry install
17+
```
18+
19+
# Pre-commit
20+
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:
21+
```bash
22+
pre-commit install
23+
```
24+
After this code checks will run on `git commit` command.
25+
26+
If some of the `pre-commit` dependencies are not found make sure to activate appropriate poetry virtualenv. To check path to virtual environment run:
27+
```bash
28+
poetry env info -p
29+
```
30+
31+
Or run pre-commit manually:
32+
```
33+
poetry run pre-commit run --all-files
34+
```
35+
36+
# Run tests
37+
To run unit tests use command:
38+
```
39+
poetry run pytest tests/
40+
```

README.md

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,17 @@
1-
<img src="logo.png" align="left" style="width:128px; margin-right: 20px;" />
1+
<img src="logo.png" style="width:128px; margin-right: 20px;" />
22

33
# py-automapper
44

5-
**Version**
6-
1.2.0
7-
8-
**Author**
9-
anikolaienko
10-
11-
**Copyright**
12-
anikolaienko
13-
14-
**License**
15-
The MIT License (MIT)
16-
17-
**Last updated**
18-
7 Oct 2022
19-
20-
**Package Download**
21-
https://pypi.python.org/pypi/py-automapper
22-
235
**Build Status**
246
[![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)
257

26-
278
---
289

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

5234
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).
5335

36+
# Contribute
37+
Read [CONTRIBUTING.md](/CONTRIBUTING.md) guide.
38+
5439
# Usage
5540
Install package:
5641
```bash

tests/extensions/__init__.py

Whitespace-only 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 commit comments

Comments
 (0)