Skip to content

Commit

Permalink
🧪 Run tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnyosun committed Jul 29, 2024
1 parent 8651bee commit 10d6d92
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 16 deletions.
28 changes: 15 additions & 13 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,21 @@ def lint(session: nox.Session) -> None:
run_pre_commit(session)


# @nox.session
# def docs(session: nox.Session):
# import lamindb_setup as ln_setup

# login_testuser1(session)
# ln_setup.init(storage="./docsbuild")
# build_docs(session)
@nox.session
def docs(session: nox.Session):
build_docs(session, strict=True)


@nox.session()
def build(session):
session.run(*"pip install -e .[dev]".split())
@nox.session
@nox.parametrize("group", ["bionty-unit", "bionty-docs"])
def build(session: nox.Session, group: str):
session.run(*"uv pip install --system -e .[dev]".split())
# session.run(*"pip install git+https://github.com/laminlabs/lamindb".split())
# run_pytest(session, coverage=False)
# docs(session)
# move_built_docs_to_docs_slash_project_slug()
# session.run(*"pip install git+https://github.com/laminlabs/lamindb-setup".split())
# session.run(*"pip install git+https://github.com/laminlabs/lnschema-core".split())
coverage_args = "--cov=bionty --cov-append --cov-report=term-missing"
if group == "bionty-unit":
session.run(*f"pytest {coverage_args} ./tests".split())
elif group == "bionty-docs":
session.run(*f"pytest -s {coverage_args} ./docs/guide".split())
docs(session)
10 changes: 7 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,25 @@ classifiers = [
"Programming Language :: Python :: 3.10",
]
dependencies = [
"lnschema_core>=0.69.0",
"bionty_base==0.38.0",
"lamindb",
"filelock",
"requests",
"pyyaml",
]

[project.urls]
Home = "https://github.com/laminlabs/bionty"

[project.optional-dependencies]
test = [
dev = [
"pre-commit",
"nox",
"requests",
"pytest>=6.0",
"pytest-cov",
"nbproject-test",
"pronto>=2.5.4, <2.5.6",
"laminci",
]

[tool.pytest.ini_options]
Expand Down

0 comments on commit 10d6d92

Please sign in to comment.