diff --git a/.github/workflows/black.yml b/.github/workflows/black.yml deleted file mode 100644 index ad8dd8be..00000000 --- a/.github/workflows/black.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: "SENATOROV" - -permissions: - contents: write # Grant write access to the repository contents -on: - push: - branches: - - "**" - - schedule: - - cron: "0 0 * * *" # Run every day - workflow_dispatch: - create: - delete: - release: - issues: - - -jobs: - black: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - allow-prereleases: true - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install black "black[jupyter]" nbqa - - name: Black - run: | - black --diff --line-length=79 $(git ls-files '*.py' '*.ipynb') - nbqa black --diff --line-length=79 $(git ls-files '*.py' '*.ipynb') - - - name: Commit and push changes - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} - run: | - git config --global user.name "GitHub Actions" - git config --global user.email "actions@github.com" - git remote set-url origin https://x-access-token:${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }} - git pull - git add . - git diff --quiet || (git commit -m "Convert notebooks to Python scripts" && git push) - - - - - diff --git a/.github/workflows/black_pull.yml b/.github/workflows/black_pull.yml deleted file mode 100644 index 289c761a..00000000 --- a/.github/workflows/black_pull.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: "SENATOROV" - -permissions: - contents: write # Grant write access to the repository contents -on: - - pull_request: - branches: - - "**" - schedule: - - cron: "0 0 * * *" # Run every day - workflow_dispatch: - create: - delete: - release: - issues: - pull_request_review: - pull_request_review_comment: - -jobs: - black: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - allow-prereleases: true - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install black "black[jupyter]" nbqa - - name: Black - run: | - black --diff --line-length=79 $(git ls-files '*.py' '*.ipynb') - nbqa black --diff --line-length=79 $(git ls-files '*.py' '*.ipynb') - - - name: Commit and push changes - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} - run: | - git config --global user.name "GitHub Actions" - git config --global user.email "actions@github.com" - git remote set-url origin https://x-access-token:${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }} - git pull - git add . - git diff --quiet || (git commit -m "Convert notebooks to Python scripts" && git push) - - - - - diff --git a/.github/workflows/blacken-docs.yml b/.github/workflows/blacken-docs.yml deleted file mode 100644 index 57d9416a..00000000 --- a/.github/workflows/blacken-docs.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: "SENATOROV" - -permissions: - contents: write # Grant write access to the repository contents -on: - push: - branches: - - "**" - - schedule: - - cron: "0 0 * * *" # Run every day - workflow_dispatch: - create: - delete: - release: - issues: - - -jobs: - blacken-docs: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - allow-prereleases: true - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install blacken-docs nbqa - - name: Blacken-docs - run: | - nbqa blacken-docs --nbqa-md --nbqa-diff $(git ls-files '*.py' '*.ipynb') diff --git a/.github/workflows/blacken-docs_pull.yml b/.github/workflows/blacken-docs_pull.yml deleted file mode 100644 index eaf15fc4..00000000 --- a/.github/workflows/blacken-docs_pull.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: "SENATOROV" - -permissions: - contents: write # Grant write access to the repository contents -on: - - pull_request: - branches: - - "**" - schedule: - - cron: "0 0 * * *" # Run every day - workflow_dispatch: - create: - delete: - release: - issues: - pull_request_review: - pull_request_review_comment: - -jobs: - blacken-docs: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - allow-prereleases: true - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install blacken-docs nbqa - - name: Blacken-docs - run: | - nbqa blacken-docs --nbqa-md --nbqa-diff $(git ls-files '*.py' '*.ipynb') diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml deleted file mode 100644 index ee4693f3..00000000 --- a/.github/workflows/codespell.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: "SENATOROV" - -permissions: - contents: write # Grant write access to the repository contents - -on: - push: - branches: - - "**" - - schedule: - - cron: "0 0 * * *" # Run every day - workflow_dispatch: - create: - delete: - release: - issues: - - -jobs: - codespell: - runs-on: ubuntu-latest - steps: - # Шаг для клонирования репозитория - - uses: actions/checkout@v4 - - # Установка Python - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.x" # Укажите версию Python, либо используйте матрицу версий - - # Установка зависимостей - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install codespell - - # Запуск codespell с параметрами - - name: Run codespell - run: | - codespell \ - --ignore-regex='^\s*"image\/(jpeg|png|gif|bmp|tiff)":\s.*' \ - --ignore-regex="[A-Za-z0-9+/]{100,}" \ - --skip="*.js,*.html,*.css,*.svg,*.json,*.png,*.jpg,*.yml,*.yaml" \ - $(git ls-files '*.py' '*.ipynb') diff --git a/.github/workflows/codespell_pull.yml b/.github/workflows/codespell_pull.yml deleted file mode 100644 index 6feea24d..00000000 --- a/.github/workflows/codespell_pull.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: "SENATOROV" - -permissions: - contents: write # Grant write access to the repository contents - -on: - - pull_request: - branches: - - "**" - schedule: - - cron: "0 0 * * *" # Run every day - workflow_dispatch: - create: - delete: - release: - issues: - pull_request_review: - pull_request_review_comment: - -jobs: - codespell: - runs-on: ubuntu-latest - steps: - # Шаг для клонирования репозитория - - uses: actions/checkout@v4 - - # Установка Python - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.x" # Укажите версию Python, либо используйте матрицу версий - - # Установка зависимостей - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install codespell - - # Запуск codespell с параметрами - - name: Run codespell - run: | - codespell \ - --ignore-regex='^\s*"image\/(jpeg|png|gif|bmp|tiff)":\s.*' \ - --ignore-regex="[A-Za-z0-9+/]{100,}" \ - --skip="*.js,*.html,*.css,*.svg,*.json,*.png,*.jpg,*.yml,*.yaml" \ - $(git ls-files '*.py' '*.ipynb') diff --git a/.github/workflows/flake8.yml b/.github/workflows/flake8.yml deleted file mode 100644 index 787119b7..00000000 --- a/.github/workflows/flake8.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: "SENATOROV" - -permissions: - contents: write # Grant write access to the repository contents -on: - push: - branches: - - "**" - - schedule: - - cron: "0 0 * * *" # Run every day - workflow_dispatch: - create: - delete: - release: - issues: - - -jobs: - flake8: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - allow-prereleases: true - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install flake8 nbqa flake8-variables-names pep8-naming flake8-functions-names - - name: Flake8 - run: | - nbqa flake8 --ignore=E231,B018,E203,E501,W291,F821,F401,E402,E121,E302,W391,W293 $(git ls-files '*.py' '*.ipynb') - flake8 --ignore=E231,B018,E203,E501,W291,F821,F401,E402,E121,E302,W391,W293 $(git ls-files '*.py' '*.ipynb') diff --git a/.github/workflows/flake8_pull.yml b/.github/workflows/flake8_pull.yml deleted file mode 100644 index 214a6ea9..00000000 --- a/.github/workflows/flake8_pull.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: "SENATOROV" - -permissions: - contents: write # Grant write access to the repository contents -on: - - pull_request: - branches: - - "**" - schedule: - - cron: "0 0 * * *" # Run every day - workflow_dispatch: - create: - delete: - release: - issues: - pull_request_review: - pull_request_review_comment: - -jobs: - flake8: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - allow-prereleases: true - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install flake8 nbqa flake8-variables-names pep8-naming flake8-functions-names - - name: Flake8 - run: | - nbqa flake8 --ignore=E231,B018,E203,E501,W291,F821,F401,E402,E121,E302,W391,W293 $(git ls-files '*.py' '*.ipynb') - flake8 --ignore=E231,B018,E203,E501,W291,F821,F401,E402,E121,E302,W391,W293 $(git ls-files '*.py' '*.ipynb') diff --git a/.github/workflows/ipynb_to_py.yml b/.github/workflows/ipynb_to_py.yml deleted file mode 100644 index a559afe3..00000000 --- a/.github/workflows/ipynb_to_py.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: SENATOROV -permissions: - contents: write # Grant write access to the repository contents -on: - push: - branches: - - "**" - - schedule: - - cron: "0 0 * * *" # Run every day - workflow_dispatch: - create: - delete: - release: - issues: - - -jobs: - convert_notebooks: - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install jupytext - - - name: Convert .ipynb to .py - run: | - jupytext --to py $(git ls-files '*.ipynb') - - name: Commit and push changes - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} - run: | - git config --global user.name "GitHub Actions" - git config --global user.email "actions@github.com" - git remote set-url origin https://x-access-token:${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }} - git pull - git add . - git diff --quiet || (git commit -m "Convert notebooks to Python scripts" && git push) - - - - diff --git a/.github/workflows/ipynb_to_py_pull.yml b/.github/workflows/ipynb_to_py_pull.yml deleted file mode 100644 index 49984e47..00000000 --- a/.github/workflows/ipynb_to_py_pull.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: SENATOROV -permissions: - contents: write # Grant write access to the repository contents -on: - - pull_request: - branches: - - "**" - schedule: - - cron: "0 0 * * *" # Run every day - workflow_dispatch: - create: - delete: - release: - issues: - pull_request_review: - pull_request_review_comment: - -jobs: - convert_notebooks: - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install jupytext - - - name: Convert .ipynb to .py - run: | - jupytext --to py $(git ls-files '*.ipynb') - - name: Commit and push changes - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} - run: | - git config --global user.name "GitHub Actions" - git config --global user.email "actions@github.com" - git remote set-url origin https://x-access-token:${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }} - git pull - git add . - git diff --quiet || (git commit -m "Convert notebooks to Python scripts" && git push) - - - - diff --git a/.github/workflows/isort.yml b/.github/workflows/isort.yml deleted file mode 100644 index 8a9879d0..00000000 --- a/.github/workflows/isort.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: SENATOROV -on: - push: - branches: - - "**" - - schedule: - - cron: "0 0 * * *" # Run every day - workflow_dispatch: - create: - delete: - release: - issues: - -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 --float-to-top $(git ls-files '*.ipynb') - isort --float-to-top $(git ls-files '*.py') - - name: Commit and push changes - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} - run: | - git config --global user.name "GitHub Actions" - git config --global user.email "actions@github.com" - git remote set-url origin https://x-access-token:${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }} - git pull origin ${{ github.ref_name }} - git add . - git diff --quiet || (git commit -m "Sort imports and apply isort fixes" && git push origin ${{ github.ref_name }}) diff --git a/.github/workflows/isort_pull.yml b/.github/workflows/isort_pull.yml deleted file mode 100644 index 5b7d4565..00000000 --- a/.github/workflows/isort_pull.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: "SENATOROV" - -permissions: - contents: write # Grant write access to the repository contents - -on: - - pull_request: - branches: - - "**" - schedule: - - cron: "0 0 * * *" # Run every day - workflow_dispatch: - create: - delete: - release: - 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 --float-to-top $(git ls-files '*.ipynb') - isort --float-to-top $(git ls-files '*.py') - - name: Commit and push changes - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} - run: | - git config --global user.name "GitHub Actions" - git config --global user.email "actions@github.com" - git remote set-url origin https://x-access-token:${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }} - git pull origin ${{ github.ref_name }} - git add . - git diff --quiet || (git commit -m "Sort imports and apply isort fixes" && git push origin ${{ github.ref_name }}) diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml deleted file mode 100644 index 22ceee39..00000000 --- a/.github/workflows/mypy.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: "SENATOROV" - -permissions: - contents: write # Grant write access to the repository contents -on: - push: - branches: - - "**" - - schedule: - - cron: "0 0 * * *" # Run every day - workflow_dispatch: - create: - delete: - release: - issues: - - -jobs: - mypy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - allow-prereleases: true - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install "nbqa[toolchain]" mypy nbqa pandas-stubs git+https://github.com/numpy/numpy-stubs mypy-extensions types-requests types-PyYAML types-setuptools - - name: Mypy - run: | - nbqa mypy --exclude=^misc/ --ignore-missing-imports --explicit-package-bases --ignore-missing-imports --disallow-untyped-calls --disallow-untyped-defs --disallow-untyped-decorators --strict --extra-checks --disallow-any-decorated --disallow-any-generics --local-partial-types --pretty --force-uppercase-builtins --force-union-syntax --warn-unreachable --warn-redundant-casts --warn-return-any $(git ls-files '*.ipynb') diff --git a/.github/workflows/mypy_pull.yml b/.github/workflows/mypy_pull.yml deleted file mode 100644 index 5f8dbb9e..00000000 --- a/.github/workflows/mypy_pull.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: "SENATOROV" - -permissions: - contents: write # Grant write access to the repository contents -on: - - pull_request: - branches: - - "**" - schedule: - - cron: "0 0 * * *" # Run every day - workflow_dispatch: - create: - delete: - release: - issues: - pull_request_review: - pull_request_review_comment: - -jobs: - mypy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - allow-prereleases: true - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install "nbqa[toolchain]" mypy nbqa pandas-stubs git+https://github.com/numpy/numpy-stubs mypy-extensions types-requests types-PyYAML types-setuptools - - name: Mypy - run: | - nbqa mypy --exclude=^misc/ --ignore-missing-imports --explicit-package-bases --ignore-missing-imports --disallow-untyped-calls --disallow-untyped-defs --disallow-untyped-decorators --strict --extra-checks --disallow-any-decorated --disallow-any-generics --local-partial-types --pretty --force-uppercase-builtins --force-union-syntax --warn-unreachable --warn-redundant-casts --warn-return-any $(git ls-files '*.ipynb') diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml new file mode 100644 index 00000000..b5f28b5a --- /dev/null +++ b/.github/workflows/pre-commit.yaml @@ -0,0 +1,21 @@ +name: pre-commit + +on: + pull_request: + branches: + - '*' + push: + branches: + - '*' + +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v3 + with: + python-version: '3.11' + - uses: pre-commit/action@v3.0.1 + with: + extra_args: --all-files diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml deleted file mode 100644 index 1a2ad4fa..00000000 --- a/.github/workflows/pylint.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: "SENATOROV" - -permissions: - contents: write # Grant write access to the repository contents -on: - push: - branches: - - "**" - - schedule: - - cron: "0 0 * * *" # Run every day - workflow_dispatch: - create: - delete: - release: - issues: - - -jobs: - pylint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - allow-prereleases: true - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install "nbqa[toolchain]" pylint nbqa - - name: Pylint - run: | - pylint --max-line-length=79 --const-naming-style=any --disable=R1721,R0903,C0303,E1101,R1716,E0401,W1514,C0200,C0114,C0301,E0602,W0104,C0302,R0801,E1136,line-too-long,C0305,E2515 --disable=import-error $(git ls-files '*.py' '*.ipynb') - nbqa pylint --max-line-length=79 --const-naming-style=any --disable=R1721,R0903,E2515,C0303,E1101,R1716,E0401,W1514,C0200,C0114,C0301,E0602,W0104,C0302,R0801,E1136,C0305,E2515 --disable=import-error $(git ls-files '*.py' '*.ipynb') diff --git a/.github/workflows/pylint_pull.yml b/.github/workflows/pylint_pull.yml deleted file mode 100644 index da6e38d8..00000000 --- a/.github/workflows/pylint_pull.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: "SENATOROV" - -permissions: - contents: write # Grant write access to the repository contents -on: - - pull_request: - branches: - - "**" - schedule: - - cron: "0 0 * * *" # Run every day - workflow_dispatch: - create: - delete: - release: - issues: - pull_request_review: - pull_request_review_comment: - -jobs: - pylint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - allow-prereleases: true - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install "nbqa[toolchain]" pylint nbqa - - name: Pylint - run: | - pylint --max-line-length=79 --const-naming-style=any --disable=R1721,R0903,C0303,E1101,R1716,E0401,W1514,C0200,C0114,C0301,E0602,W0104,C0302,R0801,E1136,line-too-long,C0305,E2515 --disable=import-error $(git ls-files '*.py' '*.ipynb') - nbqa pylint --max-line-length=79 --const-naming-style=any --disable=R1721,R0903,E2515,C0303,E1101,R1716,E0401,W1514,C0200,C0114,C0301,E0602,W0104,C0302,R0801,E1136,C0305,E2515 --disable=import-error $(git ls-files '*.py' '*.ipynb') diff --git a/.github/workflows/pyupgrade.yml b/.github/workflows/pyupgrade.yml deleted file mode 100644 index e98627c6..00000000 --- a/.github/workflows/pyupgrade.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: "SENATOROV" - -permissions: - contents: write # Grant write access to the repository contents -on: - push: - branches: - - "**" - - schedule: - - cron: "0 0 * * *" # Run every day - workflow_dispatch: - create: - delete: - release: - issues: - - -jobs: - pyupgrade: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - allow-prereleases: true - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install nbqa pyupgrade - - name: pyupgrade - run: | - nbqa pyupgrade --py37-plus $(git ls-files '*.py' '*.ipynb') diff --git a/.github/workflows/pyupgrade_pull.yml b/.github/workflows/pyupgrade_pull.yml deleted file mode 100644 index ec3bd29c..00000000 --- a/.github/workflows/pyupgrade_pull.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: "SENATOROV" - -permissions: - contents: write # Grant write access to the repository contents -on: - - pull_request: - branches: - - "**" - schedule: - - cron: "0 0 * * *" # Run every day - workflow_dispatch: - create: - delete: - release: - issues: - pull_request_review: - pull_request_review_comment: - -jobs: - pyupgrade: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - allow-prereleases: true - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install nbqa pyupgrade - - name: pyupgrade - run: | - nbqa pyupgrade --py37-plus $(git ls-files '*.py' '*.ipynb')