Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overhaul snakebids create #336

Merged
merged 8 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
171 changes: 31 additions & 140 deletions poetry.lock

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

35 changes: 20 additions & 15 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ authors = [
"Jason Kai <[email protected]>",
]
license = "MIT"
packages = [
{ include = "snakebids" }
]
packages = [{ include = "snakebids" }]
exclude = ["snakebids/tests/**"]

[tool.poetry-dynamic-versioning]
Expand All @@ -26,12 +24,11 @@ bump = true

[tool.poetry-dynamic-versioning.substitution]
files = [
'snakebids/project_template/cookiecutter.json',
'snakebids/__init__.py'
'snakebids/__init__.py',
]
patterns = [
"(^\\s+\"snakebids_version\":\\s*\")[^'\"]*(\")",
"(^__version__\\s*(?::.*?)?=\\s*['\"])[^'\"]*(['\"])"
"(^__version__\\s*(?::.*?)?=\\s*['\"])[^'\"]*(['\"])",
]

[tool.poetry.dependencies]
Expand All @@ -42,7 +39,6 @@ snakemake = [
{ version = ">=7.18.2", python = ">=3.11" },
]
PyYAML = "^6"
cookiecutter = "^2.1.1"
typing-extensions = ">=3.10.0"
attrs = ">=21.2.0,<24"
boutiques = "^0.5.25"
Expand All @@ -57,15 +53,18 @@ importlib-resources = ">=5.12.0,<7"
# on the python version being used.
numpy = [
{ version = "<=1.24.4", python = "<3.9" },
{ version = ">=1.23.2", python = ">=3.11" }
{ version = ">=1.23.2", python = ">=3.11" },
]
# Use minimum of 1.10.0 because of security vulnerability
scipy = [
{ version = ">=1.10.0,<=1.10.1", python = "<3.9" },
{ version = ">=1.10.0", python = ">=3.9" }
{ version = ">=1.10.0", python = ">=3.9" },
]
# minimum 8.2.0 to use post-copy mesages
copier = ">=8.2.0"
jinja2-time = ">=0.2.0"
# minimum 2.31.0 because of security vulnerability
requests = ">=2.31.0"

[tool.poetry.group.dev.dependencies]
black = "^23.1.0"
Expand All @@ -88,6 +87,7 @@ ruff = "^0.0.285"
pytest-xdist = "^3.3.1"
pytest-split = "^0.8.1"
tomli = "^2.0.1"
requests-mock = "^1.11.0"

[tool.poetry.scripts]
snakebids = "snakebids.admin:main"
Expand All @@ -113,13 +113,18 @@ expr = "platform.python_version()"

[tool.poe.tasks.build-container]
args = [{ name = "container_id", positional = true, required = true }]
uses = { VERSION = "_get_version"}
uses = { VERSION = "_get_version" }
cmd = """
docker build 'containers/${container_id}' \
--tag 'snakebids/${container_id}:${VERSION}' \
--build-arg="PYTHON_VERSION=${VERSION}"
"""

[tool.pytest.ini_options]
markers = [
"docker: marks tests as requiring docker (deselect with '-m \"not docker\"')",
]

[tool.isort]
profile = "black"
multi_line_output = 3
Expand All @@ -133,11 +138,11 @@ reportImportCycles = false

[tool.ruff]
select = [
"E", # pycodestyle error
"F", # pyflakes
"PL", # pylint
"RUF", # ruff
"UP", #pyupgrade
"E", # pycodestyle error
"F", # pyflakes
"PL", # pylint
"RUF", # ruff
"UP", #pyupgrade
"T100", # debugger
]
ignore = ["PLR0913"]
Expand Down
2 changes: 1 addition & 1 deletion snakebids/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def gen_parser() -> argparse.ArgumentParser:


def main() -> None:
"""Invoke snakebids cli."""
"""Invoke Snakebids cli."""

parser = gen_parser()
args = parser.parse_args()
Expand Down
Loading