From b43488fa32c63b263d3b5e0189d7866b27c567bd Mon Sep 17 00:00:00 2001 From: Julien Maupetit Date: Wed, 31 Jan 2024 14:46:34 +0100 Subject: [PATCH 1/4] =?UTF-8?q?=F0=9F=93=9D(api)=20add=20CLI=20documentati?= =?UTF-8?q?on?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automate CLI documentation. --- docs/cli.md | 6 ++++++ docs/pyproject.toml | 1 + mkdocs.yml | 2 ++ 3 files changed, 9 insertions(+) create mode 100644 docs/cli.md diff --git a/docs/cli.md b/docs/cli.md new file mode 100644 index 00000000..230a0667 --- /dev/null +++ b/docs/cli.md @@ -0,0 +1,6 @@ +# Commands + +::: mkdocs-click + :module: warren.cli + :command: cli + :depth: 1 diff --git a/docs/pyproject.toml b/docs/pyproject.toml index 22cbd0dc..565f7e8b 100644 --- a/docs/pyproject.toml +++ b/docs/pyproject.toml @@ -28,6 +28,7 @@ license = {file = "LICENSE.md"} keywords = ["Analytics", "xAPI", "LRS", "LTI"] dependencies = [ "mike==2.1.1", + "mkdocs-click==0.8.1", "mkdocs-material==9.5.27", "mkdocs==1.6.0", "neoteroi-mkdocs==1.0.5", diff --git a/mkdocs.yml b/mkdocs.yml index 73e18c53..7516442b 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -49,6 +49,7 @@ theme: markdown_extensions: - admonition - attr_list + - mkdocs_click - smarty - toc: permalink: True @@ -71,6 +72,7 @@ markdown_extensions: nav: - "Warren": index.md + - "CLI": cli.md - "Plugins": plugins.md - "Warren-TdBP": tdbp.md - "Contributing": contribute.md From d81ff6a89a37a737bd3f8b2b3028d1fcad96596a Mon Sep 17 00:00:00 2001 From: Wilfried BARADAT Date: Mon, 29 Jul 2024 17:52:06 +0200 Subject: [PATCH 2/4] =?UTF-8?q?fixup!=20=F0=9F=93=9D(api)=20add=20CLI=20do?= =?UTF-8?q?cumentation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/cli.md | 1 + docs/pyproject.toml | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/cli.md b/docs/cli.md index 230a0667..56c8ab4f 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -1,5 +1,6 @@ # Commands + ::: mkdocs-click :module: warren.cli :command: cli diff --git a/docs/pyproject.toml b/docs/pyproject.toml index 565f7e8b..166078ba 100644 --- a/docs/pyproject.toml +++ b/docs/pyproject.toml @@ -33,6 +33,7 @@ dependencies = [ "mkdocs==1.6.0", "neoteroi-mkdocs==1.0.5", "pymdown-extensions==10.8.1", + "warren-api==0.5.0", ] [project.urls] From e4f79adad3789a8bd26e429483b069189b43df91 Mon Sep 17 00:00:00 2001 From: Wilfried BARADAT Date: Mon, 29 Jul 2024 17:52:20 +0200 Subject: [PATCH 3/4] =?UTF-8?q?=F0=9F=94=A7(project)=20add=20defaults=20to?= =?UTF-8?q?=20lrs=20settings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Settings regarding the LRS were missing default values, which can be a problem when loading Ralph modules for building CLI documentation. Adding some default values to them. --- src/api/core/warren/conf.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/api/core/warren/conf.py b/src/api/core/warren/conf.py index cfb9b33b..9c59c00e 100644 --- a/src/api/core/warren/conf.py +++ b/src/api/core/warren/conf.py @@ -22,9 +22,9 @@ class Settings(BaseSettings): DEBUG: bool = False # LRS backend - LRS_HOSTS: Union[List[AnyHttpUrl], AnyHttpUrl] - LRS_AUTH_BASIC_USERNAME: str - LRS_AUTH_BASIC_PASSWORD: str + LRS_HOSTS: Union[List[AnyHttpUrl], AnyHttpUrl] = "http://ralph:8200" # type: ignore + LRS_AUTH_BASIC_USERNAME: str = "ralph" + LRS_AUTH_BASIC_PASSWORD: str = "secret" # Warren server SERVER_PROTOCOL: str = "http" @@ -65,8 +65,8 @@ class Settings(BaseSettings): API_TEST_DB_NAME: str = "test-warren-api" # Token - APP_SIGNING_ALGORITHM: str - APP_SIGNING_KEY: str + APP_SIGNING_ALGORITHM: str = "HS256" + APP_SIGNING_KEY: str = "SigningKeyToChange__NOT_SUITABLE_FOR_PRODUCTION" # Sentry SENTRY_DSN: Optional[str] = None From e601f867cc0ba46e0560aad17e7ae23a1aeb665d Mon Sep 17 00:00:00 2001 From: Wilfried BARADAT Date: Tue, 30 Jul 2024 10:20:54 +0200 Subject: [PATCH 4/4] =?UTF-8?q?fixup!=20=F0=9F=93=9D(api)=20add=20CLI=20do?= =?UTF-8?q?cumentation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/pyproject.toml b/docs/pyproject.toml index 166078ba..58b6ff0d 100644 --- a/docs/pyproject.toml +++ b/docs/pyproject.toml @@ -33,7 +33,7 @@ dependencies = [ "mkdocs==1.6.0", "neoteroi-mkdocs==1.0.5", "pymdown-extensions==10.8.1", - "warren-api==0.5.0", + "warren-api", ] [project.urls]