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

make dev container work #438

Merged
merged 3 commits into from
Mar 23, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.9"
python-version: "3.8"
- uses: pre-commit/[email protected]
with:
extra_args: --all-files
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
7 changes: 2 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ dependencies = [
]
[project.optional-dependencies]
test = [
"ruff ~= 0.3.3",
"mypy ~= 1.4.1",
"pytest ~= 7.0",
"pytest-xdist ~= 2.1.0",
"pytest-asyncio ~= 0.16.0",
Expand All @@ -62,8 +60,6 @@ test = [
"uvicorn ~= 0.17.0",
"fastapi >=0.104.0",
"requests ~= 2.24",
"typer ~= 0.4.1",
"semver ~= 2.13.0",
"pytest-benchmark ~= 4.0.0",
"pytest-codspeed ~= 2.1.0",
"httpx ~= 0.24.1",
Expand All @@ -75,7 +71,8 @@ doc = [
"mkdocstrings[python] ~= 0.24.0",
"mkdocs-macros-plugin ~= 1.0.4",
]
dev = ["ipython ~= 7.16.1"]
lint = ["ruff ~= 0.3.3", "mypy ~= 1.4.1"]
dev = ["semver ~= 2.13.0", "typer ~= 0.4.1", "ipython ~= 7.16.1"]

[project.urls]
Documentation = "https://art049.github.io/odmantic"
Expand Down
Loading