From a573d876770bdadaa1c326ebaad35b7e6e63c52d Mon Sep 17 00:00:00 2001 From: Ernesto Serrano Date: Tue, 5 Aug 2025 11:37:08 +0200 Subject: [PATCH 1/2] Add parelized tests --- Makefile | 8 ++++---- pyproject.toml | 21 ++++++++++++++++++++- requirements.txt | 1 + 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index f47ac26..ac07b3e 100644 --- a/Makefile +++ b/Makefile @@ -37,10 +37,10 @@ docs: mkdocs build --strict test-local: ensure-env - pytest --moodle-env local + pytest --moodle-env local -n auto test-staging: ensure-env - pytest --moodle-env staging + pytest --moodle-env staging -n auto test: upd test-local @@ -63,8 +63,8 @@ help: @echo " docs - Build documentation with mkdocs" @echo "" @echo "Testing:" - @echo " test-local - Run local tests using pytest with moodle-env=local" - @echo " test-staging - Run tests using moodle-env=staging" + @echo " test-local - Run local tests (in parallel) using pytest with moodle-env=local" + @echo " test-staging - Run tests using (in parallel) moodle-env=staging" @echo " test - Start containers (detached) and run local tests" @echo "" @echo " help - Show this help message" diff --git a/pyproject.toml b/pyproject.toml index d3135fc..75df9eb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,26 @@ dependencies = [ "lxml", "python-dotenv", "typer[all]", - "rich==14.1.0", + "rich", +] + +[project.optional-dependencies] +dev = [ + "pytest", + "pytest-cov", + "pytest-xdist", + "flake8", + "flake8-docstrings", + "black", + "mypy", + "isort", + "mkdocs", + "mkdocstrings[python]", + "pymdown-extensions", + "mkdocs-material", + "mkdocs-autorefs", + "mkdocs-git-revision-date-localized-plugin", + "mkdocs-minify-plugin" ] [project.scripts] diff --git a/requirements.txt b/requirements.txt index 91944ef..27c5a9f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,6 +11,7 @@ rich # dev dependencies pytest pytest-cov +pytest-xdist flake8 flake8-docstrings black From 76866e57f3d56bb1a4a11ddf3d6356b70d600393 Mon Sep 17 00:00:00 2001 From: Ernesto Serrano Date: Tue, 5 Aug 2025 10:42:37 +0100 Subject: [PATCH 2/2] Update Makefile Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ac07b3e..9935044 100644 --- a/Makefile +++ b/Makefile @@ -64,7 +64,7 @@ help: @echo "" @echo "Testing:" @echo " test-local - Run local tests (in parallel) using pytest with moodle-env=local" - @echo " test-staging - Run tests using (in parallel) moodle-env=staging" + @echo " test-staging - Run tests (in parallel) using moodle-env=staging" @echo " test - Start containers (detached) and run local tests" @echo "" @echo " help - Show this help message"