Skip to content

Commit

Permalink
add initial test
Browse files Browse the repository at this point in the history
  • Loading branch information
xmnlab committed Jan 17, 2024
1 parent d99e06f commit 48ce04b
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 77 deletions.
4 changes: 2 additions & 2 deletions .makim.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ groups:
targets:
ci:
help: run semantic release on CI
run: "{{ vars.app }} --ci"
run: {{ vars.app }} --ci

dry:
help: run semantic release in dry-run mode
run: "{{ vars.app }} --dry-run"
run: {{ vars.app }} --dry-run
151 changes: 76 additions & 75 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,85 +1,86 @@
default_stages:
- commit
- commit
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: end-of-file-fixer
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: end-of-file-fixer

- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v3.0.2"
hooks:
- id: prettier
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v3.0.2"
hooks:
- id: prettier
exclude: ".makim.yaml"

- repo: local
hooks:
- id: ruff-format
name: ruff-format
entry: ruff format
exclude: |
(?x)(
docs
)
language: system
pass_filenames: true
types:
- python
- repo: local
hooks:
- id: ruff-format
name: ruff-format
entry: ruff format
exclude: |
(?x)(
docs
)
language: system
pass_filenames: true
types:
- python

- id: ruff-linter
name: ruff-linter
entry: ruff check
language: system
exclude: "docs/"
pass_filenames: true
types:
- python
- id: ruff-linter
name: ruff-linter
entry: ruff check
language: system
exclude: "docs/"
pass_filenames: true
types:
- python

- id: mypy
name: mypy
entry: mypy
language: system
files: "./"
pass_filenames: true
types:
- python
- id: mypy
name: mypy
entry: mypy
language: system
files: "./"
pass_filenames: true
types:
- python

- id: shellcheck
name: shellcheck
entry: shellcheck
language: system
types_or:
- sh
- shell
- ash
- bash
- bats
- dash
- ksh
- id: shellcheck
name: shellcheck
entry: shellcheck
language: system
types_or:
- sh
- shell
- ash
- bash
- bats
- dash
- ksh

- id: bandit
name: bandit
entry: bandit
language: system
args: ["--configfile", "pyproject.toml", "-iii", "-lll"]
pass_filenames: true
types:
- python
- id: bandit
name: bandit
entry: bandit
language: system
args: ["--configfile", "pyproject.toml", "-iii", "-lll"]
pass_filenames: true
types:
- python

- id: vulture
name: vulture
entry: vulture --min-confidence 80
language: system
files: "src/pyuml"
description: Find unused Python code.
pass_filenames: true
types:
- python
- id: vulture
name: vulture
entry: vulture --min-confidence 80
language: system
files: "src/pyuml"
description: Find unused Python code.
pass_filenames: true
types:
- python

- id: mccabe
name: mccabe
entry: python -m mccabe --min 10
language: system
files: "src/pyuml"
pass_filenames: true
types:
- python
- id: mccabe
name: mccabe
entry: python -m mccabe --min 10
language: system
files: "src/pyuml"
pass_filenames: true
types:
- python
8 changes: 8 additions & 0 deletions tests/notebooks/test_pyuml.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
"""Main tests for pyuml."""


def test_import() -> None:
"""Test import."""
import pyuml

assert pyuml

0 comments on commit 48ce04b

Please sign in to comment.