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
14 changes: 7 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ci:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # v6.0.0
rev: v6.0.0 # v6.0.0
hooks:
- id: check-json
types: [file] # override `types: [json]`
Expand All @@ -24,33 +24,33 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/tox-dev/pyproject-fmt
rev: a007bb7dd9043d022292401abc3061cb1906b4bc # v2.21.2
rev: v2.23.0 # v2.21.2
hooks:
- id: pyproject-fmt
- repo: https://github.com/abravalheri/validate-pyproject
rev: 4b2e70d08cb2ccd26d1fba73588de41c7a5d50b7 # v0.25
rev: v0.25 # v0.25
hooks:
- id: validate-pyproject
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 5e2fb545eba1ea9dc051f6f962d52fe8f76a9794 # v0.15.13
rev: v0.15.15 # v0.15.13
hooks:
- id: ruff-check
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
- repo: https://github.com/sphinx-contrib/sphinx-lint
rev: c883505f64b59c3c5c9375191e4ad9f98e727ccd # v1.0.2
rev: v1.0.2 # v1.0.2
hooks:
- id: sphinx-lint
types: [rst]
- repo: https://github.com/adamchainz/blacken-docs
rev: fda77690955e9b63c6687d8806bafd56a526e45f # 1.20.0
rev: 1.20.0 # 1.20.0
hooks:
- id: blacken-docs
args: [--line-length=79]
additional_dependencies:
- black
- repo: https://github.com/codespell-project/codespell
rev: 2ccb47ff45ad361a21071a7eedda4c37e6ae8c5a # v2.4.2
rev: v2.4.2 # v2.4.2
hooks:
- id: codespell
args: [--toml pyproject.toml]
10 changes: 5 additions & 5 deletions docs/clean-prep/scikit-learn-reprocessing.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@
"metadata": {},
"outputs": [],
"source": [
"from datetime import datetime\n",
"\n",
"import numpy as np\n",
"import pandas as pd\n",
"\n",
Expand All @@ -62,7 +60,9 @@
"metadata": {},
"outputs": [],
"source": [
"hvac = pd.read_csv(\"https://raw.githubusercontent.com/kjam/data-cleaning-101/master/data/HVAC_with_nulls.csv\")"
"hvac = pd.read_csv(\n",
" \"https://raw.githubusercontent.com/kjam/data-cleaning-101/master/data/HVAC_with_nulls.csv\"\n",
")"
]
},
{
Expand Down Expand Up @@ -336,7 +336,7 @@
"metadata": {},
"outputs": [],
"source": [
"hvac[\"TargetTemp\"], hvac[\"SystemAge\"] = transformed[:,0], transformed[:,1]"
"hvac[\"TargetTemp\"], hvac[\"SystemAge\"] = transformed[:, 0], transformed[:, 1]"
]
},
{
Expand Down Expand Up @@ -583,7 +583,7 @@
}
],
"source": [
"hvac[\"MinMaxScaledTemp\"] = temp_minmax[:,0]\n",
"hvac[\"MinMaxScaledTemp\"] = temp_minmax[:, 0]\n",
"hvac[\"MinMaxScaledTemp\"].head()"
]
},
Expand Down
2 changes: 0 additions & 2 deletions docs/data-processing/apis/fastapi/example.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ Erstellt die Datei :file:`main.py` mit diesem Inhalt:

from fastapi import FastAPI


app = FastAPI()


Expand Down Expand Up @@ -81,7 +80,6 @@ zu erhalten:

from fastapi import FastAPI


app = FastAPI()


Expand Down
1 change: 0 additions & 1 deletion docs/data-processing/intake/data-engineers.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1128,7 +1128,6 @@
}
],
"source": [
"import hvplot.pandas\n",
"import intake\n",
"\n",
"\n",
Expand Down
13 changes: 2 additions & 11 deletions docs/data-processing/intake/gui.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5110,24 +5110,15 @@
"intake.output_notebook()\n",
"\n",
"us_crime.plot.bivariate(\n",
" \"Burglary rate\",\n",
" \"Property crime rate\",\n",
" legend=False,\n",
" width=500,\n",
" height=400\n",
" \"Burglary rate\", \"Property crime rate\", legend=False, width=500, height=400\n",
") * us_crime.plot.scatter(\n",
" \"Burglary rate\",\n",
" \"Property crime rate\",\n",
" color=\"black\",\n",
" size=15,\n",
" legend=False,\n",
") + us_crime.plot.table(\n",
" [\n",
" \"Burglary rate\",\n",
" \"Property crime rate\"\n",
" ],\n",
" width=350,\n",
" height=350\n",
" [\"Burglary rate\", \"Property crime rate\"], width=350, height=350\n",
")"
]
},
Expand Down
2 changes: 0 additions & 2 deletions docs/data-processing/postgresql/sqlalchemy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ Datenbankverbindung

from sqlalchemy import create_engine


engine = create_engine("postgresql:///example", echo=True)

Datenmodell
Expand All @@ -56,7 +55,6 @@ Datenmodell
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import relationship


Base = declarative_base()


Expand Down
1 change: 0 additions & 1 deletion docs/data-processing/serialisation-formats/toml/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ Beispiel

import toml


config = toml.load("pyproject.toml")

.. seealso::
Expand Down
10 changes: 5 additions & 5 deletions docs/data-processing/serialisation-formats/toml/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ line-length = 79

[tool.isort]
atomic = true
force_grid_wrap = 0
multi_line_output = 3
use_parentheses = true
include_trailing_comma = true
force_grid_wrap = 0
lines_after_imports = 2
lines_between_types = 1
multi_line_output = 3
not_skip = "__init__.py"
use_parentheses = true
known_first_party = [ "MY_FIRST_MODULE", "MY_SECOND_MODULE" ]
known_third_party = [ "mpi4py", "numpy", "requests" ]
known_first_party = [ "MY_FIRST_MODULE", "MY_SECOND_MODULE" ]
not_skip = "__init__.py"
3 changes: 0 additions & 3 deletions docs/performance/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ Beispieldaten können wir uns erstellen mit:

from sklearn.datasets import make_blobs


points, labels_true = make_blobs(
n_samples=1000, centers=3, random_state=0, cluster_std=0.60
)
Expand Down Expand Up @@ -136,7 +135,6 @@ k-Means-Algorithmus gibt es sogar gleich zwei Implementierungen:

from sklearn.cluster import KMeans


KMeans(10).fit_predict(points)

* `dask_ml.cluster.KMeans
Expand All @@ -146,7 +144,6 @@ k-Means-Algorithmus gibt es sogar gleich zwei Implementierungen:

from dask_ml.cluster import KMeans


KMeans(10).fit(points).predict(points)

Gegen diese bestehenden Lösungen könnte bestenfalls sprechen, dass sie einen
Expand Down
2 changes: 1 addition & 1 deletion docs/workspace/pandas/date-time.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@
}
],
"source": [
"(pd.to_datetime(uts, unit='s').tz_localize(\"UTC\"))"
"(pd.to_datetime(uts, unit=\"s\").tz_localize(\"UTC\"))"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions docs/workspace/pandas/group-operations.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd\n",
"import numpy as np"
"import numpy as np\n",
"import pandas as pd"
]
},
{
Expand Down
1 change: 0 additions & 1 deletion docs/workspace/pandas/python-data-structures.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"import pandas as pd"
]
},
Expand Down
3 changes: 1 addition & 2 deletions fastapi/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@

"""FastAPI application for items."""

from pydantic import BaseModel

from fastapi import FastAPI
from pydantic import BaseModel


app = FastAPI()
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ lint.isort.lines-after-imports = 2
lint.isort.lines-between-types = 1

[tool.codespell]
ignore-words-list = "comit"
skip = """\
*.csv, *.html, *.pdf, *.rst, *.ipynb, ./docs/_build/*, */books.json, */books.txt, ./styles/*, \
./Python4DataScience.egg-info/*\
"""
ignore-words-list = "comit"
Loading