Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: pytest, ruff and poe based buid for quicker interations #104

Merged
merged 2 commits into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 0 additions & 59 deletions .github/workflows/SlackRelease.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
poetry install
- name: Build
run: |
poetry run task build
poetry run pytest
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v2

Expand All @@ -42,4 +42,4 @@ jobs:
poetry install
- name: Build
run: |
poetry run task build
poetry run pytest
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Publish docs
run: |
poetry install
poetry run task docs-deploy
poetry run poe docs-deploy

docker:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -62,4 +62,4 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
short-description: ${{ github.event.repository.description }}
repository: michalmrazek9/wanna-ml
repository: michalmrazek9/wanna-ml
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ share/python-wheels/
.installed.cfg
*.egg
MANIFEST
.ruff_cache

# PyInstaller
# Usually these files are written by a python script from a template
Expand Down
73 changes: 0 additions & 73 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,83 +3,10 @@ exclude: (samples/|src/wanna/components/templates|templates/)
repos:
- repo: local
hooks:
- id: isort
name: isort
entry: poetry run isort
language: python
args: [
"--line-length=120",
"--py", "38",
"--profile", "black",
]
verbose: false
- id: black
name: black
entry: poetry run black
args: [
"--line-length=120",
"--target-version", "py38"
]
# files: \.py
language: python
verbose: false
- id: flake8
name: flake8
entry: poetry run flake8
language: python
# files: \.py
#exclude: ""
args: [
"--max-line-length=120",
"--extend-ignore=E203,E712,E722,W503,W605"
]
# E203 - Whitespace before ':'
# E712 - Comparison to true should be 'if cond is true:' or 'if cond:'
# E722 - Do not use bare except, specify exception instead
# W503 - Line break occurred before a binary operator
# W605 - Invalid escape sequence 'x'
verbose: false
- id: pylint
name: pylint
entry: poetry run pylint
language: python
# files: \.py
args: [
"--enable-all-extensions",
"--errors-only",
"--max-line-length=120",
"--generated-members=torch.*",
"--ignored-modules=multiprocess",
"--disable=C0103,C0114,C0115,C0116,E1101"
]
# C0103 - invalid-name
# C0114 - missing-module-docstring
# C0115 - missing-class-docstring
# C0116 - missing-function-docstring
verbose: false
- id: mypy
name: mypy
entry: poetry run mypy
language: python
# files: \.py
args: [
"--ignore-missing-imports"
]
verbose: false
- id: pytest
name: pytest
entry: poetry run pytest
language: python
args: ["-W", "ignore", "-s", "--cov=src", "--cov-append"]
always_run: true
pass_filenames: false
verbose: true

# - repo: https://github.com/pre-commit/pre-commit-hooks
# rev: v2.3.0
# hooks:
# - id: check-yaml
# args: [--allow-multiple-documents]
# - id: trailing-whitespace
# - id: end-of-file-fixer
# - id: check-added-large-files
Loading
Loading