Skip to content

Commit

Permalink
enable ruff linting etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
linuxrider committed Jul 5, 2024
1 parent d632fd8 commit e163406
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 3 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Lint
on:
push: { branches: [ "main" ] }
pull_request: { branches: [ "main" ] }

concurrency:
group: lint-${{ github.ref }}
cancel-in-progress: true

jobs:
python-linter:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
with: { submodules: recursive }
- name: setup conda environment
uses: conda-incubator/setup-miniconda@v3
with:
python-version: "${{ matrix.python }}"
miniforge-variant: Mambaforge
- name: install dependencies
shell: bash -l {0}
run: |
mamba env update --quiet -n test -f environment-dev.yml
mamba list
- name: ruff lint
shell: bash -l {0}
run: |
ruff check .
- name: ruff format
shell: bash -l {0}
run: |
ruff format .
- name: ruff isort
shell: bash -l {0}
run: |
ruff check --select I .
4 changes: 1 addition & 3 deletions environment-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@ channels:
- defaults
dependencies:
- astropy>=5,<6
- black
- click>=8,<9
- datapackage>=1.15,<2
- desktop-app>=0.3
- dill>=0.3.4,<0.4
- isort
- jupytext
- mypy>0.93
- myst-nb
Expand All @@ -21,10 +19,10 @@ dependencies:
- pint>=0.18,<1
- pip>=22,<23
- pyinstaller>=5.7.0
- pylint>=2.12,<3
- pyqt>=5.12,<5.131
- pytest>=6.2,<7
- pyyaml>=6,<7
- ruff
- sphinx
- sphinx_rtd_theme
- toml>0.10
Expand Down

0 comments on commit e163406

Please sign in to comment.