From cf37b179d2f75133b4b197f994407cd7ae53dbcd Mon Sep 17 00:00:00 2001 From: Ruslan Senatorov <55090151+ruslansenatorov@users.noreply.github.com> Date: Wed, 6 Nov 2024 23:45:07 -0800 Subject: [PATCH 1/5] autofux isort Signed-off-by: Ruslan Senatorov <55090151+ruslansenatorov@users.noreply.github.com> --- .github/workflows/isort.yml | 38 +++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/.github/workflows/isort.yml b/.github/workflows/isort.yml index b596472..d188419 100644 --- a/.github/workflows/isort.yml +++ b/.github/workflows/isort.yml @@ -15,19 +15,33 @@ on: issues: pull_request_review: pull_request_review_comment: + jobs: isort: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: isort/isort-action@v1 - with: - python-version: ${{ matrix.python-version }} - allow-prereleases: true - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install isort nbqa - - name: isort - run: | - nbqa isort --check --float-to-top $(git ls-files '*.ipynb') + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.x' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install isort nbqa + + - name: Run isort and auto-fix imports + run: | + nbqa isort --float-to-top $(git ls-files '*.ipynb') + + - name: Commit and push changes + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + git add . + git commit -m "Apply isort changes" + git push + continue-on-error: true # To avoid failing if there are no changes From 35be3da190c06e776ed6dc57883409ed8f80485e Mon Sep 17 00:00:00 2001 From: Ruslan Senatorov <55090151+ruslansenatorov@users.noreply.github.com> Date: Wed, 6 Nov 2024 23:49:07 -0800 Subject: [PATCH 2/5] Update chapter_2_python_basics.py Signed-off-by: Ruslan Senatorov <55090151+ruslansenatorov@users.noreply.github.com> --- python/made-easy/chapter_2_python_basics.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/python/made-easy/chapter_2_python_basics.py b/python/made-easy/chapter_2_python_basics.py index d04766d..a8f289d 100644 --- a/python/made-easy/chapter_2_python_basics.py +++ b/python/made-easy/chapter_2_python_basics.py @@ -14,6 +14,13 @@ """Module on basics of python.""" +from typing import Callable + +import numpy as np +import scipy as sc +from scipy import optimize +from scipy.optimize import OptimizeResult + # # Введение в Python # **Что такое Python?** # From 912b4c8b9511a0bec0522e4a42a47815b093c002 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Thu, 7 Nov 2024 07:49:34 +0000 Subject: [PATCH 3/5] Convert notebooks to Python scripts --- python/made-easy/chapter_2_python_basics.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/python/made-easy/chapter_2_python_basics.py b/python/made-easy/chapter_2_python_basics.py index a8f289d..d04766d 100644 --- a/python/made-easy/chapter_2_python_basics.py +++ b/python/made-easy/chapter_2_python_basics.py @@ -14,13 +14,6 @@ """Module on basics of python.""" -from typing import Callable - -import numpy as np -import scipy as sc -from scipy import optimize -from scipy.optimize import OptimizeResult - # # Введение в Python # **Что такое Python?** # From 03d40f2a40a7145407480e125da041c3fd3fc66e Mon Sep 17 00:00:00 2001 From: Ruslan Senatorov <55090151+ruslansenatorov@users.noreply.github.com> Date: Wed, 6 Nov 2024 23:50:29 -0800 Subject: [PATCH 4/5] Update chapter_2_python_basics.py Signed-off-by: Ruslan Senatorov <55090151+ruslansenatorov@users.noreply.github.com> --- python/made-easy/chapter_2_python_basics.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/python/made-easy/chapter_2_python_basics.py b/python/made-easy/chapter_2_python_basics.py index d04766d..6396b9e 100644 --- a/python/made-easy/chapter_2_python_basics.py +++ b/python/made-easy/chapter_2_python_basics.py @@ -13,6 +13,12 @@ # --- """Module on basics of python.""" +from typing import Callable + +import numpy as np +import scipy as sc +from scipy import optimize +from scipy.optimize import OptimizeResult # # Введение в Python # **Что такое Python?** From 2502ee25d2a6527bc7ecbb515a5ded5653f21f41 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Thu, 7 Nov 2024 07:50:53 +0000 Subject: [PATCH 5/5] Convert notebooks to Python scripts --- python/made-easy/chapter_2_python_basics.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/python/made-easy/chapter_2_python_basics.py b/python/made-easy/chapter_2_python_basics.py index 6396b9e..d04766d 100644 --- a/python/made-easy/chapter_2_python_basics.py +++ b/python/made-easy/chapter_2_python_basics.py @@ -13,12 +13,6 @@ # --- """Module on basics of python.""" -from typing import Callable - -import numpy as np -import scipy as sc -from scipy import optimize -from scipy.optimize import OptimizeResult # # Введение в Python # **Что такое Python?**