🔧 Add scripts

This commit is contained in:
Sebastián Ramírez 2021-08-24 16:03:19 +02:00
parent b36c4add7e
commit d7f5b577bc
7 changed files with 47 additions and 0 deletions

5
scripts/docs-live.sh Executable file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -e
mkdocs serve --dev-addr 127.0.0.1:8008

6
scripts/format.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/sh -e
set -x
autoflake --remove-all-unused-imports --recursive --remove-unused-variables --in-place sqlmodel docs_src tests --exclude=__init__.py
black sqlmodel tests docs_src
isort sqlmodel tests docs_src

9
scripts/lint.sh Executable file
View File

@ -0,0 +1,9 @@
#!/usr/bin/env bash
set -e
set -x
mypy sqlmodel
flake8 sqlmodel tests docs_src
black sqlmodel tests docs_src --check
isort sqlmodel tests docs_src scripts --check-only

5
scripts/publish.sh Executable file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -e
python -m poetry publish --build

7
scripts/test-cov-html.sh Executable file
View File

@ -0,0 +1,7 @@
#!/usr/bin/env bash
set -e
set -x
bash ./scripts/test.sh
coverage html

7
scripts/test-files.sh Executable file
View File

@ -0,0 +1,7 @@
#!/usr/bin/env bash
set -e
set -x
# Check README.md is up to date
diff --brief docs/index.md README.md

8
scripts/test.sh Executable file
View File

@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -e
set -x
coverage run -m pytest tests
coverage combine
coverage report --show-missing