Skip to content

Commit

Permalink
Make development environment workable
Browse files Browse the repository at this point in the history
  • Loading branch information
Kludex authored and art049 committed Mar 23, 2024
1 parent 849f96a commit 00ce543
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -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/* \
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
10 changes: 5 additions & 5 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,23 @@ tasks:
deps:
- task: "mongodb:check"
cmds:
- pytest -rs -n auto
- python -m pytest -rs -n auto

bench:
desc: |
Run the benches with the current version.
deps:
- task: "mongodb:check"
cmds:
- pytest --benchmark-enable --benchmark-only
- python -m pytest --benchmark-enable --benchmark-only

default:
desc: |
Run the tests related to changes with the current version.
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.
Expand All @@ -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.
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 00ce543

Please sign in to comment.