diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 18c8846..e23b13c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,33 +14,46 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - python-version: ["3.8", "3.10"] # 3.10 is converted to 3.1 if not a string + python-version: ["3.8", "3.11"] os: [ubuntu-latest, macos-latest, windows-latest] env: OS: ${{ matrix.os }} PYTHON_VERSION: ${{ matrix.python-version }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | python -m pip install --upgrade pip pip install .[test] - - name: Check code formatting and linting - if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.8' # linting should occur only once in the loop + - name: Check code formatting with ruff + if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11' # linting should occur only once in the loop run: | - make lint + ruff format . --check + - name: Check import order and syntax with ruff + if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11' # linting should occur only once in the loop + #"F", # Pyflakes + #"E", # Pycodestyle + # "W", # Pycodestyle + # "UP", # pyupgrade + # "I", # isort + # "PL", # Pylint + # PLR0913 lines-too-long managed by "ruff format" + run: | + ruff check . --select F,E,W,UP,I,PL --ignore E,PLR0913 --exclude "/template/" + - name: Test with pytest and generate coverage report run: | pytest --cov=./ --cov-report=xml - name: Upload coverage report to Codecov - uses: codecov/codecov-action@v3 - if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.8' # upload should occur only once in the loop + uses: codecov/codecov-action@v4 + if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11' # upload should occur only once in the loop with: token: ${{ secrets.CODECOV_TOKEN }} # token is not mandatory but make access more stable + # use_oidc: true would better? file: ./coverage.xml env_vars: OS,PYTHON fail_ci_if_error: true diff --git a/docs/conf.py b/docs/conf.py index 9f1f980..5b9d848 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -52,7 +52,7 @@ "sphinx_markdown_tables", "myst_parser", "sphinxawesome_theme", - "sphinxawesome_theme.docsearch", + "sphinx_docsearch", # before: "sphinxawesome_theme.docsearch", "sphinxawesome_theme.highlighting", ] diff --git a/setup.py b/setup.py index 98b707c..992928d 100644 --- a/setup.py +++ b/setup.py @@ -38,10 +38,11 @@ def _parse_requirements(path, encoding="utf-8"): install_requires=base_requirements, extras_require={ "doc": [ - "sphinx>=4.5.0,<7.2.0", # https://github.com/kai687/sphinxawesome-theme/issues/1464 + "sphinx>=4.5.0,<7.3.0", # https://github.com/kai687/sphinxawesome-theme/issues/1464 "sphinxawesome-theme", + "sphinx-docsearch", "sphinx-markdown-tables~=0.0.15", - "sphinx-click>=3.1,<4.5", + "sphinx-click>=3.1,<6.0", "sphinx_copybutton~=0.5.0", # "sphinx-sitemap", "sphinx-design",