Skip to content
This repository has been archived by the owner on Nov 21, 2022. It is now read-only.

Commit

Permalink
use generalized CI checks (#293)
Browse files Browse the repository at this point in the history
* use generalized CI checks
* mypy

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
Borda and pre-commit-ci[bot] authored Oct 8, 2022
1 parent 08801bb commit 4bf8b9f
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 92 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/ci-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: General checks

on:
push:
branches: [master]
pull_request:
branches: [master]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }}
cancel-in-progress: ${{ ! (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')) }}

jobs:
check-code:
uses: Lightning-AI/utilities/.github/workflows/[email protected]

check-schema:
uses: Lightning-AI/utilities/.github/workflows/[email protected]
with:
azure-dir: ""

check-package:
uses: Lightning-AI/utilities/.github/workflows/[email protected]
with:
import-name: "lightning_transformers"
pypi-name: "lightning-transformers"

# TODO: use also this after resolving bug with actions: https://github.com/Lightning-AI/utilities/pull/51
# check-docs:
# uses: Lightning-AI/utilities/.github/workflows/check-docs.yml@main
# with:
# requirements-file: "docs/requirements.txt"
52 changes: 0 additions & 52 deletions .github/workflows/ci_install-pkg.yml

This file was deleted.

40 changes: 0 additions & 40 deletions .github/workflows/code-format.yml

This file was deleted.

Empty file.
Empty file.
45 changes: 45 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,48 @@ known_first_party = [
skip_glob = []
profile = "black"
line_length = 120

[tool.mypy]
files = [
"lightning_transformers",
]
install_types = "True"
non_interactive = "True"
disallow_untyped_defs = "True"
ignore_missing_imports = "True"
show_error_codes = "True"
warn_redundant_casts = "True"
warn_unused_configs = "True"
warn_unused_ignores = "True"
allow_redefinition = "True"
# disable this rule as the Trainer attributes are defined in the connectors, not in its __init__
disable_error_code = "attr-defined"
# style choices
warn_no_return = "False"

# Ignore mypy errors for these files
# TODO: the goal is for this to be empty
[[tool.mypy.overrides]]
module = [
"lightning_transformers.callbacks.*",
"lightning_transformers.core.*",
"lightning_transformers.core.seq2seq.*",
"lightning_transformers.plugins.*",
'lightning_transformers.task.vision.image_classification.*',
'lightning_transformers.task.nlp.**.*',
'lightning_transformers.task.nlp.text_classification.*',
'lightning_transformers.task.nlp.token_classification.*',
'lightning_transformers.task.nlp.question_answering.*',
'lightning_transformers.task.nlp.question_answering.datasets.squad.*',
'lightning_transformers.task.nlp.masked_language_modeling.*',
'lightning_transformers.task.nlp.multiple_choice.*',
'lightning_transformers.task.nlp.multiple_choice.datasets.race.*',
'lightning_transformers.task.nlp.language_modeling.*',
'lightning_transformers.task.nlp.translation.*',
'lightning_transformers.task.nlp.translation.datasets.*',
'lightning_transformers.task.nlp.summarization.*',
'lightning_transformers.task.nlp.summarization.datasets.*',
"lightning_transformers.task.vision.image_classification.*",
"lightning_transformers.utilities.*",
]
ignore_errors = "True"

0 comments on commit 4bf8b9f

Please sign in to comment.