Skip to content

Commit 4855ea9

Browse files
author
Nathan Richard
committed
feat: pydantic-csv
1 parent 2dc71be commit 4855ea9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1033
-1884
lines changed

.github/FUNDING.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

.gitignore

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,28 @@
1-
__pycache__
2-
*.pyc
3-
.idea
1+
# Environments
2+
.env
3+
.venv
44
env/
5+
venv/
6+
ENV/
7+
env.bak/
8+
venv.bak/
9+
10+
# Cache
11+
**/__pycache__
12+
.dccache
13+
14+
# PyCharm
15+
.idea/*
16+
17+
# Visual Studio Code
18+
.vscode/*
19+
*.code-workspace
20+
21+
# Local History for Visual Studio Code
22+
.history/
23+
24+
# other
25+
*.pyc
526
*.swo
627
*.swp
728
*.*~
@@ -15,7 +36,5 @@ docs
1536
build
1637
dist
1738
.eggs
18-
.vscode
1939
gmon.out
2040
.vim
21-
pyproject.toml

.pre-commit-config.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
repos:
2+
# update certain features to python 3.9 features
3+
- repo: https://github.com/asottile/pyupgrade
4+
rev: v3.16.0
5+
hooks:
6+
- id: pyupgrade
7+
args:
8+
- --py39-plus
9+
- --keep-runtime-typing
10+
11+
# useful pre-commit hooks
12+
- repo: https://github.com/pre-commit/pre-commit-hooks
13+
rev: v4.6.0
14+
hooks:
15+
- id: check-ast
16+
- id: check-yaml
17+
- id: check-toml
18+
- id: end-of-file-fixer
19+
- id: trailing-whitespace
20+
21+
# import statement sorter
22+
- repo: https://github.com/PyCQA/isort
23+
rev: 5.13.2
24+
hooks:
25+
- id: isort
26+
name: isort (python)
27+
args:
28+
- --profile=black
29+
30+
# code formatter
31+
- repo: https://github.com/psf/black
32+
rev: 24.4.2
33+
hooks:
34+
- id: black
35+
args:
36+
- --line-length=120
37+
- --target-version=py39
38+
39+
# code quality analysis
40+
- repo: https://github.com/PyCQA/pylint
41+
rev: v3.2.4
42+
hooks:
43+
- id: pylint
44+
name: pylint
45+
args:
46+
- --disable=E0401
47+
- --disable=too-many-arguments
48+
- --disable=too-few-public-methods
49+
- --max-line-length=120
50+
- --recursive=y
51+
- --ignore-paths=venv*,tests*

.travis.yml

Lines changed: 0 additions & 9 deletions
This file was deleted.

AUTHORS.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@
22

33
## Development Lead
44

5-
* Daniel Furtado <[email protected]>
5+
* Nathan Richard <[email protected]>
66

77
## Contributors
88

9-
* Nick Schober
10-
* Zoltan Ivanfi
11-
* Alec Benzer
12-
* Clint Byrum
13-
* @johnthangen
9+
* Be the first to contribute to this repo
1410

15-
See complete list at: https://github.com/dfurtado/dataclass-csv/graphs/contributors
11+
## Special Thanks
12+
* Daniel Furtado ([github](https://github.com/dfurtado)) and his python package 'dataclass-csv' ([pypi](https://pypi.org/project/dataclass-csv/) | [github](https://github.com/dfurtado/dataclass-csv)). The most of the Codebase and Documentation is from him and just adjusted for using pydantic.BaseModel.
13+
* Daniel Seifert ([github](https://github.com/dfseifert)) for the guidance with building a pyproject and reviewing my code <3

CONTRIBUTING.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
I love to work together with people so if you have an excellent idea for a feature, improvements or maybe you found
44
a bug. Please, don't hesitate in adding an issue, so we can discuss and find a good solution together.
55

6-
If you never participated in any open-source project before it is even better! I can help you through the process. The
7-
important thing is to get more people involved in the Python community. So, don't be shy!
8-
96
## Getting started
107

118
The best way to get started is to look at the issues section and see if the bug or feature you are planning to work with
@@ -52,9 +49,10 @@ If you get an issue to work on, then you can:
5249
## Before you submit a pull request
5350

5451
- Make sure to add unit tests (if applicable)
55-
- Make sure all tests are passing
56-
- Run a code formatter. This project uses black, you can run the command: `black -l79 -N -S ./dataclass_csv`
52+
- Make sure all tests are passing (Note that the CSV files have to use \r\n as newline)
53+
- Run a code formatter. This project uses black, you can run the command: `black -l 120 -t py39 ./pydantic_csv`
5754
- Add docstrings for new functions and classes.
55+
- Make sure you follow the [PEP 8](https://pep8.org/) Style Guide (run the pre-commit)
5856

5957

6058

HISTORY.md

Lines changed: 1 addition & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,5 @@
11
# History
22

3-
### 0.1.0 (2018-11-25)
3+
### 0.1.0 (2024-06-28)
44

55
* First release on PyPI.
6-
7-
### 0.1.1 (2018-11-25)
8-
9-
* Documentation fixes.
10-
11-
### 0.1.2 (2018-11-25)
12-
13-
* Documentation fixes.
14-
15-
### 0.1.3 (2018-11-26)
16-
17-
* Bug fixes
18-
* Removed the requirement of setting the dataclass init to `True`
19-
20-
### 0.1.5 (2018-11-29)
21-
22-
* Support for parsing datetime values.
23-
* Better handling when default values are set to `None`
24-
25-
### 0.1.6 (2018-12-01)
26-
27-
* Added support for reader default values from the default property of the `dataclasses.field`.
28-
* Added support for allowing string values with only white spaces in a class level using the `@accept_whitespaces` decorator or through the `dataclasses.field` metadata.
29-
* Added support for specifying date format using the `dataclasses.field` metadata.
30-
31-
### 0.1.7 (2018-12-01)
32-
33-
* Added support for default values from `default_factory` in the field's metadata. This allows adding mutable default values to the dataclass properties.
34-
35-
### 1.0.0 (2018-12-16)
36-
37-
* When a data does not pass validation it shows the line number in the CSV file where the data contain errors.
38-
* Improved error handling.
39-
* Changed the usage of the `@accept_whitespaces` decorator.
40-
* Updated documentation.
41-
42-
### 1.0.1 (2019-01-29)
43-
44-
* Fixed issue when parsing headers on a CSV file with trailing white spaces.
45-
46-
### 1.1.0 (2019-02-17)
47-
48-
* Added support for boolean values.
49-
* Docstrings
50-
51-
### 1.1.1 (2019-02-17)
52-
53-
* Documentation fixes.
54-
55-
### 1.1.2 (2019-02-17)
56-
57-
* Documentation fixes.
58-
59-
### 1.1.3 (2020-03-01)
60-
61-
* Handle properties with init set to False
62-
* Handle Option type annotation
63-
64-
### 1.2.0 (2021-03-02)
65-
66-
* Introduction of a DataclassWriter
67-
* Added type hinting to external API
68-
* Documentation updates
69-
* Bug fixes
70-
71-
## 1.3.0 (2021-04-10)
72-
73-
* Included stub files
74-
* check if the CSV file has duplicated header values
75-
* Fixed issues #22 and #33
76-
* code cleanup
77-
78-
## 1.4.0 (2021-12-13)
79-
80-
* Bug fixes
81-
* Support for date types

LICENSE

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
BSD License
42

53
Copyright (c) 2018, Daniel Furtado
@@ -29,4 +27,3 @@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
2927
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
3028
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
3129
OF THE POSSIBILITY OF SUCH DAMAGE.
32-

MANIFEST.in

Lines changed: 0 additions & 11 deletions
This file was deleted.

Pipfile

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)