Skip to content

Commit

Permalink
CI
Browse files Browse the repository at this point in the history
  • Loading branch information
nichollsh committed Sep 6, 2024
1 parent 8e976e4 commit c0d573d
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 8 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/code-style.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Code style

on:
push:
branches:
- main
pull_request:
branches:
- main
types:
- opened
- reopened
- synchronize
- ready_for_review
workflow_dispatch:

jobs:
codestyle:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v45

- name: Run Pre-Commit
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
uses: pre-commit/[email protected]
with:
extra_args: --files $ALL_CHANGED_FILES
6 changes: 1 addition & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
{
"editor.tabSize": 4,
"editor.rulers": [ 92 ],
"python.analysis.extraPaths": ["JANUS/src/","MORS/src/"],
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
"git.ignoreLimitWarning": true,
"git.ignoredRepositories": [
"petsc", "SPIDER"
],
"python.analysis.exclude": [
"**/__pycache__", "petsc", ".git", "SPIDER"
"**/__pycache__", ".git",
]
}
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ ignore = [
"E501", # Line too long
]

# [tool.ruff.lint.isort]
# known-first-party=["calliope"]
# required-imports = ["from __future__ import annotations"]
[tool.ruff.lint.isort]
known-first-party=["calliope"]
required-imports = ["from __future__ import annotations"]

[tool.ruff.format]
quote-style = "single"
Expand Down

0 comments on commit c0d573d

Please sign in to comment.