-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from nishaq503/dev
Added github workflows and pre-commit hooks
- Loading branch information
Showing
5 changed files
with
154 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Tool Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
- dev | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
tools-release: | ||
name: Call workflow from image-tools | ||
if: github.repository == 'polusai/tabular-tools' | ||
uses: polusai/image-tools/.github/workflows/package-release.yml | ||
with: | ||
repo_name: "tabular-tools" | ||
secrets: | ||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Package tests | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
- master | ||
- dev | ||
push: | ||
branches-ignore: | ||
- main | ||
- master | ||
- dev | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
tools-tests: | ||
name: Call workflow from image-tools | ||
if: github.repository == 'polusai/tabular-tools' | ||
uses: polusai/image-tools/.github/workflows/tests.yml | ||
with: | ||
repo_name: "tabular-tools" | ||
secrets: | ||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
fail_fast: true | ||
|
||
repos: | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: check-added-large-files | ||
- id: check-case-conflict | ||
- id: check-json | ||
- id: pretty-format-json | ||
args: | ||
- "--autofix" | ||
- "--indent=2" | ||
- "--no-sort-keys" | ||
- id: check-toml | ||
- id: check-xml | ||
- id: check-yaml | ||
- id: debug-statements | ||
- id: detect-aws-credentials | ||
args: | ||
- "--allow-missing-credentials" | ||
- id: detect-private-key | ||
- id: end-of-file-fixer | ||
- id: mixed-line-ending | ||
args: ["--fix=lf"] | ||
description: Forces to replace line ending by the UNIX 'lf' character. | ||
- id: trailing-whitespace | ||
exclude: '.bumpversion.cfg' | ||
- id: check-merge-conflict | ||
|
||
- repo: https://github.com/psf/black | ||
rev: '23.3.0' | ||
hooks: | ||
- id: black | ||
language_version: python3.9 | ||
exclude: ^src\/polus\/plugins\/_plugins\/models\/\w*Schema.py$ | ||
|
||
- repo: https://github.com/charliermarsh/ruff-pre-commit | ||
# Ruff version. | ||
rev: 'v0.0.274' | ||
hooks: | ||
- id: ruff | ||
exclude: ^src\/polus\/plugins\/_plugins\/models\/\w*Schema.py$ | ||
args: [--fix] | ||
|
||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: 'v1.4.0' | ||
hooks: | ||
- id: mypy | ||
exclude: ^src\/polus\/plugins\/_plugins\/models\/\w*Schema.py$ | ||
additional_dependencies: [types-requests==2.31.0.1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
select = [ | ||
"F", # pyflakes | ||
"E", # pycodestyle errors | ||
"W", # pycodestyle warnings | ||
"C90", # mccabe | ||
"I", # isort | ||
"N", # pep8-naming | ||
"D", # pydocstyle | ||
"UP", # pyupgrade | ||
"ANN", # flake8-annotations | ||
"S", # flake8-bandit | ||
"BLE", # flake8-blind-except | ||
"B", # flake8-bugbear | ||
"A", # flake8-builtins | ||
"COM", # flake8-commas | ||
"C4", # flake8-comprehensions | ||
"EM", # flake8-errmsg | ||
"INP", # flake8-no-pep420 | ||
"T20", # flake8-print | ||
"PYI", # flake8-pyi, type-hinting stub files | ||
"PT", # flake8-pytest-style | ||
"RSE", # flake8-raise | ||
"RET", # flake8-return | ||
"SIM", # flake8-simplify | ||
"ARG", # flake8-unused-arguments | ||
"ERA", # flake8-eradicate | ||
"PTH", # flake8-use-pathlib | ||
"PL", # pylint | ||
"FLY", # flynt | ||
"NPY", # NumPy-specific rules | ||
"RUF", # Ruff-specific rules | ||
] | ||
ignore = ["ANN101", "ANN102"] | ||
unfixable = ["B"] # Avoid trying to fix flake8-bugbear violations. | ||
target-version = "py39" # Assume Python 3.9. | ||
|
||
[mccabe] | ||
# Unlike Flake8, default to a complexity level of 10. | ||
max-complexity = 12 | ||
|
||
[pydocstyle] | ||
convention = "google" | ||
|
||
# Ignore `F401` (unused import violations) in all `__init__.py` files. | ||
[per-file-ignores] | ||
"__init__.py" = ["F401"] | ||
"__main__.py" = ["B008", "S101"] | ||
"./**/tests/*.py" = ["S101"] # Use of assert detected. | ||
|
||
[isort] | ||
force-single-line = true |