Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 41 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
dev.ipynb
.ruff_cache
.vscode

tmp/

# Byte-compiled / optimized / DLL files
__pycache__/
Expand All @@ -22,7 +26,6 @@ parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
Expand Down Expand Up @@ -52,6 +55,7 @@ coverage.xml
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
Expand All @@ -74,17 +78,20 @@ instance/
docs/_build/

# PyBuilder
.pybuilder/
target/

# Notebook Checkpoints
.ipynb_checkpoints/
# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
Expand All @@ -93,7 +100,22 @@ ipython_config.py
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
Expand Down Expand Up @@ -128,4 +150,17 @@ venv.bak/
dmypy.json

# Pyre type checker
.pyre/
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
22 changes: 22 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
default_language_version:
python: python3
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
args: [--allow-multiple-documents]
- id: check-added-large-files
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.3
hooks:
- id: ruff
types_or: [python, pyi, jupyter]
args: [--fix, --exit-non-zero-on-fix]
- id: ruff
args: ["check", "--select", "I", "--fix"]
types_or: [python, pyi, jupyter]
- id: ruff-format
types_or: [python, pyi, jupyter]
13 changes: 8 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter"
},
"python.formatting.provider": "none"
}
"recommendations": [
"ms-python.vscode-pylance",
"ms-python.black-formatter",
"ms-python.isort",
"charliermarsh.ruff",
"redhat.vscode-yaml"
]
}
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.PHONY: check install
check:
pre-commit run --all-files

install:
pip install -r ./requirements-dev.txt
pre-commit install
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

**yellowduck** is the data science toolbox for everyone. To be precise, for the lazy man like me!

Actually, **yellowduck** is like a sandbox library for me. If I found something great I will surely add it in **yellowduck**.
Actually, **yellowduck** is like a sandbox library for me. If I found something great I will surely add it in **yellowduck**.

## Main Features

Expand Down Expand Up @@ -57,4 +57,4 @@ Create New Issue [here](https://github.com/PCP55/yellowduck-dev/issues) and I wi

---------------------------------------

> This library was inspired by [kora](https://github.com/airesearch-in-th/kora/tree/master/kora), A collection of tools to make programming on Google Colab easier.
> This library was inspired by [kora](https://github.com/airesearch-in-th/kora/tree/master/kora), A collection of tools to make programming on Google Colab easier.
16 changes: 8 additions & 8 deletions examples/etc/id_card_validator.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
"source": [
"# Passed\n",
"\n",
"id = '1234567890121'\n",
"id = \"1234567890121\"\n",
"\n",
"IDValidator(id=id, id_type = NationalThaiIDCard()).validate()"
"IDValidator(id=id, id_type=NationalThaiIDCard()).validate()"
]
},
{
Expand All @@ -52,9 +52,9 @@
"source": [
"# Passed\n",
"\n",
"id = '1-2345-67890-12-1'\n",
"id = \"1-2345-67890-12-1\"\n",
"\n",
"IDValidator(id=id, id_type = NationalThaiIDCard()).validate()"
"IDValidator(id=id, id_type=NationalThaiIDCard()).validate()"
]
},
{
Expand All @@ -76,9 +76,9 @@
"source": [
"# Failed\n",
"\n",
"id = '1-2345-67890-12-2'\n",
"id = \"1-2345-67890-12-2\"\n",
"\n",
"IDValidator(id=id, id_type = NationalThaiIDCard()).validate()"
"IDValidator(id=id, id_type=NationalThaiIDCard()).validate()"
]
},
{
Expand All @@ -103,9 +103,9 @@
"source": [
"# Invalid ID\n",
"\n",
"id = '123456789022'\n",
"id = \"123456789022\"\n",
"\n",
"IDValidator(id=id, id_type = NationalThaiIDCard()).validate()"
"IDValidator(id=id, id_type=NationalThaiIDCard()).validate()"
]
}
],
Expand Down
Loading