3 Star 0 Fork 0

Gitee 极速下载 / genai

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/noteable-io/genai
克隆/下载
noxfile.py 1.52 KB
一键复制 编辑 原始数据 按行查看 历史
import nox
import nox_poetry
LINT_PATHS = ["genai", "noxfile.py"]
nox.options.reuse_existing_virtualenv = True
nox.options.sessions = ["lint", "test"]
@nox_poetry.session(python=["3.8", "3.9", "3.10"])
def test(session: nox_poetry.Session):
session.run_always("poetry", "install", external=True)
session.run("pytest", "-v", "--cov=genai")
@nox_poetry.session(python="3.9")
def generate_coverage_xml(session: nox_poetry.Session):
session.install("coverage[toml]")
session.run("coverage", "xml")
@nox_poetry.session(python="3.9")
def lint(session: nox_poetry.Session):
session.notify("black_check")
session.notify("flake8")
session.notify("isort_check")
@nox_poetry.session(python="3.9")
def flake8(session: nox_poetry.Session):
session.install("flake8")
session.run("flake8", *LINT_PATHS, "--count", "--show-source", "--statistics", "--benchmark")
@nox_poetry.session(python="3.9")
def black_check(session: nox_poetry.Session):
session.install("black")
session.run("black", "--check", *LINT_PATHS)
@nox_poetry.session(python="3.9")
def isort_check(session: nox_poetry.Session):
session.install("isort")
session.run("isort", "--diff", "--profile", "black", "--check", *LINT_PATHS)
@nox_poetry.session(python="3.9")
def blacken(session: nox_poetry.Session):
session.install("black")
session.run("black", *LINT_PATHS)
@nox_poetry.session(python="3.9")
def isort_apply(session: nox_poetry.Session):
session.install("isort")
session.run("isort", *LINT_PATHS, "--profile", "black")
Python
1
https://gitee.com/mirrors/genai.git
git@gitee.com:mirrors/genai.git
mirrors
genai
genai
main

搜索帮助