Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#805)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/pre-commit/pre-commit-hooks: v4.6.0 → v5.0.0](pre-commit/pre-commit-hooks@v4.6.0...v5.0.0)
- [github.com/psf/black: 24.4.2 → 24.10.0](psf/black@24.4.2...24.10.0)
- [github.com/astral-sh/ruff-pre-commit: v0.4.8 → v0.8.2](astral-sh/ruff-pre-commit@v0.4.8...v0.8.2)
- [github.com/executablebooks/mdformat: 0.7.17 → 0.7.19](hukkin/mdformat@0.7.17...0.7.19)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Fabian Zills <46721498+PythonFZ@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] and PythonFZ authored Dec 10, 2024
1 parent 8b5029a commit 3cd1929
Show file tree
Hide file tree
Showing 12 changed files with 57 additions and 28 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ default_language_version:
python: python3
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
Expand All @@ -21,7 +21,7 @@ repos:
- id: sort-simple-yaml
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 24.4.2
rev: 24.10.0
hooks:
- id: black
additional_dependencies: [".[jupyter]"]
Expand All @@ -37,12 +37,12 @@ repos:
additional_dependencies: ["tomli"]
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: 'v0.4.8'
rev: 'v0.8.2'
hooks:
- id: ruff
args: ['--fix']
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.17
rev: 0.7.19
hooks:
- id: mdformat
args: ["--wrap=80"]
9 changes: 5 additions & 4 deletions docs/source/_examples/OptionalDVC.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@
"metadata": {},
"outputs": [],
"source": [
"from zntrack import Node, dvc, zn, config, ZnTrackProject\n",
"from pathlib import Path\n",
"import tempfile\n",
"from pathlib import Path\n",
"\n",
"from zntrack import Node, ZnTrackProject, config, dvc, zn\n",
"\n",
"config.nb_name = \"OptionalDVC.ipynb\""
]
Expand Down Expand Up @@ -229,10 +230,10 @@
"id": "52554c16-d793-461c-824b-86d6adbf0968",
"metadata": {
"nbsphinx": "hidden",
"tags": [],
"pycharm": {
"is_executing": true
}
},
"tags": []
},
"outputs": [],
"source": [
Expand Down
9 changes: 6 additions & 3 deletions examples/dataclasses_for_parameters.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"outputs": [],
"source": [
"# We work in a temporary directory to avoid cluttering the current directory\n",
"import tempfile, os\n",
"import os\n",
"import tempfile\n",
"\n",
"temp_dir = tempfile.TemporaryDirectory()\n",
"os.chdir(temp_dir.name)"
Expand Down Expand Up @@ -72,9 +73,11 @@
"metadata": {},
"outputs": [],
"source": [
"import pathlib\n",
"\n",
"from compute_random_number import ComputeRandomNumber, Parameter\n",
"import zntrack\n",
"import pathlib"
"\n",
"import zntrack"
]
},
{
Expand Down
3 changes: 2 additions & 1 deletion examples/docs/01_Intro.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,10 @@
"metadata": {},
"outputs": [],
"source": [
"from zntrack import Node, zn, Project\n",
"from random import randrange\n",
"\n",
"from zntrack import Node, Project, zn\n",
"\n",
"\n",
"class RandomNumber(Node):\n",
" number = zn.outs()\n",
Expand Down
13 changes: 11 additions & 2 deletions examples/docs/03_dependencies.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@
"metadata": {},
"outputs": [],
"source": [
"import zntrack\n",
"from pathlib import Path\n",
"from random import randrange\n",
"from pathlib import Path"
"\n",
"import zntrack"
]
},
{
Expand Down Expand Up @@ -327,6 +328,7 @@
},
{
"cell_type": "markdown",
"id": "7fb27b941602401d91542211134fc71a",
"metadata": {
"collapsed": false
},
Expand Down Expand Up @@ -590,6 +592,7 @@
{
"cell_type": "code",
"execution_count": 19,
"id": "acae54e37e7d407bbb7b55eff062a284",
"metadata": {
"collapsed": false
},
Expand Down Expand Up @@ -665,6 +668,7 @@
},
{
"cell_type": "markdown",
"id": "9a63283cbaf04dbcab1f6479b197f3a8",
"metadata": {
"collapsed": false
},
Expand All @@ -680,6 +684,7 @@
{
"cell_type": "code",
"execution_count": 21,
"id": "8dd0d8092fe74a7c96281538738b07e2",
"metadata": {
"collapsed": false
},
Expand All @@ -698,6 +703,7 @@
{
"cell_type": "code",
"execution_count": 22,
"id": "72eea5119410473aa328ad9291626812",
"metadata": {
"collapsed": false
},
Expand Down Expand Up @@ -805,6 +811,7 @@
},
{
"cell_type": "markdown",
"id": "8edb47106e1a46a883d545849b8ab81b",
"metadata": {
"collapsed": false
},
Expand All @@ -816,6 +823,7 @@
{
"cell_type": "code",
"execution_count": 23,
"id": "10185d26023b46108eb7d9f57d49d2b3",
"metadata": {
"collapsed": false
},
Expand All @@ -827,6 +835,7 @@
{
"cell_type": "code",
"execution_count": 24,
"id": "8763a12b2bbd4a93a75aff182afb95dc",
"metadata": {
"collapsed": false
},
Expand Down
8 changes: 5 additions & 3 deletions examples/docs/04_metrics_and_plots.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@
"metadata": {},
"outputs": [],
"source": [
"import zntrack\n",
"from pathlib import Path\n",
"import json\n",
"from pathlib import Path\n",
"\n",
"import numpy as np\n",
"import pandas as pd\n",
"import numpy as np"
"\n",
"import zntrack"
]
},
{
Expand Down
7 changes: 6 additions & 1 deletion examples/docs/05_metadata.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@
"metadata": {},
"outputs": [],
"source": [
"import zntrack\n",
"from time import sleep\n",
"\n",
"import zntrack\n",
"\n",
"zntrack.config.nb_name = \"05_metadata.ipynb\""
]
},
Expand Down Expand Up @@ -216,6 +217,7 @@
{
"cell_type": "code",
"execution_count": 7,
"id": "7fb27b941602401d91542211134fc71a",
"metadata": {
"collapsed": false,
"pycharm": {
Expand All @@ -240,6 +242,7 @@
{
"cell_type": "code",
"execution_count": 8,
"id": "acae54e37e7d407bbb7b55eff062a284",
"metadata": {
"collapsed": false,
"pycharm": {
Expand Down Expand Up @@ -323,6 +326,7 @@
{
"cell_type": "code",
"execution_count": 9,
"id": "9a63283cbaf04dbcab1f6479b197f3a8",
"metadata": {
"collapsed": false,
"pycharm": {
Expand All @@ -346,6 +350,7 @@
},
{
"cell_type": "markdown",
"id": "8dd0d8092fe74a7c96281538738b07e2",
"metadata": {
"collapsed": false,
"pycharm": {
Expand Down
3 changes: 2 additions & 1 deletion examples/docs/07_functions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,10 @@
"metadata": {},
"outputs": [],
"source": [
"from zntrack import nodify, NodeConfig\n",
"import pathlib\n",
"\n",
"from zntrack import NodeConfig, nodify\n",
"\n",
"\n",
"@nodify(outs=pathlib.Path(\"outs.txt\"), params={\"text\": \"Lorem Ipsum\"})\n",
"def write_text(cfg: NodeConfig):\n",
Expand Down
5 changes: 3 additions & 2 deletions examples/docs/08_custom_zntrackoptions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,11 @@
"metadata": {},
"outputs": [],
"source": [
"import zntrack\n",
"import ase.db\n",
"import ase.io\n",
"import tqdm"
"import tqdm\n",
"\n",
"import zntrack"
]
},
{
Expand Down
5 changes: 3 additions & 2 deletions examples/docs/09_lazy.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,9 @@
"metadata": {},
"outputs": [],
"source": [
"import zntrack\n",
"import random"
"import random\n",
"\n",
"import zntrack"
]
},
{
Expand Down
7 changes: 5 additions & 2 deletions examples/docs/parameter_optimization.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,14 @@
"metadata": {},
"outputs": [],
"source": [
"import optuna, sklearn, zntrack\n",
"import optuna\n",
"import sklearn\n",
"import sklearn.datasets\n",
"import sklearn.ensemble\n",
"import sklearn.model_selection\n",
"import sklearn.metrics\n",
"import sklearn.model_selection\n",
"\n",
"import zntrack\n",
"\n",
"\n",
"class HousingDataSet(zntrack.Node):\n",
Expand Down
8 changes: 5 additions & 3 deletions examples/estimate_pi_with_mc.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
"outputs": [],
"source": [
"# We work in a temporary directory to avoid cluttering the current directory\n",
"import tempfile, os\n",
"import os\n",
"import tempfile\n",
"\n",
"temp_dir = tempfile.TemporaryDirectory()\n",
"os.chdir(temp_dir.name)"
Expand Down Expand Up @@ -195,8 +196,9 @@
"metadata": {},
"outputs": [],
"source": [
"import zntrack\n",
"from mcpipy import MCPi"
"from mcpipy import MCPi\n",
"\n",
"import zntrack"
]
},
{
Expand Down

0 comments on commit 3cd1929

Please sign in to comment.