diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 6d173087..91d4126a 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,9 +1,9 @@ -FROM fkrull/multi-python +FROM mcr.microsoft.com/devcontainers/python:3.8 RUN apt-get update \ && apt-get install -y --no-install-recommends \ + netcat-openbsd \ git-lfs \ - netcat \ && apt-get clean autoclean \ && apt-get autoremove -y \ && rm -rf /var/lib/apt/lists/* \ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 17abc11c..7837431a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks default_language_version: - python: python3.9 + python: python3.8 node: 15.4.0 repos: - repo: https://github.com/pre-commit/pre-commit-hooks diff --git a/Taskfile.yml b/Taskfile.yml index b8402f9e..81503b7d 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -25,7 +25,7 @@ tasks: deps: - task: "mongodb:check" cmds: - - pytest -rs -n auto + - python -m pytest -rs -n auto bench: desc: | @@ -33,7 +33,7 @@ tasks: deps: - task: "mongodb:check" cmds: - - pytest --benchmark-enable --benchmark-only + - python -m pytest --benchmark-enable --benchmark-only default: desc: | @@ -41,7 +41,7 @@ tasks: deps: - task: mongodb cmds: - - pytest -rs --testmon + - python -m pytest -rs --testmon coverage: desc: Get the test coverage (xml and html) with the current version. @@ -68,8 +68,8 @@ tasks: format: desc: Format the code (and imports). cmds: - - isort odmantic tests - - black odmantic tests + - python -m isort odmantic tests + - python -m black odmantic tests setup: desc: Configure the development environment. diff --git a/pyproject.toml b/pyproject.toml index e4fc496e..b7f1a0fe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -75,6 +75,7 @@ doc = [ "mkdocstrings[python] ~= 0.24.0", "mkdocs-macros-plugin ~= 1.0.4", ] +lint = ["isort ~= 5.13.2", "black ~= 24.3.0"] dev = ["ipython ~= 7.16.1"] [project.urls]