Skip to content

Commit

Permalink
Resolve various bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
pvandyken committed Apr 17, 2024
1 parent 5acac8f commit b01c86e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 23 deletions.
2 changes: 1 addition & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,17 @@ pandas = [
{ version = "<=2.0.3", python = "<3.9" },
{ version = ">=2.1.1", python = ">=3.12" },
]
# minimum 8.2.0 to use post-copy mesages
copier = ">=8.2.0"
# minimum 9.2.0 because of breaking dependency changes and changes to validation errors
copier = ">=9.2.0"
jinja2-time = ">=0.2.0"
# minimum 2.31.0 because of security vulnerability
requests = ">=2.31.0"
ruamel-yaml = ">=0.17.2"
lazy-loader = ">=0.3"
# Docutils is a requirement of snakemake, for snakebids otherwise it is merely a doc
# dependency. Can't do 0.21 with poetry because of https://github.com/python-poetry/poetry/issues/9293
docutils = "!=0.21.1"
# dependency. 0.21.post1 needs to be excluded because of
# https://github.com/python-poetry/poetry/issues/9293
docutils = "!=0.21.post1"

[tool.poetry.group.dev.dependencies]
pytest = "^7.0.0"
Expand Down
5 changes: 2 additions & 3 deletions snakebids/tests/test_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import copier
import more_itertools as itx
import pathvalidate
import prompt_toolkit.validation
import pytest
import requests_mock
from hypothesis import HealthCheck, assume, given, settings
Expand Down Expand Up @@ -98,7 +97,7 @@ def invalid_emails():
def test_invalid_email_raises_error(email: str, tmp_path: Path):
data = get_empty_data("testapp", "setuptools")
data["email"] = email
with pytest.raises(prompt_toolkit.validation.ValidationError):
with pytest.raises(ValueError, match="Must be a valid email"):
copier.run_copy(
str(Path(itx.first(snakebids.__path__), "project_template")),
tmp_path / data["app_full_name"],
Expand Down Expand Up @@ -184,7 +183,7 @@ def test_gets_correct_snakebids_version(
@allow_function_scoped
def test_invalid_app_name_raises_error(name: str, tmp_path: Path):
data = get_empty_data(name, "setuptools")
with pytest.raises(prompt_toolkit.validation.ValidationError):
with pytest.raises(ValueError, match="Name must be a valid"):
copier.run_copy(
str(Path(itx.first(snakebids.__path__), "project_template")),
tmp_path / data["app_full_name"],
Expand Down
15 changes: 0 additions & 15 deletions typings/importlib_metadata/__init__.pyi

This file was deleted.

0 comments on commit b01c86e

Please sign in to comment.