From 2c78206362066a6c35decc630492fec8f2e61bff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Thu, 12 May 2022 11:44:28 -0500 Subject: [PATCH 01/11] =?UTF-8?q?=F0=9F=91=B7=20Add=20pre-commit=20GitHub?= =?UTF-8?q?=20Action=20workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/autoformat.yml | 43 ++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/autoformat.yml diff --git a/.github/workflows/autoformat.yml b/.github/workflows/autoformat.yml new file mode 100644 index 0000000000..8527237711 --- /dev/null +++ b/.github/workflows/autoformat.yml @@ -0,0 +1,43 @@ +name: Auto Format + +on: + pull_request: + types: [opened, synchronize] + +jobs: + autoformat: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + ref: ${{ github.head_ref }} + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.9' + - uses: actions/cache@v2 + id: cache + with: + path: ${{ env.pythonLocation }} + key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-v01 + - name: Install Flit + if: steps.cache.outputs.cache-hit != 'true' + run: pip install flit + - name: Install Dependencies + if: steps.cache.outputs.cache-hit != 'true' + run: flit install --symlink + - uses: actions/cache@v2 + id: pre-commit-hooks-cache + with: + path: ~/.cache/pre-commit + key: ${{ runner.os }}-pre-commit-hooks-${{ hashFiles('.pre-commit-config.yaml') }}-v01 + - name: Run pre-commit + run: pre-commit run --all-files + - name: Commit pre-commit changes + if: failure() + run: | + git config --global user.name "pre-commit" + git config --global user.email github-actions@github.com + git add --update + git commit -m "🎨 Format code with pre-commit" + git push From 6bfee36df6a449a5ee800664a4289199c6060bc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Thu, 12 May 2022 11:47:39 -0500 Subject: [PATCH 02/11] =?UTF-8?q?=F0=9F=8D=BB=20Add=20garbage=20to=20make?= =?UTF-8?q?=20pre-commit=20fix=20it=20and=20ensure=20it=20works?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/contributing.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/contributing.md b/docs/contributing.md index dd038fc408..53f460d56f 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -229,3 +229,7 @@ $ bash scripts/test-cov-html.sh This command generates a directory `./htmlcov/`, if you open the file `./htmlcov/index.html` in your browser, you can explore interactively the regions of code that are covered by the tests, and notice if there is any region missing. + + + + From 903be94c6a7d8209f492bc38ad2a17f15d3d8c7f Mon Sep 17 00:00:00 2001 From: pre-commit Date: Thu, 12 May 2022 16:48:35 +0000 Subject: [PATCH 03/11] =?UTF-8?q?=F0=9F=8E=A8=20Format=20code=20with=20pre?= =?UTF-8?q?-commit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/contributing.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/docs/contributing.md b/docs/contributing.md index 53f460d56f..dd038fc408 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -229,7 +229,3 @@ $ bash scripts/test-cov-html.sh This command generates a directory `./htmlcov/`, if you open the file `./htmlcov/index.html` in your browser, you can explore interactively the regions of code that are covered by the tests, and notice if there is any region missing. - - - - From a877f389971a45f76c1ef55b5224fda8719a2dc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Thu, 12 May 2022 11:52:52 -0500 Subject: [PATCH 04/11] =?UTF-8?q?=F0=9F=8D=BB=20Add=20more=20garbage=20for?= =?UTF-8?q?=20pre-commit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/contributing.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/contributing.md b/docs/contributing.md index dd038fc408..53f460d56f 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -229,3 +229,7 @@ $ bash scripts/test-cov-html.sh This command generates a directory `./htmlcov/`, if you open the file `./htmlcov/index.html` in your browser, you can explore interactively the regions of code that are covered by the tests, and notice if there is any region missing. + + + + From 3ca17911815249e108bc6c5dd2b24e3570b3c1ac Mon Sep 17 00:00:00 2001 From: pre-commit Date: Thu, 12 May 2022 16:53:47 +0000 Subject: [PATCH 05/11] =?UTF-8?q?=F0=9F=8E=A8=20Format=20code=20with=20pre?= =?UTF-8?q?-commit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/contributing.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/docs/contributing.md b/docs/contributing.md index 53f460d56f..dd038fc408 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -229,7 +229,3 @@ $ bash scripts/test-cov-html.sh This command generates a directory `./htmlcov/`, if you open the file `./htmlcov/index.html` in your browser, you can explore interactively the regions of code that are covered by the tests, and notice if there is any region missing. - - - - From 2cc5533c7e3b143dcc61372fe299718919422097 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Thu, 12 May 2022 11:58:39 -0500 Subject: [PATCH 06/11] =?UTF-8?q?=F0=9F=91=B7=20Trigger=20CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From 0f12e1468d1536dff0a1199951a7ab4ab69a5a65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Thu, 12 May 2022 12:01:04 -0500 Subject: [PATCH 07/11] =?UTF-8?q?=F0=9F=91=B7=20Trigger=20CI=20again?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From 1935bcefc02199f92f920ef8f1cf5443fcf25198 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Thu, 12 May 2022 12:02:38 -0500 Subject: [PATCH 08/11] =?UTF-8?q?=F0=9F=91=B7=20Trigger=20CI=20with=20garb?= =?UTF-8?q?age=20to=20test=20pre-commit.ci?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/autoformat.yml | 82 ++++++++++++++++---------------- docs/contributing.md | 4 ++ 2 files changed, 45 insertions(+), 41 deletions(-) diff --git a/.github/workflows/autoformat.yml b/.github/workflows/autoformat.yml index 8527237711..3e3d2c6979 100644 --- a/.github/workflows/autoformat.yml +++ b/.github/workflows/autoformat.yml @@ -1,43 +1,43 @@ -name: Auto Format +# name: Auto Format -on: - pull_request: - types: [opened, synchronize] +# on: +# pull_request: +# types: [opened, synchronize] -jobs: - autoformat: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - ref: ${{ github.head_ref }} - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.9' - - uses: actions/cache@v2 - id: cache - with: - path: ${{ env.pythonLocation }} - key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-v01 - - name: Install Flit - if: steps.cache.outputs.cache-hit != 'true' - run: pip install flit - - name: Install Dependencies - if: steps.cache.outputs.cache-hit != 'true' - run: flit install --symlink - - uses: actions/cache@v2 - id: pre-commit-hooks-cache - with: - path: ~/.cache/pre-commit - key: ${{ runner.os }}-pre-commit-hooks-${{ hashFiles('.pre-commit-config.yaml') }}-v01 - - name: Run pre-commit - run: pre-commit run --all-files - - name: Commit pre-commit changes - if: failure() - run: | - git config --global user.name "pre-commit" - git config --global user.email github-actions@github.com - git add --update - git commit -m "🎨 Format code with pre-commit" - git push +# jobs: +# autoformat: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v2 +# with: +# ref: ${{ github.head_ref }} +# - name: Set up Python +# uses: actions/setup-python@v2 +# with: +# python-version: '3.9' +# - uses: actions/cache@v2 +# id: cache +# with: +# path: ${{ env.pythonLocation }} +# key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-v01 +# - name: Install Flit +# if: steps.cache.outputs.cache-hit != 'true' +# run: pip install flit +# - name: Install Dependencies +# if: steps.cache.outputs.cache-hit != 'true' +# run: flit install --symlink +# - uses: actions/cache@v2 +# id: pre-commit-hooks-cache +# with: +# path: ~/.cache/pre-commit +# key: ${{ runner.os }}-pre-commit-hooks-${{ hashFiles('.pre-commit-config.yaml') }}-v01 +# - name: Run pre-commit +# run: pre-commit run --all-files +# - name: Commit pre-commit changes +# if: failure() +# run: | +# git config --global user.name "pre-commit" +# git config --global user.email github-actions@github.com +# git add --update +# git commit -m "🎨 Format code with pre-commit" +# git push diff --git a/docs/contributing.md b/docs/contributing.md index dd038fc408..53f460d56f 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -229,3 +229,7 @@ $ bash scripts/test-cov-html.sh This command generates a directory `./htmlcov/`, if you open the file `./htmlcov/index.html` in your browser, you can explore interactively the regions of code that are covered by the tests, and notice if there is any region missing. + + + + From 0b77a245aa4a4ea5c3b1f8cc0d736d5e9cf2e512 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 12 May 2022 17:03:07 +0000 Subject: [PATCH 09/11] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- docs/contributing.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/docs/contributing.md b/docs/contributing.md index 53f460d56f..dd038fc408 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -229,7 +229,3 @@ $ bash scripts/test-cov-html.sh This command generates a directory `./htmlcov/`, if you open the file `./htmlcov/index.html` in your browser, you can explore interactively the regions of code that are covered by the tests, and notice if there is any region missing. - - - - From 8e4f80eaa1e994054689fc405f221f0acd0e47a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Thu, 12 May 2022 12:04:20 -0500 Subject: [PATCH 10/11] =?UTF-8?q?=F0=9F=94=A5=20Remove=20autoformat=20GitH?= =?UTF-8?q?ub=20Action,=20pre-commit.ci=20seems=20to=20work=20really=20wel?= =?UTF-8?q?l?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/autoformat.yml | 43 -------------------------------- 1 file changed, 43 deletions(-) delete mode 100644 .github/workflows/autoformat.yml diff --git a/.github/workflows/autoformat.yml b/.github/workflows/autoformat.yml deleted file mode 100644 index 3e3d2c6979..0000000000 --- a/.github/workflows/autoformat.yml +++ /dev/null @@ -1,43 +0,0 @@ -# name: Auto Format - -# on: -# pull_request: -# types: [opened, synchronize] - -# jobs: -# autoformat: -# runs-on: ubuntu-latest -# steps: -# - uses: actions/checkout@v2 -# with: -# ref: ${{ github.head_ref }} -# - name: Set up Python -# uses: actions/setup-python@v2 -# with: -# python-version: '3.9' -# - uses: actions/cache@v2 -# id: cache -# with: -# path: ${{ env.pythonLocation }} -# key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-v01 -# - name: Install Flit -# if: steps.cache.outputs.cache-hit != 'true' -# run: pip install flit -# - name: Install Dependencies -# if: steps.cache.outputs.cache-hit != 'true' -# run: flit install --symlink -# - uses: actions/cache@v2 -# id: pre-commit-hooks-cache -# with: -# path: ~/.cache/pre-commit -# key: ${{ runner.os }}-pre-commit-hooks-${{ hashFiles('.pre-commit-config.yaml') }}-v01 -# - name: Run pre-commit -# run: pre-commit run --all-files -# - name: Commit pre-commit changes -# if: failure() -# run: | -# git config --global user.name "pre-commit" -# git config --global user.email github-actions@github.com -# git add --update -# git commit -m "🎨 Format code with pre-commit" -# git push From 6d94329b1d78cd9660c9be7f731d1143a533e99d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Thu, 12 May 2022 12:08:45 -0500 Subject: [PATCH 11/11] =?UTF-8?q?=F0=9F=94=A7=20Add=20pre-commit.ci=20conf?= =?UTF-8?q?igs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .pre-commit-config.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5bcd094534..b3eaa2a221 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -48,3 +48,6 @@ repos: rev: 22.3.0 hooks: - id: black +ci: + autofix_commit_msg: 🎨 [pre-commit.ci] Auto format from pre-commit.com hooks + autoupdate_commit_msg: ⬆ [pre-commit.ci] pre-commit autoupdate