Skip to content
This repository has been archived by the owner on Nov 23, 2024. It is now read-only.

docs: set log level to error #28

Merged
merged 1 commit into from
Mar 17, 2023
Merged
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
docs: set log level to error
lars-reimann committed Mar 17, 2023

Verified

This commit was signed with the committer’s verified signature.
lars-reimann Lars Reimann
commit afdcabec5ce983aa00024ca0e8fa75c2cdbdcf4a
9 changes: 9 additions & 0 deletions docs/examples/disable_warnings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import logging
import warnings


def disable_warnings() -> None:
"""Disable output of warnings."""

logging.root.setLevel(logging.ERROR)
warnings.filterwarnings("ignore")
67 changes: 16 additions & 51 deletions docs/examples/house_sales.ipynb
Original file line number Diff line number Diff line change
@@ -8,10 +8,7 @@
"The dataset contains house sale prices for King County, USA between May 2014 and May 2015. It is well suited to practice regression techniques."
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
"collapsed": false
}
},
{
@@ -20,19 +17,17 @@
"## Column descriptions"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
"collapsed": false
}
},
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"import warnings\n",
"warnings.filterwarnings(\"ignore\")\n",
"from disable_warnings import disable_warnings\n",
"\n",
"disable_warnings()\n",
"\n",
"from safeds_examples.tabular import describe_house_sales_columns\n",
"from display_column_description import display_column_descriptions\n",
@@ -41,10 +36,7 @@
"display_column_descriptions(house_sales_description)"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
"collapsed": false
}
},
{
@@ -53,10 +45,7 @@
"## Sample"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
"collapsed": false
}
},
{
@@ -70,10 +59,7 @@
"house_sales.slice(end=10)"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
"collapsed": false
}
},
{
@@ -82,10 +68,7 @@
"## Schema"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
"collapsed": false
}
},
{
@@ -96,10 +79,7 @@
"house_sales.schema"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
"collapsed": false
}
},
{
@@ -108,10 +88,7 @@
"## Statistics"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
"collapsed": false
}
},
{
@@ -122,10 +99,7 @@
"house_sales.summary()"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
"collapsed": false
}
},
{
@@ -134,10 +108,7 @@
"## Correlation heatmap"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
"collapsed": false
}
},
{
@@ -159,10 +130,7 @@
"correlation_heatmap(house_sales_correlation)"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
"collapsed": false
}
},
{
@@ -175,10 +143,7 @@
"Column descriptions are based on [this Kaggle discussion](https://www.kaggle.com/datasets/harlfoxem/housesalesprediction/discussion/207885).\n"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
"collapsed": false
}
}
],
@@ -203,4 +168,4 @@
},
"nbformat": 4,
"nbformat_minor": 0
}
}
67 changes: 16 additions & 51 deletions docs/examples/titanic.ipynb
Original file line number Diff line number Diff line change
@@ -8,10 +8,7 @@
"The dataset contains information about the passengers of the Titanic and whether they survived the accident. It is well suited to practice classification techniques."
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
"collapsed": false
}
},
{
@@ -20,19 +17,17 @@
"## Column descriptions"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
"collapsed": false
}
},
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"import warnings\n",
"warnings.filterwarnings(\"ignore\")\n",
"from disable_warnings import disable_warnings\n",
"\n",
"disable_warnings()\n",
"\n",
"from safeds_examples.tabular import describe_titanic_columns\n",
"from display_column_description import display_column_descriptions\n",
@@ -41,10 +36,7 @@
"display_column_descriptions(titanic_description)"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
"collapsed": false
}
},
{
@@ -53,10 +45,7 @@
"## Sample"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
"collapsed": false
}
},
{
@@ -70,10 +59,7 @@
"titanic.slice(end=10)"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
"collapsed": false
}
},
{
@@ -82,10 +68,7 @@
"## Schema"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
"collapsed": false
}
},
{
@@ -96,10 +79,7 @@
"titanic.schema"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
"collapsed": false
}
},
{
@@ -108,10 +88,7 @@
"## Statistics"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
"collapsed": false
}
},
{
@@ -122,10 +99,7 @@
"titanic.summary()"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
"collapsed": false
}
},
{
@@ -134,10 +108,7 @@
"## Correlation heatmap"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
"collapsed": false
}
},
{
@@ -154,10 +125,7 @@
"correlation_heatmap(titanic_correlation)"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
"collapsed": false
}
},
{
@@ -172,10 +140,7 @@
"> Thomas Cason of UVa has greatly updated and improved the titanic data frame using the Encyclopedia Titanica and created the dataset here. Some duplicate passengers have been dropped, many errors corrected, many missing ages filled in, and new variables created.\n"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
"collapsed": false
}
}
],
@@ -200,4 +165,4 @@
},
"nbformat": 4,
"nbformat_minor": 0
}
}