From 7a4f65681c0df433b2d61bd5b1b0d7edf8b05016 Mon Sep 17 00:00:00 2001 From: Mathieu Scheltienne Date: Sun, 12 Mar 2023 12:37:02 +0100 Subject: [PATCH 1/3] configure codespell in pyproject.toml --- .github/workflows/build.yml | 2 +- .github/workflows/code-style.yml | 9 ++------- .github/workflows/doc.yml | 4 ++-- .github/workflows/publish.yml | 4 ++-- .github/workflows/pytest.yml | 5 ++--- pyproject.toml | 7 ++++++- 6 files changed, 15 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ef981d9b..2c61284c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,7 +15,7 @@ jobs: fail-fast: false matrix: os: [ubuntu, macos, windows] - python-version: [3.8, 3.9, "3.10", "3.11"] + python-version: [3.8, 3.9, '3.10', '3.11'] name: ${{ matrix.os }} - py${{ matrix.python-version }} runs-on: ${{ matrix.os }}-latest defaults: diff --git a/.github/workflows/code-style.yml b/.github/workflows/code-style.yml index 1c8948fa..284e2b8c 100644 --- a/.github/workflows/code-style.yml +++ b/.github/workflows/code-style.yml @@ -15,10 +15,10 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v3 - - name: Setup Python 3.9 + - name: Setup Python uses: actions/setup-python@v4 with: - python-version: '3.9' + python-version: '3.10' architecture: 'x64' - name: Install dependencies run: | @@ -34,11 +34,6 @@ jobs: options: "--check --verbose" - name: Run codespell uses: codespell-project/actions-codespell@master - with: - check_filenames: true - check_hidden: true - skip: './.git,./build,./.mypy_cache,./.pytest_cache' - ignore_words_file: ./.codespellignore - name: Run pydocstyle run: pydocstyle . - name: Run bibclean diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index a3705da8..2fe4b3e0 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -20,10 +20,10 @@ jobs: uses: actions/checkout@v3 with: path: ./main - - name: Setup Python 3.9 + - name: Setup Python uses: actions/setup-python@v4 with: - python-version: 3.9 + python-version: '3.10' architecture: 'x64' - name: Install package run: | diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9306ae86..8e95a02c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -11,10 +11,10 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v3 - - name: Setup Python 3.9 + - name: Setup Python uses: actions/setup-python@v4 with: - python-version: '3.9' + python-version: '3.10' architecture: 'x64' - name: Install dependencies run: | diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index deb91804..0c98bd94 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -21,7 +21,7 @@ jobs: fail-fast: false matrix: os: [ubuntu, macos, windows] - python-version: [3.8, 3.9, "3.10", "3.11"] + python-version: [3.8, 3.9, '3.10', '3.11'] name: ${{ matrix.os }} - py${{ matrix.python-version }} runs-on: ${{ matrix.os }}-latest defaults: @@ -44,11 +44,10 @@ jobs: - name: Run pytest run: pytest template --cov=template --cov-report=xml --cov-config=pyproject.toml - name: Upload to codecov - if: ${{ matrix.os == 'ubuntu' && matrix.python-version == 3.9 }} uses: codecov/codecov-action@v3 with: files: ./coverage.xml flags: unittests # optional name: codecov-umbrella # optional - fail_ci_if_error: true # optional (default = false) + fail_ci_if_error: false # optional (default = false) verbose: true # optional (default = false) diff --git a/pyproject.toml b/pyproject.toml index 125b0fb5..75635514 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ doc = [ style = [ 'bibclean', 'black', - 'codespell', + 'codespell[toml]', 'isort', 'pydocstyle[toml]', 'ruff', @@ -108,6 +108,11 @@ extend-exclude = ''' ) ''' +[tool.codespell] +builtin = 'clear,rare,names,code' +ignore-words = './.codespellignore' +skip = './build,./.git,./.mypy_cache,./.pytest_cache,./.ruff_cache' + [tool.isort] profile = 'black' multi_line_output = 3 From 4f6c8952d8eca4e9d1effe36324fb9b568800279 Mon Sep 17 00:00:00 2001 From: Mathieu Scheltienne Date: Sun, 12 Mar 2023 12:49:52 +0100 Subject: [PATCH 2/3] updater config --- pyproject.toml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 75635514..095b0e6f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -110,8 +110,9 @@ extend-exclude = ''' [tool.codespell] builtin = 'clear,rare,names,code' -ignore-words = './.codespellignore' -skip = './build,./.git,./.mypy_cache,./.pytest_cache,./.ruff_cache' +check-hidden = true +ignore-words = '.codespellignore' +skip = './build,./doc/references.bib,./*.egg-info,.codecov.yml,.codespellignore,./.git,./.github,.gitignore,./.mypy_cache,./.pytest_cache,./.ruff_cache' [tool.isort] profile = 'black' From 735ffab1fc4ef611587d190112405cd31d33ab9e Mon Sep 17 00:00:00 2001 From: Mathieu Scheltienne Date: Sun, 12 Mar 2023 12:56:41 +0100 Subject: [PATCH 3/3] don't check hidden files --- pyproject.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 095b0e6f..7ef355e2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -110,9 +110,8 @@ extend-exclude = ''' [tool.codespell] builtin = 'clear,rare,names,code' -check-hidden = true ignore-words = '.codespellignore' -skip = './build,./doc/references.bib,./*.egg-info,.codecov.yml,.codespellignore,./.git,./.github,.gitignore,./.mypy_cache,./.pytest_cache,./.ruff_cache' +skip = './build,./doc/references.bib,./*.egg-info,./.*' [tool.isort] profile = 'black'