From abb02d0a612bad814d33e2dbc3689079a028996d Mon Sep 17 00:00:00 2001 From: 0x2b3bfa0 <0x2b3bfa0@users.noreply.github.com> Date: Tue, 12 Sep 2023 21:05:28 +0000 Subject: [PATCH 1/3] update template --- .cruft.json | 2 +- .github/workflows/release.yaml | 6 ++++-- .github/workflows/update-template.yaml | 5 ++++- .pre-commit-config.yaml | 7 +++++++ pyproject.toml.rej | 12 ++++++++++++ setup.cfg.rej | 27 ++++++++++++++++++++++++++ 6 files changed, 55 insertions(+), 4 deletions(-) create mode 100644 pyproject.toml.rej create mode 100644 setup.cfg.rej diff --git a/.cruft.json b/.cruft.json index 2955515..9268cae 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "https://github.com/iterative/cookiecutter-dvc-plugin", - "commit": "b5468040d24fba172720eaa61fb37dab48bda808", + "commit": "91159828cdce86290b97bf4985732651805523c4", "checkout": null, "context": { "cookiecutter": { diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 5d5457c..e7589f6 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -9,6 +9,10 @@ permissions: jobs: pip: + environment: pypi + permissions: + contents: read + id-token: write runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 @@ -27,5 +31,3 @@ jobs: twine check dist/* - name: Publish packages to PyPI uses: pypa/gh-action-pypi-publish@release/v1 - with: - password: ${{ secrets.PYPI_TOKEN }} diff --git a/.github/workflows/update-template.yaml b/.github/workflows/update-template.yaml index d4963aa..b238a4f 100644 --- a/.github/workflows/update-template.yaml +++ b/.github/workflows/update-template.yaml @@ -7,6 +7,9 @@ on: jobs: update: + permissions: + contents: write + pull-requests: write runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -23,4 +26,4 @@ jobs: with: commit-message: update template title: update template - token: ${{ secrets.WORKFLOW_TOKEN }} + token: ${{ github.token }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f23ca1e..7278abb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,6 +2,13 @@ ci: skip: [mypy, pylint] repos: + - hooks: + - id: no rej + name: Check for .rej files + entry: .rej files found, fix conflicts from these rejected files. + language: fail + files: \.rej$ + repo: local - hooks: - id: black language_version: python3 diff --git a/pyproject.toml.rej b/pyproject.toml.rej new file mode 100644 index 0000000..999e3c0 --- /dev/null +++ b/pyproject.toml.rej @@ -0,0 +1,12 @@ +diff a/pyproject.toml b/pyproject.toml (rejected hunks) +@@ -58,8 +58,8 @@ load-plugins = ["pylint_pytest"] + + [tool.pylint.message_control] + disable = [ +- "format", "refactoring", "spelling", "design", "no-self-use", +- "invalid-name", "misplaced-comparison-constant", "duplicate-code", "fixme", ++ "format", "refactoring", "spelling", "design", ++ "invalid-name", "duplicate-code", "fixme", + "unused-wildcard-import", "cyclic-import", "wrong-import-order", + "wrong-import-position", "ungrouped-imports", "multiple-imports", + "logging-format-interpolation", "logging-fstring-interpolation", diff --git a/setup.cfg.rej b/setup.cfg.rej new file mode 100644 index 0000000..17f2d70 --- /dev/null +++ b/setup.cfg.rej @@ -0,0 +1,27 @@ +diff a/setup.cfg b/setup.cfg (rejected hunks) +@@ -40,7 +40,7 @@ tests = + pytest-xdist==2.4.0 + pytest-mock==3.6.1 + pytest-lazy-fixture==0.6.3 +- pytest-docker==0.10.3 ++ pytest-docker>=1,<2 + flaky==3.7.0 + mock==4.0.3 + wget==3.2 +@@ -52,14 +52,14 @@ tests = + collective.checkdocs==0.2 + pydocstyle==6.1.1 + # pylint requirements +- pylint==2.11.1 ++ pylint==2.16.2 + # we use this to suppress pytest-related false positives in our tests. + pylint-pytest==1.1.2 + # we use this to suppress some messages in tests, eg: foo/bar naming, + # and, protected method calls in our tests + pylint-plugin-utils==0.6 + # type-checking +- mypy==0.910 ++ mypy==0.981 + types-requests==2.25.11 + types-tabulate==0.8.3 + types-toml==0.10.1 From a24644a86104d58de2dc2e79450188e2aeda7738 Mon Sep 17 00:00:00 2001 From: Helio Machado <0x2b3bfa0+git@googlemail.com> Date: Tue, 12 Sep 2023 23:16:50 +0200 Subject: [PATCH 2/3] Delete pyproject.toml.rej --- pyproject.toml.rej | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 pyproject.toml.rej diff --git a/pyproject.toml.rej b/pyproject.toml.rej deleted file mode 100644 index 999e3c0..0000000 --- a/pyproject.toml.rej +++ /dev/null @@ -1,12 +0,0 @@ -diff a/pyproject.toml b/pyproject.toml (rejected hunks) -@@ -58,8 +58,8 @@ load-plugins = ["pylint_pytest"] - - [tool.pylint.message_control] - disable = [ -- "format", "refactoring", "spelling", "design", "no-self-use", -- "invalid-name", "misplaced-comparison-constant", "duplicate-code", "fixme", -+ "format", "refactoring", "spelling", "design", -+ "invalid-name", "duplicate-code", "fixme", - "unused-wildcard-import", "cyclic-import", "wrong-import-order", - "wrong-import-position", "ungrouped-imports", "multiple-imports", - "logging-format-interpolation", "logging-fstring-interpolation", From f9e9a823388b15207698f919cd4f772f34332e3e Mon Sep 17 00:00:00 2001 From: Helio Machado <0x2b3bfa0+git@googlemail.com> Date: Tue, 12 Sep 2023 23:16:59 +0200 Subject: [PATCH 3/3] Delete setup.cfg.rej --- setup.cfg.rej | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 setup.cfg.rej diff --git a/setup.cfg.rej b/setup.cfg.rej deleted file mode 100644 index 17f2d70..0000000 --- a/setup.cfg.rej +++ /dev/null @@ -1,27 +0,0 @@ -diff a/setup.cfg b/setup.cfg (rejected hunks) -@@ -40,7 +40,7 @@ tests = - pytest-xdist==2.4.0 - pytest-mock==3.6.1 - pytest-lazy-fixture==0.6.3 -- pytest-docker==0.10.3 -+ pytest-docker>=1,<2 - flaky==3.7.0 - mock==4.0.3 - wget==3.2 -@@ -52,14 +52,14 @@ tests = - collective.checkdocs==0.2 - pydocstyle==6.1.1 - # pylint requirements -- pylint==2.11.1 -+ pylint==2.16.2 - # we use this to suppress pytest-related false positives in our tests. - pylint-pytest==1.1.2 - # we use this to suppress some messages in tests, eg: foo/bar naming, - # and, protected method calls in our tests - pylint-plugin-utils==0.6 - # type-checking -- mypy==0.910 -+ mypy==0.981 - types-requests==2.25.11 - types-tabulate==0.8.3 - types-toml==0.10.1