From 519f05df4533a770dba2857ffa7d44f2c0e1260d Mon Sep 17 00:00:00 2001 From: Sebastien Quioc Date: Mon, 1 Dec 2025 12:43:07 +0100 Subject: [PATCH 1/3] fix(Automation): add additional commands --- .../automation/create_a_module.md | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/docs/integration/develop_integration/automation/create_a_module.md b/docs/integration/develop_integration/automation/create_a_module.md index 6e00886457..618ce5760a 100644 --- a/docs/integration/develop_integration/automation/create_a_module.md +++ b/docs/integration/develop_integration/automation/create_a_module.md @@ -740,6 +740,47 @@ poetry run pytest -v -s tests/ ``` For more detailed information, you can check the [Poetry documentation](https://python-poetry.org/docs/). Additionally, you can look at the tests in the existing module. +## Lint and format your code (optional) + +To ensure code quality and maintain consistency, it's recommended to lint and format the automation module. + + +### Format your module + +To format the code, please use `black` with the following command in the root directory of your module: + +```shell + black . # to format python code +``` + +### Lint your module + +To lint the manifest files, in the working copy of the `automation-library` repository, run the following command: + +```shell +$ python3 linter.py fix --changes +``` + +## Check your module + +To check your module for type correctness and compliance with Sekoia's standards, it's recommended to type check your Python code + +### Check Python code + +To check your code, please use `mypy` with the following command in the working copy of the `automation-library` repository: + +``` +$ poetry run mypy --install-types --non-interactive --ignore-missing-imports --show-column-numbers --hide-error-context . +``` + +### Check compliance + +In the working copy of the `automation-library` repository, to check the automation module against compliance rules: + +``` +$ poetry -C _utils run python compliance check --changes +``` + ## Deploy your module To deploy your module, you first need to make sure the module version is unique and has not already been imported in Sekoia. From 3ee049a6e91571b57dfd47e426a5f982ba6410f6 Mon Sep 17 00:00:00 2001 From: Sebastien Quioc Date: Mon, 1 Dec 2025 12:48:38 +0100 Subject: [PATCH 2/3] fix(Automation): apply suggestions --- .../develop_integration/automation/create_a_module.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/integration/develop_integration/automation/create_a_module.md b/docs/integration/develop_integration/automation/create_a_module.md index 618ce5760a..71078cf173 100644 --- a/docs/integration/develop_integration/automation/create_a_module.md +++ b/docs/integration/develop_integration/automation/create_a_module.md @@ -750,7 +750,7 @@ To ensure code quality and maintain consistency, it's recommended to lint and fo To format the code, please use `black` with the following command in the root directory of your module: ```shell - black . # to format python code +black . # to format python code ``` ### Lint your module @@ -758,19 +758,19 @@ To format the code, please use `black` with the following command in the root di To lint the manifest files, in the working copy of the `automation-library` repository, run the following command: ```shell -$ python3 linter.py fix --changes +python3 linter.py fix --changes ``` ## Check your module -To check your module for type correctness and compliance with Sekoia's standards, it's recommended to type check your Python code +To check your module for type correctness and compliance with Sekoia's standards, it's recommended to type check your Python code. ### Check Python code To check your code, please use `mypy` with the following command in the working copy of the `automation-library` repository: ``` -$ poetry run mypy --install-types --non-interactive --ignore-missing-imports --show-column-numbers --hide-error-context . +poetry run mypy --install-types --non-interactive --ignore-missing-imports --show-column-numbers --hide-error-context . ``` ### Check compliance @@ -778,7 +778,7 @@ $ poetry run mypy --install-types --non-interactive --ignore-missing-imports -- In the working copy of the `automation-library` repository, to check the automation module against compliance rules: ``` -$ poetry -C _utils run python compliance check --changes +poetry -C _utils run python compliance check --changes ``` ## Deploy your module From 31aa6aecd3d8f9a350c0aa22c047afb3af83aa3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Quioc?= Date: Mon, 1 Dec 2025 12:51:36 +0100 Subject: [PATCH 3/3] Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../develop_integration/automation/create_a_module.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/integration/develop_integration/automation/create_a_module.md b/docs/integration/develop_integration/automation/create_a_module.md index 71078cf173..577067ddd4 100644 --- a/docs/integration/develop_integration/automation/create_a_module.md +++ b/docs/integration/develop_integration/automation/create_a_module.md @@ -744,7 +744,6 @@ For more detailed information, you can check the [Poetry documentation](https:// To ensure code quality and maintain consistency, it's recommended to lint and format the automation module. - ### Format your module To format the code, please use `black` with the following command in the root directory of your module: @@ -769,7 +768,7 @@ To check your module for type correctness and compliance with Sekoia's standards To check your code, please use `mypy` with the following command in the working copy of the `automation-library` repository: -``` +```shell poetry run mypy --install-types --non-interactive --ignore-missing-imports --show-column-numbers --hide-error-context . ``` @@ -777,7 +776,7 @@ poetry run mypy --install-types --non-interactive --ignore-missing-imports --sh In the working copy of the `automation-library` repository, to check the automation module against compliance rules: -``` +```shell poetry -C _utils run python compliance check --changes ```