Skip to content

Commit

Permalink
update ci
Browse files Browse the repository at this point in the history
  • Loading branch information
paquiteau committed Mar 29, 2024
1 parent f38073c commit 3f0670d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 19 deletions.
32 changes: 17 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,20 @@ jobs:
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python }}
- name: Install deps
run: |
python -m pip install --upgrade pip wheel
python -m pip install python-pysap
python -m pip install .[test] matplotlib
python -m pip install --upgrade git+https://github.com/CEA-COSMIC/ModOpt
python -m pip install --upgrade git+https://github.com/paquiteau/pysap-fmri
- name: Test
run: pytest
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[test,dev]
- name: Linter
run: |
black --check .
ruff .
- name: Test
run: |
pytest
7 changes: 3 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ addopts = [

[tool.ruff]
src = ["src", "tests"]
[tool.ruff.lint]
select = ["E", "F", "B", "Q", "D", "UP", "ANN"]

ignore = [
"ANN101", # missing type annotation for self
"ANN102", # missing type annotation for cls in classmethod.
Expand All @@ -118,10 +118,9 @@ ignore = [
"D105", # missing docstring in magic method
"D404", # Imperative mode is not necessary everywhere, trust me.
]
[tool.ruff.pydocstyle]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
#ignore = ["D107", "D203","D212","D213","D402", "D413", "D415", "D416", "D417", "D105"]
[tool.ruff.per-file-ignores]
[tool.ruff.lint.per-file-ignores]
# relax code quality for tests and examples.
"examples/conftest.py" = ["ANN"]
"examples/example_*.py" = ["D", "ANN"]
Expand Down

0 comments on commit 3f0670d

Please sign in to comment.