Skip to content

Commit

Permalink
feat: Add poetry configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
1ambda committed Sep 2, 2023
1 parent d88d0a0 commit 7421d10
Show file tree
Hide file tree
Showing 5 changed files with 1,548 additions and 6 deletions.
6 changes: 5 additions & 1 deletion .envrc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ pvenv=lakehouse
use python ${pyversion}
layout virtualenv ${pyversion} ${pvenv}
layout activate ${pvenv}-${pyversion}
pip install -q -r requirements.txt
poetry install

# Setup Git
pre-commit install


# Start
echo -e ""
Expand Down
34 changes: 33 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,40 @@
# pre-commit autoupdate
---

repos:
- repo: https://github.com/kynan/nbstripout
rev: 0.6.1
hooks:
- id: nbstripout
args: ["--extra-keys", "metadata.pycharm"]
files: ^notebook\/.*\.ipynb$
args: ["--extra-keys", "metadata.pycharm"]

- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
- id: black
files: ^(dags|dbts)/
types: [python]
args: [--line-length=100]

- repo: https://github.com/pycqa/flake8
rev: 6.1.0
hooks:
- id: flake8
files: ^(dags|dbts)/
types: [python]
additional_dependencies: [
'flake8-blind-except',
'flake8-docstrings',
'flake8-bugbear',
'flake8-comprehensions',
'flake8-docstrings',
'flake8-implicit-str-concat',
'pydocstyle>=5.0.0',
]

- repo: https://github.com/commitizen-tools/commitizen
rev: 3.7.0
hooks:
- id: commitizen
stages: [commit-msg]
16 changes: 12 additions & 4 deletions notebook/spark-iceberg.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"cell_type": "code",
"execution_count": null,
"id": "caff0a1b-3ecb-405a-872c-07ae3040b571",
"metadata": {},
"metadata": {
"is_executing": true
},
"outputs": [],
"source": [
"from pyspark.sql import SparkSession\n",
Expand All @@ -17,7 +19,9 @@
"cell_type": "code",
"execution_count": null,
"id": "d4efcffd-dc42-43b4-93c6-053aadc16ee2",
"metadata": {},
"metadata": {
"is_executing": true
},
"outputs": [],
"source": [
"spark.sql(\"\"\"\n",
Expand All @@ -29,7 +33,9 @@
"cell_type": "code",
"execution_count": null,
"id": "772be00b-9223-46c2-a927-6e967ad4da78",
"metadata": {},
"metadata": {
"is_executing": true
},
"outputs": [],
"source": [
"spark.sql(\"\"\"\n",
Expand All @@ -47,7 +53,9 @@
"cell_type": "code",
"execution_count": null,
"id": "cff13884-ff88-43a5-a42b-1fc91a95889b",
"metadata": {},
"metadata": {
"is_executing": true
},
"outputs": [],
"source": []
}
Expand Down
Loading

0 comments on commit 7421d10

Please sign in to comment.