From 08b3e510a19e97ee79e1ccf56ea1eeaecf8ee744 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20LOU=C3=8BT?= Date: Wed, 3 Jul 2024 07:53:25 +0200 Subject: [PATCH 01/15] =?UTF-8?q?=F0=9F=94=A8=20Initialize=20the=20toolbox?= =?UTF-8?q?.sh=20script=20to=20install=20the=20SonarQube=20development=20e?= =?UTF-8?q?nvironment?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .default.docker.env | 5 + .gitignore | 8 +- Dockerfile | 19 +- docker-compose.yml | 15 +- toolbox.sh | 351 ++++++++++++++++++ tool_build.sh => tools_backup/tool_build.sh | 0 .../tool_compile.sh | 0 .../tool_docker-clean.sh | 0 .../tool_docker-init.sh | 0 .../tool_docker-logs.sh | 0 .../tool_release_1_prepare.sh | 0 .../tool_release_2_branch.sh | 0 tool_start.sh => tools_backup/tool_start.sh | 0 .../tool_start_withtoken.sh | 0 tool_stop.sh => tools_backup/tool_stop.sh | 0 15 files changed, 383 insertions(+), 15 deletions(-) create mode 100644 .default.docker.env create mode 100755 toolbox.sh rename tool_build.sh => tools_backup/tool_build.sh (100%) rename tool_compile.sh => tools_backup/tool_compile.sh (100%) rename tool_docker-clean.sh => tools_backup/tool_docker-clean.sh (100%) rename tool_docker-init.sh => tools_backup/tool_docker-init.sh (100%) rename tool_docker-logs.sh => tools_backup/tool_docker-logs.sh (100%) rename tool_release_1_prepare.sh => tools_backup/tool_release_1_prepare.sh (100%) rename tool_release_2_branch.sh => tools_backup/tool_release_2_branch.sh (100%) rename tool_start.sh => tools_backup/tool_start.sh (100%) rename tool_start_withtoken.sh => tools_backup/tool_start_withtoken.sh (100%) rename tool_stop.sh => tools_backup/tool_stop.sh (100%) diff --git a/.default.docker.env b/.default.docker.env new file mode 100644 index 0000000..8a64376 --- /dev/null +++ b/.default.docker.env @@ -0,0 +1,5 @@ +MAVEN_BUILDER_VERSION=3-openjdk-11-slim +SONARQUBE_VERSION=10.5.1-community +POSTGRES_VERSION=12 +DOCKER_BUILDKIT=1 +COMPOSE_DOCKER_CLI_BUILD=1 diff --git a/.gitignore b/.gitignore index 67cc592..924f359 100644 --- a/.gitignore +++ b/.gitignore @@ -1,13 +1,15 @@ +# Ignore IDE files +*.iml +.idea + # Ignore all files and folders starting with ".", except a few exceptions .* !.gitignore !.gitattributes !.github/ +!.default.docker.env # Ignore generated files target bin dependency-reduced-pom.xml - -# Ignore IDE files -*.iml diff --git a/Dockerfile b/Dockerfile index a5a0fc7..7d1b676 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,16 @@ -FROM maven:3-openjdk-11-slim AS builder +# syntax=docker/dockerfile:1 -COPY . /usr/src/ecocode +ARG MAVEN_BUILDER_VERSION +ARG SONARQUBE_VERSION +ARG ECOCODE_SRC_PATH=/usr/src/ecocode +ARG SONARQUBE_PLUGINS_PATH=/opt/sonarqube/extensions/plugins/ -WORKDIR /usr/src/ecocode -RUN ./tool_build.sh +FROM maven:${MAVEN_BUILDER_VERSION} AS builder -FROM sonarqube:10.5.1-community -COPY --from=builder /usr/src/ecocode/target/ecocode-*.jar /opt/sonarqube/extensions/plugins/ +COPY . ${ECOCODE_SRC_PATH} + +WORKDIR ${ECOCODE_SRC_PATH} +RUN ${ECOCODE_SRC_PATH}/toolbox.sh build + +FROM sonarqube:${SONARQUBE_VERSION} +COPY --from=builder ${ECOCODE_SRC_PATH}/target/ecocode-*.jar ${SONARQUBE_PLUGINS_PATH} diff --git a/docker-compose.yml b/docker-compose.yml index ee7dc87..03e29ab 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,13 @@ -version: "3.3" +--- +name: ecocode_java services: sonar: - image: sonarqube:10.5.1-community + build: + context: . + dockerfile: Dockerfile + args: + - MAVEN_BUILDER_VERSION=${MAVEN_BUILDER_VERSION} + - SONARQUBE_VERSION=${SONARQUBE_VERSION} container_name: sonar_ecocode_java ports: - "9000:9000" @@ -15,15 +21,12 @@ services: SONAR_JDBC_URL: jdbc:postgresql://db:5432/sonarqube SONAR_ES_BOOTSTRAP_CHECKS_DISABLE: 'true' volumes: - - type: bind - source: ./target/ecocode-java-plugin-1.6.2-SNAPSHOT.jar - target: /opt/sonarqube/extensions/plugins/ecocode-java-plugin-1.6.2-SNAPSHOT.jar - "extensions:/opt/sonarqube/extensions" - "logs:/opt/sonarqube/logs" - "data:/opt/sonarqube/data" db: - image: postgres:12 + image: postgres:${POSTGRES_VERSION} container_name: postgresql_ecocode_java networks: - sonarnet diff --git a/toolbox.sh b/toolbox.sh new file mode 100755 index 0000000..0c59e60 --- /dev/null +++ b/toolbox.sh @@ -0,0 +1,351 @@ +#!/usr/bin/env bash +# @name toolbox.sh +# @brief **toolbox.sh** is a utility script for installing the SonarQube dev environment. + +# Global variables +CURRENT_PATH="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)" +ECOCODE_DC_FILE="$CURRENT_PATH/docker-compose.yml" +ECOCODE_DOCKER_ENV="$CURRENT_PATH/.default.docker.env" +ECOCODE_JAVA_PLUGIN_VERSION=$(< "$CURRENT_PATH/pom.xml" grep ""|head -n1|sed 's/<\(\/\)*version>//g'|xargs) +ECOCODE_JAVA_PLUGIN_JAR="$CURRENT_PATH/target/ecocode-java-plugin-$ECOCODE_JAVA_PLUGIN_VERSION.jar" + +# Shell coloring +declare -A COLORS=( + [RED]='\033[0;31m' + [GREEN]='\033[0;32m' + [YELLOW]='\033[0;33m' + [BLUE]='\033[0;34m' + [WHITE]='\033[0;37m' + [NOCOLOR]='\033[0;0m' +) + +# @description Display an information message. +# @noargs +# @exitcode 0 If successful. +function info() { + echo -e "${COLORS[WHITE]}$*${COLORS[NOCOLOR]}" + return 0 +} + +# @description Display an debug message. +# @noargs +# @exitcode 0 If successful. +function debug() { + [[ $VERBOSE -gt 0 ]] && echo -e "${COLORS[BLUE]}$*${COLORS[NOCOLOR]}" + return 0 +} + +# @description Display an error message. +# @noargs +# @exitcode 0 If successful. +function error() { + echo -e "${COLORS[RED]}$*${COLORS[NOCOLOR]}" + return 0 +} + +# @description Compile and package source code with maven. +# @noargs +# @exitcode 0 If successful. +# @exitcode 1 If an error was encountered when building source code. +# @exitcode 2 If the ecoCode plugin in target directory cannot be found. +function build() { + info "Building source code in the target folder" + if ! [[ -f $ECOCODE_JAVA_PLUGIN_JAR ]] || [[ $FORCE -gt 0 ]]; then + debug "mvn clean package -DskipTests" + if ! mvn clean package -DskipTests; then + return 1 + fi + fi + # Check that the plugin is present in the target folder + if ! [[ -f $ECOCODE_JAVA_PLUGIN_JAR ]]; then + error "Cannot find ecoCode plugin in target directory" && return 2 + fi + return 0 +} + +# @description Compile source code with maven. +# @noargs +# @exitcode 0 If successful. +# @exitcode 1 If an error was encountered when compiling the source code. +function compile() { + info "Compile source code" + debug "mvn clean compile" + if ! mvn clean compile; then + return 1 + fi + return 0 +} + +# @description Export environment variables from .default.docker.env file. +# @noargs +# @exitcode 0 If successful. +# @exitcode 1 If the environment file cannot be found. +function docker_env_source() { + debug "source $ECOCODE_DOCKER_ENV" + # To export variables + set -a + # shellcheck source=.default.docker.env + ! source "$ECOCODE_DOCKER_ENV" && error "Cannot find $ECOCODE_DOCKER_ENV" && return 1 + set +a + return 0 +} + +# @description Build Docker services. +# @noargs +# @exitcode 0 If successful. +# @exitcode 1 If an error was encountered retrieving environment variables. +# @exitcode 2 If an error has been encountered when building services. +function docker_build() { + ! docker_env_source && return 1 + [[ $FORCE -gt 0 ]] && rm -rf "$CURRENT_PATH/target" + info "Build Docker services" + debug "docker compose -f $ECOCODE_DC_FILE build" + ! docker compose -f "$ECOCODE_DC_FILE" build && return 2 + return 0 +} + +# @description Creating and starting Docker containers. +# @noargs +# @exitcode 0 If successful. +# @exitcode 1 If an error was encountered retrieving environment variables. +# @exitcode 2 If an error was encountered during container creating. +function docker_up() { + ! docker_env_source && return 1 + info "Creating and starting Docker containers" + debug "docker compose -f $ECOCODE_DC_FILE up --build -d" + ! docker compose -f "$ECOCODE_DC_FILE" up --build -d && return 2 + return 0 +} + +# @description Starting Docker containers. +# @noargs +# @exitcode 0 If successful. +# @exitcode 1 If an error was encountered retrieving environment variables. +# @exitcode 2 If an error was encountered during container startup. +function docker_start() { + ! docker_env_source && return 1 + info "Starting Docker containers" + debug "docker compose -f $ECOCODE_DC_FILE start" + ! TOKEN=$ECOCODE_TOKEN docker compose -f "$ECOCODE_DC_FILE" start && return 2 + return 0 +} + +# @description Stopping Docker containers. +# @noargs +# @exitcode 0 If successful. +# @exitcode 1 If an error was encountered retrieving environment variables. +# @exitcode 2 If an error was encountered during container shutdown. +function docker_stop() { + ! docker_env_source && return 1 + info "Stopping Docker containers" + debug "docker compose -f $ECOCODE_DC_FILE stop" + ! docker compose -f "$ECOCODE_DC_FILE" stop && return 2 + return 0 +} + +# @description Stop and remove containers, networks and volumes. +# @noargs +# @exitcode 0 If successful. +# @exitcode 1 If an error was encountered retrieving environment variables. +# @exitcode 2 If an error was encountered during deletion. +function docker_down() { + ! docker_env_source && return 1 + info "Remove Docker containers, networks and volumes" + debug "docker compose -f $ECOCODE_DC_FILE down --volumes" + ! docker compose -f "$ECOCODE_DC_FILE" down --volumes && return 2 + return 0 +} + +# @description Display Docker service logs. +# @noargs +# @exitcode 0 If successful. +# @exitcode 1 If an error was encountered retrieving environment variables. +function docker_logs() { + ! docker_env_source && return 1 + info "Display Docker container logs" + debug "docker compose -f $ECOCODE_DC_FILE logs -f" + docker compose -f "$ECOCODE_DC_FILE" logs -f + return 0 +} + +# @description Building the ecoCode plugin and creating containers. +# @noargs +# @exitcode 0 If successful. +# @exitcode 1 If an error was encountered when building project code in the target folder. +# @exitcode 2 If an error was encountered while initialize docker compose. +function init() { + ! build && return 1 + ! docker_up && return 2 + return 0 +} + +# @description Starting Docker containers. +# @noargs +# @exitcode 0 If successful. +# @exitcode 1 If the ecoCode plugin is not present in the target folder. +# @exitcode 2 If an error is encountered when starting Docker containers. +function start() { + # Check that the plugin is present in the target folder + if ! [[ -f $ECOCODE_JAVA_PLUGIN_JAR ]]; then + error "Cannot find ecoCode plugin in target directory" && return 1 + fi + ! docker_start && return 2 + return 0 +} + +# @description Stopping Docker containers. +# @noargs +# @exitcode 0 If successful. +# @exitcode 1 If an error is encountered when stopping Docker containers. +function stop() { + ! docker_stop && return 1 + return 0 +} + +# @description Stop and remove containers, networks and volumes. +# @noargs +# @exitcode 0 If successful. +# @exitcode 1 If an error is encountered when cleaning Docker services. +function clean() { + ! docker_down && return 1 + [[ $FORCE -gt 0 ]] && rm -rf "$CURRENT_PATH/target" + return 0 +} + +# @description Display Docker container logs. +# @noargs +# @exitcode 0 If successful. +function display_logs() { + ! docker_logs && return 1 + return 0 +} + +# @description Use maven plugin release to prepare locally next release and next SNAPSHOT. +# @noargs +# @exitcode 0 If successful. +function release() { + return 0 +} + +# @description Check options passed as script parameters. +# @noargs +# @exitcode 0 If successful. +function check_opts() { + read -ra opts <<< "$@" + for opt in "${opts[@]}"; do + case "$opt" in + init) INIT=1 ;; + start) START=1 ;; + stop) STOP=1 ;; + clean) CLEAN=1 ;; + build) BUILD=1 ;; + compile) COMPILE=1 ;; + build-docker) BUILD_DOCKER=1 ;; + --token=*) ECOCODE_TOKEN=$(echo "$opt"|awk -F= '{print $2}') ;; + -h|--help) HELP=1 ;; + -v|--verbose) VERBOSE=1 ;; + -f|--force) FORCE=1 ;; + -l|--logs) DISPLAY_LOGS=1 ;; + *) continue ;; + esac + done + # Help is displayed if no option is passed as script parameter + if [[ $((HELP+BUILD+COMPILE+BUILD_DOCKER+INIT+START+STOP+CLEAN+DISPLAY_LOGS)) -eq 0 ]]; then + HELP=1 + fi + return 0 +} + +# @description Execute tasks based on script parameters or user actions. +# @noargs +# @exitcode 0 If successful. +# @exitcode 1 If an error has been encountered displaying help. +# @exitcode 2 If an error is encountered when building the ecoCode plugin. +# @exitcode 3 If an error is encountered when compiling the ecoCode plugin. +# @exitcode 4 If an error is encountered when building Docker services. +# @exitcode 5 If an error was encountered while initialize docker compose. +# @exitcode 6 If an error is encountered when starting Docker containers. +# @exitcode 7 If an error is encountered when stopping Docker containers. +# @exitcode 8 If an error is encountered when cleaning Docker containers. +# @exitcode 9 If an error is encountered when displaying Docker logs. +function execute_tasks() { + # Display help + if [[ $HELP -gt 0 ]]; then + ! display_help && return 1 + return 0 + fi + # Build the ecoCode plugin + if [[ $BUILD -gt 0 ]]; then + ! build && return 2 + fi + # Compile the ecoCode plugin + if [[ $COMPILE -gt 0 ]]; then + ! compile && return 3 + fi + # Build Docker services + if [[ $BUILD_DOCKER -gt 0 ]]; then + ! docker_build && return 4 + fi + # Building the ecoCode plugin and creating Docker containers + if [[ $INIT -gt 0 ]]; then + ! init && return 5 + fi + # Starting Docker containers + if [[ $START -gt 0 ]]; then + ! start && return 6 + fi + # Stopping Docker containers + if [[ $STOP -gt 0 ]]; then + ! stop && return 7 + fi + # Stop and remove containers, networks and volumes + if [[ $CLEAN -gt 0 ]]; then + ! clean && return 8 + fi + # Display Docker container logs + if [[ $DISPLAY_LOGS -gt 0 ]]; then + ! display_logs && return 9 + fi + return 0 +} + +# @description Display help. +# @noargs +# @exitcode 0 If successful. +function display_help() { + local output="" + output=" +${COLORS[YELLOW]}Usage${COLORS[WHITE]} $(basename "$0") [OPTIONS] COMMAND +${COLORS[YELLOW]}Commands:${COLORS[NOCOLOR]} +${COLORS[GREEN]}init${COLORS[WHITE]} Initialize and creating containers +${COLORS[GREEN]}start${COLORS[WHITE]} Starting Docker containers +${COLORS[GREEN]}stop${COLORS[WHITE]} Stopping Docker containers +${COLORS[GREEN]}clean${COLORS[WHITE]} Stop and remove containers, networks and volumes +${COLORS[GREEN]}build${COLORS[WHITE]} Build the ecoCode plugin +${COLORS[GREEN]}compile${COLORS[WHITE]} Compile the ecoCode plugin +${COLORS[GREEN]}build-docker${COLORS[WHITE]} Build Docker services +${COLORS[YELLOW]}Options:${COLORS[NOCOLOR]} +${COLORS[GREEN]}-l, --logs${COLORS[WHITE]} Display Docker container logs +${COLORS[GREEN]}-f, --force${COLORS[WHITE]} To delete the target folder or recompile the source code +${COLORS[GREEN]}--token=${COLORS[WHITE]} Creating containers with previously created token +${COLORS[GREEN]}-h, --help${COLORS[WHITE]} Display help +${COLORS[GREEN]}-v, --verbose${COLORS[WHITE]} Make the command more talkative + " + echo -e "$output\n"|sed '1d; $d' + return 0 +} + +# @description Main function. +# @noargs +# @exitcode 0 If successful. +# @exitcode 1 If the options check failed. +# @exitcode 2 If task execution failed. +function main() { + HELP=0 BUILD=0 COMPILE=0 BUILD_DOCKER=0 INIT=0 START=0 STOP=0 CLEAN=0 DISPLAY_LOGS=0 VERBOSE=0 FORCE=0 + # Check options passed as script parameters and execute tasks + ! check_opts "$@" && return 1 + ! execute_tasks && return 2 + return 0 +} + +main "$@" diff --git a/tool_build.sh b/tools_backup/tool_build.sh similarity index 100% rename from tool_build.sh rename to tools_backup/tool_build.sh diff --git a/tool_compile.sh b/tools_backup/tool_compile.sh similarity index 100% rename from tool_compile.sh rename to tools_backup/tool_compile.sh diff --git a/tool_docker-clean.sh b/tools_backup/tool_docker-clean.sh similarity index 100% rename from tool_docker-clean.sh rename to tools_backup/tool_docker-clean.sh diff --git a/tool_docker-init.sh b/tools_backup/tool_docker-init.sh similarity index 100% rename from tool_docker-init.sh rename to tools_backup/tool_docker-init.sh diff --git a/tool_docker-logs.sh b/tools_backup/tool_docker-logs.sh similarity index 100% rename from tool_docker-logs.sh rename to tools_backup/tool_docker-logs.sh diff --git a/tool_release_1_prepare.sh b/tools_backup/tool_release_1_prepare.sh similarity index 100% rename from tool_release_1_prepare.sh rename to tools_backup/tool_release_1_prepare.sh diff --git a/tool_release_2_branch.sh b/tools_backup/tool_release_2_branch.sh similarity index 100% rename from tool_release_2_branch.sh rename to tools_backup/tool_release_2_branch.sh diff --git a/tool_start.sh b/tools_backup/tool_start.sh similarity index 100% rename from tool_start.sh rename to tools_backup/tool_start.sh diff --git a/tool_start_withtoken.sh b/tools_backup/tool_start_withtoken.sh similarity index 100% rename from tool_start_withtoken.sh rename to tools_backup/tool_start_withtoken.sh diff --git a/tool_stop.sh b/tools_backup/tool_stop.sh similarity index 100% rename from tool_stop.sh rename to tools_backup/tool_stop.sh From edb4ea196c0048cb20537970a59a0b7aa6ba588a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20LOU=C3=8BT?= Date: Sat, 13 Jul 2024 08:12:26 +0200 Subject: [PATCH 02/15] =?UTF-8?q?=F0=9F=94=A8=20Initializing=20unit=20test?= =?UTF-8?q?s=20for=20bash=20scripts=20with=20pytest?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitattributes | 2 +- .gitignore | 3 ++ CHANGELOG.md | 15 ++++++ poetry.lock | 113 ++++++++++++++++++++++++++++++++++++++++++ pyproject.toml | 21 ++++++++ pytest.ini | 3 ++ tests/test_toolbox.py | 16 ++++++ toolbox.sh | 27 +++++++++- 8 files changed, 197 insertions(+), 3 deletions(-) create mode 100644 poetry.lock create mode 100644 pyproject.toml create mode 100644 pytest.ini create mode 100644 tests/test_toolbox.py diff --git a/.gitattributes b/.gitattributes index 12b960c..1a621d8 100644 --- a/.gitattributes +++ b/.gitattributes @@ -4,4 +4,4 @@ # Ensure BAT files will always be checked out with CRLFs (regardless of the # OS they were checked out on). -*.bat text eol=crlf \ No newline at end of file +*.bat text eol=crlf diff --git a/.gitignore b/.gitignore index 924f359..7fcea49 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,6 @@ target bin dependency-reduced-pom.xml +release.properties +pom.xml.* +tests/__pycache__ diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ce62a8..25d5933 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Deleted +## [1.7.0] - 2024-07-13 + +### Added + +- Add **toolbox.sh** utility script for SonarQube development environment installation +- Addition of the pytest framework for unit testing bash scripts + +### Changed + +- Update of the "Getting Started" section in the README file + +### Deleted + +- Removal of utility scripts already present in the toolbox.sh script + ## [1.6.1] - 2024-05-15 ### Changed diff --git a/poetry.lock b/poetry.lock new file mode 100644 index 0000000..24288de --- /dev/null +++ b/poetry.lock @@ -0,0 +1,113 @@ +# This file is automatically @generated by Poetry 1.8.0 and should not be changed by hand. + +[[package]] +name = "colorama" +version = "0.4.6" +description = "Cross-platform colored terminal text." +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" +files = [ + {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, + {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, +] + +[[package]] +name = "iniconfig" +version = "2.0.0" +description = "brain-dead simple config-ini parsing" +optional = false +python-versions = ">=3.7" +files = [ + {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, + {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, +] + +[[package]] +name = "itermate" +version = "1.0.2" +description = "Iterator-tools for functional programming." +optional = false +python-versions = "*" +files = [ + {file = "itermate-1.0.2-py2-none-any.whl", hash = "sha256:00308991e0fe54465e0e0fbec4d47180b4f6df0f26c1e5d2ce3641e3373f28a0"}, + {file = "itermate-1.0.2.zip", hash = "sha256:5ee758cbb363493156cee7a29effc2b148a1a19d2be3097e92fc824991901e2a"}, +] + +[[package]] +name = "packaging" +version = "24.1" +description = "Core utilities for Python packages" +optional = false +python-versions = ">=3.8" +files = [ + {file = "packaging-24.1-py3-none-any.whl", hash = "sha256:5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124"}, + {file = "packaging-24.1.tar.gz", hash = "sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002"}, +] + +[[package]] +name = "pluggy" +version = "1.5.0" +description = "plugin and hook calling mechanisms for python" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669"}, + {file = "pluggy-1.5.0.tar.gz", hash = "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1"}, +] + +[package.extras] +dev = ["pre-commit", "tox"] +testing = ["pytest", "pytest-benchmark"] + +[[package]] +name = "pytest" +version = "8.2.2" +description = "pytest: simple powerful testing with Python" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pytest-8.2.2-py3-none-any.whl", hash = "sha256:c434598117762e2bd304e526244f67bf66bbd7b5d6cf22138be51ff661980343"}, + {file = "pytest-8.2.2.tar.gz", hash = "sha256:de4bb8104e201939ccdc688b27a89a7be2079b22e2bd2b07f806b6ba71117977"}, +] + +[package.dependencies] +colorama = {version = "*", markers = "sys_platform == \"win32\""} +iniconfig = "*" +packaging = "*" +pluggy = ">=1.5,<2.0" + +[package.extras] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] + +[[package]] +name = "pytest-shell" +version = "0.3.2" +description = "A pytest plugin to help with testing shell scripts / black box commands" +optional = false +python-versions = ">=3.7,<4.0" +files = [ + {file = "pytest-shell-0.3.2.tar.gz", hash = "sha256:7e30cf518a5271328f25eaa9013e1639607f169d7396a4b85204a8b34dacbab1"}, + {file = "pytest_shell-0.3.2-py3-none-any.whl", hash = "sha256:f60716134fc30e2c1fe9facb9fe60121d18b4d7b95e692b2c6f29271350aa12b"}, +] + +[package.dependencies] +where = ">=1.0.2,<2.0.0" + +[[package]] +name = "where" +version = "1.0.2" +description = "Locates absolute file paths like the Windows 'where' or the Linux 'which' utility.\nMakes use of the PATH variable and the current directory." +optional = false +python-versions = "*" +files = [ + {file = "where-1.0.2-py2.py3-none-any.whl", hash = "sha256:66abc8edf95be7516e949d08a771f25acacff708ef481618562ab484fe5bc63e"}, + {file = "where-1.0.2.zip", hash = "sha256:325ef3a492a26189a47819f7375bc146887d39edd36fce132e86514334803fb1"}, +] + +[package.dependencies] +itermate = "1.0.2" + +[metadata] +lock-version = "2.0" +python-versions = "^3.12" +content-hash = "60306942735e6663ad39c8a3bf7b864a5652bb34a3d37f72b74a96c103ec4f03" diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..1a987de --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,21 @@ +[build-system] +requires = ["poetry-core"] +build-backend = "poetry.core.masonry.api" + +[tool.poetry] +name = "ecoCode-java" +version = "1.0.0" +description = "" +authors = ["ecoCode"] +license = "GPL-3.0" +readme = "README.md" +repository = "https://github.com/green-code-initiative/ecoCode-java" +packages = [{include = "tests/*.py"}] + +[tool.poetry.dependencies] +python = "^3.12" + +[tool.poetry.group.test] +[tool.poetry.group.test.dependencies] +pytest = "^8.2.2" +pytest-shell = "^0.3.2" diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 0000000..41ed379 --- /dev/null +++ b/pytest.ini @@ -0,0 +1,3 @@ +[pytest] +filterwarnings = + ignore:'pipes' is deprecated:DeprecationWarning diff --git a/tests/test_toolbox.py b/tests/test_toolbox.py new file mode 100644 index 0000000..86c302f --- /dev/null +++ b/tests/test_toolbox.py @@ -0,0 +1,16 @@ +import inspect +import os + +current_dir: str = "./" +if os.getenv('ENV') == "docker": + current_dir = "/app/tests" +else: + current_dir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) +script: str = os.path.abspath(f"{current_dir}/../toolbox.sh") + + +def test_function_not_exist(bash): + with bash() as s: + s.auto_return_code_error = False + assert s.run_script(script, ['test_function']) == "Function with name test_function does not exist" + assert s.last_return_code == 1 diff --git a/toolbox.sh b/toolbox.sh index 0c59e60..39b7f0d 100755 --- a/toolbox.sh +++ b/toolbox.sh @@ -246,7 +246,7 @@ function check_opts() { -v|--verbose) VERBOSE=1 ;; -f|--force) FORCE=1 ;; -l|--logs) DISPLAY_LOGS=1 ;; - *) continue ;; + *) ARGS+=("$opt") ;; esac done # Help is displayed if no option is passed as script parameter @@ -256,6 +256,18 @@ function check_opts() { return 0 } +# @description Used by unit tests to execute a function. +# @noargs +# @exitcode 0 If successful. +# @exitcode >0 If an error has been encountered while executing a function +function execute_function() { + if ! [[ $(type -t "${ARGS[0]}") == function ]]; then + error "Function with name ${ARGS[0]} does not exist" && return 1 + fi + eval "${ARGS[@]}" + return $? +} + # @description Execute tasks based on script parameters or user actions. # @noargs # @exitcode 0 If successful. @@ -309,6 +321,11 @@ function execute_tasks() { return 0 } +function toto() { + echo "hello world" + return 0 +} + # @description Display help. # @noargs # @exitcode 0 If successful. @@ -341,9 +358,15 @@ ${COLORS[GREEN]}-v, --verbose${COLORS[WHITE]} Make the command more talkat # @exitcode 1 If the options check failed. # @exitcode 2 If task execution failed. function main() { - HELP=0 BUILD=0 COMPILE=0 BUILD_DOCKER=0 INIT=0 START=0 STOP=0 CLEAN=0 DISPLAY_LOGS=0 VERBOSE=0 FORCE=0 + ARGS=() HELP=0 BUILD=0 COMPILE=0 BUILD_DOCKER=0 INIT=0 START=0 STOP=0 CLEAN=0 DISPLAY_LOGS=0 VERBOSE=0 FORCE=0 # Check options passed as script parameters and execute tasks ! check_opts "$@" && return 1 + # Used by unit tests to execute a function + if [[ -n "${ARGS[0]}" ]]; then + execute_function + return $? + fi + # Execute one or more tasks according to script parameters ! execute_tasks && return 2 return 0 } From 77903737d037980a9c8407441e1560346df9baeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20LOU=C3=8BT?= Date: Tue, 16 Jul 2024 08:03:14 +0200 Subject: [PATCH 03/15] =?UTF-8?q?=F0=9F=94=A8=20Add=20utils.sh=20script=20?= =?UTF-8?q?to=20launch=20toolbox=20commands?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 2 + mkdocs.yml | 21 ++ poetry.lock | 718 ++++++++++++++++++++++++++++++++++++++++++++- pyproject.toml | 3 + toolbox.Dockerfile | 42 +++ toolbox.sh | 179 +++++++---- utils.sh | 63 ++++ 7 files changed, 978 insertions(+), 50 deletions(-) create mode 100644 mkdocs.yml create mode 100644 toolbox.Dockerfile create mode 100755 utils.sh diff --git a/CHANGELOG.md b/CHANGELOG.md index 25d5933..a9c792d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Add **toolbox.sh** utility script for SonarQube development environment installation +- Add **utils.sh** Add utils.sh script to launch toolbox commands - Addition of the pytest framework for unit testing bash scripts +- ### Changed diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 0000000..e2f9842 --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,21 @@ +site_name: ecoCode-java +repo_url: https://github.com/green-code-initiative/ecoCode-java/ +site_description: todo +nav: + - Home: + - toolbox.md +theme: + name: material + palette: + scheme: slate + primary: purple + accent: cyan + features: + - navigation.tabs + - navigation.tabs.sticky + - navigation.sections +plugins: + - search + - include_dir_to_nav: + sort_file: true + sort_directory: true diff --git a/poetry.lock b/poetry.lock index 24288de..8b21a07 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,5 +1,143 @@ # This file is automatically @generated by Poetry 1.8.0 and should not be changed by hand. +[[package]] +name = "babel" +version = "2.15.0" +description = "Internationalization utilities" +optional = false +python-versions = ">=3.8" +files = [ + {file = "Babel-2.15.0-py3-none-any.whl", hash = "sha256:08706bdad8d0a3413266ab61bd6c34d0c28d6e1e7badf40a2cebe67644e2e1fb"}, + {file = "babel-2.15.0.tar.gz", hash = "sha256:8daf0e265d05768bc6c7a314cf1321e9a123afc328cc635c18622a2f30a04413"}, +] + +[package.extras] +dev = ["freezegun (>=1.0,<2.0)", "pytest (>=6.0)", "pytest-cov"] + +[[package]] +name = "certifi" +version = "2024.7.4" +description = "Python package for providing Mozilla's CA Bundle." +optional = false +python-versions = ">=3.6" +files = [ + {file = "certifi-2024.7.4-py3-none-any.whl", hash = "sha256:c198e21b1289c2ab85ee4e67bb4b4ef3ead0892059901a8d5b622f24a1101e90"}, + {file = "certifi-2024.7.4.tar.gz", hash = "sha256:5a1e7645bc0ec61a09e26c36f6106dd4cf40c6db3a1fb6352b0244e7fb057c7b"}, +] + +[[package]] +name = "charset-normalizer" +version = "3.3.2" +description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." +optional = false +python-versions = ">=3.7.0" +files = [ + {file = "charset-normalizer-3.3.2.tar.gz", hash = "sha256:f30c3cb33b24454a82faecaf01b19c18562b1e89558fb6c56de4d9118a032fd5"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:25baf083bf6f6b341f4121c2f3c548875ee6f5339300e08be3f2b2ba1721cdd3"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:06435b539f889b1f6f4ac1758871aae42dc3a8c0e24ac9e60c2384973ad73027"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9063e24fdb1e498ab71cb7419e24622516c4a04476b17a2dab57e8baa30d6e03"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6897af51655e3691ff853668779c7bad41579facacf5fd7253b0133308cf000d"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1d3193f4a680c64b4b6a9115943538edb896edc190f0b222e73761716519268e"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cd70574b12bb8a4d2aaa0094515df2463cb429d8536cfb6c7ce983246983e5a6"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8465322196c8b4d7ab6d1e049e4c5cb460d0394da4a27d23cc242fbf0034b6b5"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a9a8e9031d613fd2009c182b69c7b2c1ef8239a0efb1df3f7c8da66d5dd3d537"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:beb58fe5cdb101e3a055192ac291b7a21e3b7ef4f67fa1d74e331a7f2124341c"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:e06ed3eb3218bc64786f7db41917d4e686cc4856944f53d5bdf83a6884432e12"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:2e81c7b9c8979ce92ed306c249d46894776a909505d8f5a4ba55b14206e3222f"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:572c3763a264ba47b3cf708a44ce965d98555f618ca42c926a9c1616d8f34269"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:fd1abc0d89e30cc4e02e4064dc67fcc51bd941eb395c502aac3ec19fab46b519"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-win32.whl", hash = "sha256:3d47fa203a7bd9c5b6cee4736ee84ca03b8ef23193c0d1ca99b5089f72645c73"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-win_amd64.whl", hash = "sha256:10955842570876604d404661fbccbc9c7e684caf432c09c715ec38fbae45ae09"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:802fe99cca7457642125a8a88a084cef28ff0cf9407060f7b93dca5aa25480db"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:573f6eac48f4769d667c4442081b1794f52919e7edada77495aaed9236d13a96"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:549a3a73da901d5bc3ce8d24e0600d1fa85524c10287f6004fbab87672bf3e1e"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f27273b60488abe721a075bcca6d7f3964f9f6f067c8c4c605743023d7d3944f"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1ceae2f17a9c33cb48e3263960dc5fc8005351ee19db217e9b1bb15d28c02574"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:65f6f63034100ead094b8744b3b97965785388f308a64cf8d7c34f2f2e5be0c4"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:753f10e867343b4511128c6ed8c82f7bec3bd026875576dfd88483c5c73b2fd8"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4a78b2b446bd7c934f5dcedc588903fb2f5eec172f3d29e52a9096a43722adfc"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e537484df0d8f426ce2afb2d0f8e1c3d0b114b83f8850e5f2fbea0e797bd82ae"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:eb6904c354526e758fda7167b33005998fb68c46fbc10e013ca97f21ca5c8887"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:deb6be0ac38ece9ba87dea880e438f25ca3eddfac8b002a2ec3d9183a454e8ae"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:4ab2fe47fae9e0f9dee8c04187ce5d09f48eabe611be8259444906793ab7cbce"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:80402cd6ee291dcb72644d6eac93785fe2c8b9cb30893c1af5b8fdd753b9d40f"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-win32.whl", hash = "sha256:7cd13a2e3ddeed6913a65e66e94b51d80a041145a026c27e6bb76c31a853c6ab"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-win_amd64.whl", hash = "sha256:663946639d296df6a2bb2aa51b60a2454ca1cb29835324c640dafb5ff2131a77"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:0b2b64d2bb6d3fb9112bafa732def486049e63de9618b5843bcdd081d8144cd8"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:ddbb2551d7e0102e7252db79ba445cdab71b26640817ab1e3e3648dad515003b"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:55086ee1064215781fff39a1af09518bc9255b50d6333f2e4c74ca09fac6a8f6"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8f4a014bc36d3c57402e2977dada34f9c12300af536839dc38c0beab8878f38a"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a10af20b82360ab00827f916a6058451b723b4e65030c5a18577c8b2de5b3389"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8d756e44e94489e49571086ef83b2bb8ce311e730092d2c34ca8f7d925cb20aa"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:90d558489962fd4918143277a773316e56c72da56ec7aa3dc3dbbe20fdfed15b"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6ac7ffc7ad6d040517be39eb591cac5ff87416c2537df6ba3cba3bae290c0fed"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:7ed9e526742851e8d5cc9e6cf41427dfc6068d4f5a3bb03659444b4cabf6bc26"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:8bdb58ff7ba23002a4c5808d608e4e6c687175724f54a5dade5fa8c67b604e4d"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:6b3251890fff30ee142c44144871185dbe13b11bab478a88887a639655be1068"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:b4a23f61ce87adf89be746c8a8974fe1c823c891d8f86eb218bb957c924bb143"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:efcb3f6676480691518c177e3b465bcddf57cea040302f9f4e6e191af91174d4"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-win32.whl", hash = "sha256:d965bba47ddeec8cd560687584e88cf699fd28f192ceb452d1d7ee807c5597b7"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-win_amd64.whl", hash = "sha256:96b02a3dc4381e5494fad39be677abcb5e6634bf7b4fa83a6dd3112607547001"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:95f2a5796329323b8f0512e09dbb7a1860c46a39da62ecb2324f116fa8fdc85c"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c002b4ffc0be611f0d9da932eb0f704fe2602a9a949d1f738e4c34c75b0863d5"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a981a536974bbc7a512cf44ed14938cf01030a99e9b3a06dd59578882f06f985"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3287761bc4ee9e33561a7e058c72ac0938c4f57fe49a09eae428fd88aafe7bb6"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:42cb296636fcc8b0644486d15c12376cb9fa75443e00fb25de0b8602e64c1714"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0a55554a2fa0d408816b3b5cedf0045f4b8e1a6065aec45849de2d6f3f8e9786"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:c083af607d2515612056a31f0a8d9e0fcb5876b7bfc0abad3ecd275bc4ebc2d5"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:87d1351268731db79e0f8e745d92493ee2841c974128ef629dc518b937d9194c"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:bd8f7df7d12c2db9fab40bdd87a7c09b1530128315d047a086fa3ae3435cb3a8"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:c180f51afb394e165eafe4ac2936a14bee3eb10debc9d9e4db8958fe36afe711"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:8c622a5fe39a48f78944a87d4fb8a53ee07344641b0562c540d840748571b811"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-win32.whl", hash = "sha256:db364eca23f876da6f9e16c9da0df51aa4f104a972735574842618b8c6d999d4"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-win_amd64.whl", hash = "sha256:86216b5cee4b06df986d214f664305142d9c76df9b6512be2738aa72a2048f99"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:6463effa3186ea09411d50efc7d85360b38d5f09b870c48e4600f63af490e56a"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6c4caeef8fa63d06bd437cd4bdcf3ffefe6738fb1b25951440d80dc7df8c03ac"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:37e55c8e51c236f95b033f6fb391d7d7970ba5fe7ff453dad675e88cf303377a"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fb69256e180cb6c8a894fee62b3afebae785babc1ee98b81cdf68bbca1987f33"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ae5f4161f18c61806f411a13b0310bea87f987c7d2ecdbdaad0e94eb2e404238"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b2b0a0c0517616b6869869f8c581d4eb2dd83a4d79e0ebcb7d373ef9956aeb0a"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:45485e01ff4d3630ec0d9617310448a8702f70e9c01906b0d0118bdf9d124cf2"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eb00ed941194665c332bf8e078baf037d6c35d7c4f3102ea2d4f16ca94a26dc8"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:2127566c664442652f024c837091890cb1942c30937add288223dc895793f898"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:a50aebfa173e157099939b17f18600f72f84eed3049e743b68ad15bd69b6bf99"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:4d0d1650369165a14e14e1e47b372cfcb31d6ab44e6e33cb2d4e57265290044d"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:923c0c831b7cfcb071580d3f46c4baf50f174be571576556269530f4bbd79d04"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:06a81e93cd441c56a9b65d8e1d043daeb97a3d0856d177d5c90ba85acb3db087"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-win32.whl", hash = "sha256:6ef1d82a3af9d3eecdba2321dc1b3c238245d890843e040e41e470ffa64c3e25"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-win_amd64.whl", hash = "sha256:eb8821e09e916165e160797a6c17edda0679379a4be5c716c260e836e122f54b"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:c235ebd9baae02f1b77bcea61bce332cb4331dc3617d254df3323aa01ab47bd4"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:5b4c145409bef602a690e7cfad0a15a55c13320ff7a3ad7ca59c13bb8ba4d45d"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:68d1f8a9e9e37c1223b656399be5d6b448dea850bed7d0f87a8311f1ff3dabb0"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:22afcb9f253dac0696b5a4be4a1c0f8762f8239e21b99680099abd9b2b1b2269"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e27ad930a842b4c5eb8ac0016b0a54f5aebbe679340c26101df33424142c143c"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1f79682fbe303db92bc2b1136016a38a42e835d932bab5b3b1bfcfbf0640e519"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b261ccdec7821281dade748d088bb6e9b69e6d15b30652b74cbbac25e280b796"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:122c7fa62b130ed55f8f285bfd56d5f4b4a5b503609d181f9ad85e55c89f4185"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:d0eccceffcb53201b5bfebb52600a5fb483a20b61da9dbc885f8b103cbe7598c"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:9f96df6923e21816da7e0ad3fd47dd8f94b2a5ce594e00677c0013018b813458"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:7f04c839ed0b6b98b1a7501a002144b76c18fb1c1850c8b98d458ac269e26ed2"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:34d1c8da1e78d2e001f363791c98a272bb734000fcef47a491c1e3b0505657a8"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:ff8fa367d09b717b2a17a052544193ad76cd49979c805768879cb63d9ca50561"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-win32.whl", hash = "sha256:aed38f6e4fb3f5d6bf81bfa990a07806be9d83cf7bacef998ab1a9bd660a581f"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-win_amd64.whl", hash = "sha256:b01b88d45a6fcb69667cd6d2f7a9aeb4bf53760d7fc536bf679ec94fe9f3ff3d"}, + {file = "charset_normalizer-3.3.2-py3-none-any.whl", hash = "sha256:3e4d1f6587322d2788836a99c69062fbb091331ec940e02d12d179c1d53e25fc"}, +] + +[[package]] +name = "click" +version = "8.1.7" +description = "Composable command line interface toolkit" +optional = false +python-versions = ">=3.7" +files = [ + {file = "click-8.1.7-py3-none-any.whl", hash = "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28"}, + {file = "click-8.1.7.tar.gz", hash = "sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de"}, +] + +[package.dependencies] +colorama = {version = "*", markers = "platform_system == \"Windows\""} + [[package]] name = "colorama" version = "0.4.6" @@ -11,6 +149,34 @@ files = [ {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, ] +[[package]] +name = "ghp-import" +version = "2.1.0" +description = "Copy your docs directly to the gh-pages branch." +optional = false +python-versions = "*" +files = [ + {file = "ghp-import-2.1.0.tar.gz", hash = "sha256:9c535c4c61193c2df8871222567d7fd7e5014d835f97dc7b7439069e2413d343"}, + {file = "ghp_import-2.1.0-py3-none-any.whl", hash = "sha256:8337dd7b50877f163d4c0289bc1f1c7f127550241988d568c1db512c4324a619"}, +] + +[package.dependencies] +python-dateutil = ">=2.8.1" + +[package.extras] +dev = ["flake8", "markdown", "twine", "wheel"] + +[[package]] +name = "idna" +version = "3.7" +description = "Internationalized Domain Names in Applications (IDNA)" +optional = false +python-versions = ">=3.5" +files = [ + {file = "idna-3.7-py3-none-any.whl", hash = "sha256:82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0"}, + {file = "idna-3.7.tar.gz", hash = "sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc"}, +] + [[package]] name = "iniconfig" version = "2.0.0" @@ -33,6 +199,218 @@ files = [ {file = "itermate-1.0.2.zip", hash = "sha256:5ee758cbb363493156cee7a29effc2b148a1a19d2be3097e92fc824991901e2a"}, ] +[[package]] +name = "jinja2" +version = "3.1.4" +description = "A very fast and expressive template engine." +optional = false +python-versions = ">=3.7" +files = [ + {file = "jinja2-3.1.4-py3-none-any.whl", hash = "sha256:bc5dd2abb727a5319567b7a813e6a2e7318c39f4f487cfe6c89c6f9c7d25197d"}, + {file = "jinja2-3.1.4.tar.gz", hash = "sha256:4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369"}, +] + +[package.dependencies] +MarkupSafe = ">=2.0" + +[package.extras] +i18n = ["Babel (>=2.7)"] + +[[package]] +name = "markdown" +version = "3.6" +description = "Python implementation of John Gruber's Markdown." +optional = false +python-versions = ">=3.8" +files = [ + {file = "Markdown-3.6-py3-none-any.whl", hash = "sha256:48f276f4d8cfb8ce6527c8f79e2ee29708508bf4d40aa410fbc3b4ee832c850f"}, + {file = "Markdown-3.6.tar.gz", hash = "sha256:ed4f41f6daecbeeb96e576ce414c41d2d876daa9a16cb35fa8ed8c2ddfad0224"}, +] + +[package.extras] +docs = ["mdx-gh-links (>=0.2)", "mkdocs (>=1.5)", "mkdocs-gen-files", "mkdocs-literate-nav", "mkdocs-nature (>=0.6)", "mkdocs-section-index", "mkdocstrings[python]"] +testing = ["coverage", "pyyaml"] + +[[package]] +name = "markupsafe" +version = "2.1.5" +description = "Safely add untrusted strings to HTML/XML markup." +optional = false +python-versions = ">=3.7" +files = [ + {file = "MarkupSafe-2.1.5-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a17a92de5231666cfbe003f0e4b9b3a7ae3afb1ec2845aadc2bacc93ff85febc"}, + {file = "MarkupSafe-2.1.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:72b6be590cc35924b02c78ef34b467da4ba07e4e0f0454a2c5907f473fc50ce5"}, + {file = "MarkupSafe-2.1.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e61659ba32cf2cf1481e575d0462554625196a1f2fc06a1c777d3f48e8865d46"}, + {file = "MarkupSafe-2.1.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2174c595a0d73a3080ca3257b40096db99799265e1c27cc5a610743acd86d62f"}, + {file = "MarkupSafe-2.1.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ae2ad8ae6ebee9d2d94b17fb62763125f3f374c25618198f40cbb8b525411900"}, + {file = "MarkupSafe-2.1.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:075202fa5b72c86ad32dc7d0b56024ebdbcf2048c0ba09f1cde31bfdd57bcfff"}, + {file = "MarkupSafe-2.1.5-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:598e3276b64aff0e7b3451b72e94fa3c238d452e7ddcd893c3ab324717456bad"}, + {file = "MarkupSafe-2.1.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:fce659a462a1be54d2ffcacea5e3ba2d74daa74f30f5f143fe0c58636e355fdd"}, + {file = "MarkupSafe-2.1.5-cp310-cp310-win32.whl", hash = "sha256:d9fad5155d72433c921b782e58892377c44bd6252b5af2f67f16b194987338a4"}, + {file = "MarkupSafe-2.1.5-cp310-cp310-win_amd64.whl", hash = "sha256:bf50cd79a75d181c9181df03572cdce0fbb75cc353bc350712073108cba98de5"}, + {file = "MarkupSafe-2.1.5-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:629ddd2ca402ae6dbedfceeba9c46d5f7b2a61d9749597d4307f943ef198fc1f"}, + {file = "MarkupSafe-2.1.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:5b7b716f97b52c5a14bffdf688f971b2d5ef4029127f1ad7a513973cfd818df2"}, + {file = "MarkupSafe-2.1.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6ec585f69cec0aa07d945b20805be741395e28ac1627333b1c5b0105962ffced"}, + {file = "MarkupSafe-2.1.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b91c037585eba9095565a3556f611e3cbfaa42ca1e865f7b8015fe5c7336d5a5"}, + {file = "MarkupSafe-2.1.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7502934a33b54030eaf1194c21c692a534196063db72176b0c4028e140f8f32c"}, + {file = "MarkupSafe-2.1.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:0e397ac966fdf721b2c528cf028494e86172b4feba51d65f81ffd65c63798f3f"}, + {file = "MarkupSafe-2.1.5-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:c061bb86a71b42465156a3ee7bd58c8c2ceacdbeb95d05a99893e08b8467359a"}, + {file = "MarkupSafe-2.1.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:3a57fdd7ce31c7ff06cdfbf31dafa96cc533c21e443d57f5b1ecc6cdc668ec7f"}, + {file = "MarkupSafe-2.1.5-cp311-cp311-win32.whl", hash = "sha256:397081c1a0bfb5124355710fe79478cdbeb39626492b15d399526ae53422b906"}, + {file = "MarkupSafe-2.1.5-cp311-cp311-win_amd64.whl", hash = "sha256:2b7c57a4dfc4f16f7142221afe5ba4e093e09e728ca65c51f5620c9aaeb9a617"}, + {file = "MarkupSafe-2.1.5-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:8dec4936e9c3100156f8a2dc89c4b88d5c435175ff03413b443469c7c8c5f4d1"}, + {file = "MarkupSafe-2.1.5-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:3c6b973f22eb18a789b1460b4b91bf04ae3f0c4234a0a6aa6b0a92f6f7b951d4"}, + {file = "MarkupSafe-2.1.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ac07bad82163452a6884fe8fa0963fb98c2346ba78d779ec06bd7a6262132aee"}, + {file = "MarkupSafe-2.1.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f5dfb42c4604dddc8e4305050aa6deb084540643ed5804d7455b5df8fe16f5e5"}, + {file = "MarkupSafe-2.1.5-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ea3d8a3d18833cf4304cd2fc9cbb1efe188ca9b5efef2bdac7adc20594a0e46b"}, + {file = "MarkupSafe-2.1.5-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:d050b3361367a06d752db6ead6e7edeb0009be66bc3bae0ee9d97fb326badc2a"}, + {file = "MarkupSafe-2.1.5-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:bec0a414d016ac1a18862a519e54b2fd0fc8bbfd6890376898a6c0891dd82e9f"}, + {file = "MarkupSafe-2.1.5-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:58c98fee265677f63a4385256a6d7683ab1832f3ddd1e66fe948d5880c21a169"}, + {file = "MarkupSafe-2.1.5-cp312-cp312-win32.whl", hash = "sha256:8590b4ae07a35970728874632fed7bd57b26b0102df2d2b233b6d9d82f6c62ad"}, + {file = "MarkupSafe-2.1.5-cp312-cp312-win_amd64.whl", hash = "sha256:823b65d8706e32ad2df51ed89496147a42a2a6e01c13cfb6ffb8b1e92bc910bb"}, + {file = "MarkupSafe-2.1.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:c8b29db45f8fe46ad280a7294f5c3ec36dbac9491f2d1c17345be8e69cc5928f"}, + {file = "MarkupSafe-2.1.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ec6a563cff360b50eed26f13adc43e61bc0c04d94b8be985e6fb24b81f6dcfdf"}, + {file = "MarkupSafe-2.1.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a549b9c31bec33820e885335b451286e2969a2d9e24879f83fe904a5ce59d70a"}, + {file = "MarkupSafe-2.1.5-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4f11aa001c540f62c6166c7726f71f7573b52c68c31f014c25cc7901deea0b52"}, + {file = "MarkupSafe-2.1.5-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:7b2e5a267c855eea6b4283940daa6e88a285f5f2a67f2220203786dfa59b37e9"}, + {file = "MarkupSafe-2.1.5-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:2d2d793e36e230fd32babe143b04cec8a8b3eb8a3122d2aceb4a371e6b09b8df"}, + {file = "MarkupSafe-2.1.5-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:ce409136744f6521e39fd8e2a24c53fa18ad67aa5bc7c2cf83645cce5b5c4e50"}, + {file = "MarkupSafe-2.1.5-cp37-cp37m-win32.whl", hash = "sha256:4096e9de5c6fdf43fb4f04c26fb114f61ef0bf2e5604b6ee3019d51b69e8c371"}, + {file = "MarkupSafe-2.1.5-cp37-cp37m-win_amd64.whl", hash = "sha256:4275d846e41ecefa46e2015117a9f491e57a71ddd59bbead77e904dc02b1bed2"}, + {file = "MarkupSafe-2.1.5-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:656f7526c69fac7f600bd1f400991cc282b417d17539a1b228617081106feb4a"}, + {file = "MarkupSafe-2.1.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:97cafb1f3cbcd3fd2b6fbfb99ae11cdb14deea0736fc2b0952ee177f2b813a46"}, + {file = "MarkupSafe-2.1.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1f3fbcb7ef1f16e48246f704ab79d79da8a46891e2da03f8783a5b6fa41a9532"}, + {file = "MarkupSafe-2.1.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fa9db3f79de01457b03d4f01b34cf91bc0048eb2c3846ff26f66687c2f6d16ab"}, + {file = "MarkupSafe-2.1.5-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ffee1f21e5ef0d712f9033568f8344d5da8cc2869dbd08d87c84656e6a2d2f68"}, + {file = "MarkupSafe-2.1.5-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:5dedb4db619ba5a2787a94d877bc8ffc0566f92a01c0ef214865e54ecc9ee5e0"}, + {file = "MarkupSafe-2.1.5-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:30b600cf0a7ac9234b2638fbc0fb6158ba5bdcdf46aeb631ead21248b9affbc4"}, + {file = "MarkupSafe-2.1.5-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:8dd717634f5a044f860435c1d8c16a270ddf0ef8588d4887037c5028b859b0c3"}, + {file = "MarkupSafe-2.1.5-cp38-cp38-win32.whl", hash = "sha256:daa4ee5a243f0f20d528d939d06670a298dd39b1ad5f8a72a4275124a7819eff"}, + {file = "MarkupSafe-2.1.5-cp38-cp38-win_amd64.whl", hash = "sha256:619bc166c4f2de5caa5a633b8b7326fbe98e0ccbfacabd87268a2b15ff73a029"}, + {file = "MarkupSafe-2.1.5-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:7a68b554d356a91cce1236aa7682dc01df0edba8d043fd1ce607c49dd3c1edcf"}, + {file = "MarkupSafe-2.1.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:db0b55e0f3cc0be60c1f19efdde9a637c32740486004f20d1cff53c3c0ece4d2"}, + {file = "MarkupSafe-2.1.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3e53af139f8579a6d5f7b76549125f0d94d7e630761a2111bc431fd820e163b8"}, + {file = "MarkupSafe-2.1.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:17b950fccb810b3293638215058e432159d2b71005c74371d784862b7e4683f3"}, + {file = "MarkupSafe-2.1.5-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4c31f53cdae6ecfa91a77820e8b151dba54ab528ba65dfd235c80b086d68a465"}, + {file = "MarkupSafe-2.1.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:bff1b4290a66b490a2f4719358c0cdcd9bafb6b8f061e45c7a2460866bf50c2e"}, + {file = "MarkupSafe-2.1.5-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:bc1667f8b83f48511b94671e0e441401371dfd0f0a795c7daa4a3cd1dde55bea"}, + {file = "MarkupSafe-2.1.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5049256f536511ee3f7e1b3f87d1d1209d327e818e6ae1365e8653d7e3abb6a6"}, + {file = "MarkupSafe-2.1.5-cp39-cp39-win32.whl", hash = "sha256:00e046b6dd71aa03a41079792f8473dc494d564611a8f89bbbd7cb93295ebdcf"}, + {file = "MarkupSafe-2.1.5-cp39-cp39-win_amd64.whl", hash = "sha256:fa173ec60341d6bb97a89f5ea19c85c5643c1e7dedebc22f5181eb73573142c5"}, + {file = "MarkupSafe-2.1.5.tar.gz", hash = "sha256:d283d37a890ba4c1ae73ffadf8046435c76e7bc2247bbb63c00bd1a709c6544b"}, +] + +[[package]] +name = "mergedeep" +version = "1.3.4" +description = "A deep merge function for 🐍." +optional = false +python-versions = ">=3.6" +files = [ + {file = "mergedeep-1.3.4-py3-none-any.whl", hash = "sha256:70775750742b25c0d8f36c55aed03d24c3384d17c951b3175d898bd778ef0307"}, + {file = "mergedeep-1.3.4.tar.gz", hash = "sha256:0096d52e9dad9939c3d975a774666af186eda617e6ca84df4c94dec30004f2a8"}, +] + +[[package]] +name = "mkdocs" +version = "1.6.0" +description = "Project documentation with Markdown." +optional = false +python-versions = ">=3.8" +files = [ + {file = "mkdocs-1.6.0-py3-none-any.whl", hash = "sha256:1eb5cb7676b7d89323e62b56235010216319217d4af5ddc543a91beb8d125ea7"}, + {file = "mkdocs-1.6.0.tar.gz", hash = "sha256:a73f735824ef83a4f3bcb7a231dcab23f5a838f88b7efc54a0eef5fbdbc3c512"}, +] + +[package.dependencies] +click = ">=7.0" +colorama = {version = ">=0.4", markers = "platform_system == \"Windows\""} +ghp-import = ">=1.0" +jinja2 = ">=2.11.1" +markdown = ">=3.3.6" +markupsafe = ">=2.0.1" +mergedeep = ">=1.3.4" +mkdocs-get-deps = ">=0.2.0" +packaging = ">=20.5" +pathspec = ">=0.11.1" +pyyaml = ">=5.1" +pyyaml-env-tag = ">=0.1" +watchdog = ">=2.0" + +[package.extras] +i18n = ["babel (>=2.9.0)"] +min-versions = ["babel (==2.9.0)", "click (==7.0)", "colorama (==0.4)", "ghp-import (==1.0)", "importlib-metadata (==4.4)", "jinja2 (==2.11.1)", "markdown (==3.3.6)", "markupsafe (==2.0.1)", "mergedeep (==1.3.4)", "mkdocs-get-deps (==0.2.0)", "packaging (==20.5)", "pathspec (==0.11.1)", "pyyaml (==5.1)", "pyyaml-env-tag (==0.1)", "watchdog (==2.0)"] + +[[package]] +name = "mkdocs-get-deps" +version = "0.2.0" +description = "MkDocs extension that lists all dependencies according to a mkdocs.yml file" +optional = false +python-versions = ">=3.8" +files = [ + {file = "mkdocs_get_deps-0.2.0-py3-none-any.whl", hash = "sha256:2bf11d0b133e77a0dd036abeeb06dec8775e46efa526dc70667d8863eefc6134"}, + {file = "mkdocs_get_deps-0.2.0.tar.gz", hash = "sha256:162b3d129c7fad9b19abfdcb9c1458a651628e4b1dea628ac68790fb3061c60c"}, +] + +[package.dependencies] +mergedeep = ">=1.3.4" +platformdirs = ">=2.2.0" +pyyaml = ">=5.1" + +[[package]] +name = "mkdocs-include-dir-to-nav" +version = "1.2.0" +description = "A MkDocs plugin include all file in dir to navigation" +optional = false +python-versions = ">=3.6" +files = [ + {file = "mkdocs_include_dir_to_nav-1.2.0-py3-none-any.whl", hash = "sha256:b09de17ad754aa93aec7ba64acf8fdd53f7a2ceb92e8cffe21646b0e97f4ddf0"}, + {file = "mkdocs_include_dir_to_nav-1.2.0.tar.gz", hash = "sha256:2d7b0bb581471fce6f215b6381f1f4d90a3a069829281b7f5d01a5b7abee15d0"}, +] + +[package.dependencies] +mkdocs = ">=1.0.4" + +[[package]] +name = "mkdocs-material" +version = "9.5.29" +description = "Documentation that simply works" +optional = false +python-versions = ">=3.8" +files = [ + {file = "mkdocs_material-9.5.29-py3-none-any.whl", hash = "sha256:afc1f508e2662ded95f0a35a329e8a5acd73ee88ca07ba73836eb6fcdae5d8b4"}, + {file = "mkdocs_material-9.5.29.tar.gz", hash = "sha256:3e977598ec15a4ddad5c4dfc9e08edab6023edb51e88f0729bd27be77e3d322a"}, +] + +[package.dependencies] +babel = ">=2.10,<3.0" +colorama = ">=0.4,<1.0" +jinja2 = ">=3.0,<4.0" +markdown = ">=3.2,<4.0" +mkdocs = ">=1.6,<2.0" +mkdocs-material-extensions = ">=1.3,<2.0" +paginate = ">=0.5,<1.0" +pygments = ">=2.16,<3.0" +pymdown-extensions = ">=10.2,<11.0" +regex = ">=2022.4" +requests = ">=2.26,<3.0" + +[package.extras] +git = ["mkdocs-git-committers-plugin-2 (>=1.1,<2.0)", "mkdocs-git-revision-date-localized-plugin (>=1.2.4,<2.0)"] +imaging = ["cairosvg (>=2.6,<3.0)", "pillow (>=10.2,<11.0)"] +recommended = ["mkdocs-minify-plugin (>=0.7,<1.0)", "mkdocs-redirects (>=1.2,<2.0)", "mkdocs-rss-plugin (>=1.6,<2.0)"] + +[[package]] +name = "mkdocs-material-extensions" +version = "1.3.1" +description = "Extension pack for Python Markdown and MkDocs Material." +optional = false +python-versions = ">=3.8" +files = [ + {file = "mkdocs_material_extensions-1.3.1-py3-none-any.whl", hash = "sha256:adff8b62700b25cb77b53358dad940f3ef973dd6db797907c49e3c2ef3ab4e31"}, + {file = "mkdocs_material_extensions-1.3.1.tar.gz", hash = "sha256:10c9511cea88f568257f960358a467d12b970e1f7b2c0e5fb2bb48cab1928443"}, +] + [[package]] name = "packaging" version = "24.1" @@ -44,6 +422,43 @@ files = [ {file = "packaging-24.1.tar.gz", hash = "sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002"}, ] +[[package]] +name = "paginate" +version = "0.5.6" +description = "Divides large result sets into pages for easier browsing" +optional = false +python-versions = "*" +files = [ + {file = "paginate-0.5.6.tar.gz", hash = "sha256:5e6007b6a9398177a7e1648d04fdd9f8c9766a1a945bceac82f1929e8c78af2d"}, +] + +[[package]] +name = "pathspec" +version = "0.12.1" +description = "Utility library for gitignore style pattern matching of file paths." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pathspec-0.12.1-py3-none-any.whl", hash = "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08"}, + {file = "pathspec-0.12.1.tar.gz", hash = "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712"}, +] + +[[package]] +name = "platformdirs" +version = "4.2.2" +description = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`." +optional = false +python-versions = ">=3.8" +files = [ + {file = "platformdirs-4.2.2-py3-none-any.whl", hash = "sha256:2d7a1657e36a80ea911db832a8a6ece5ee53d8de21edd5cc5879af6530b1bfee"}, + {file = "platformdirs-4.2.2.tar.gz", hash = "sha256:38b7b51f512eed9e84a22788b4bce1de17c0adb134d6becb09836e37d8654cd3"}, +] + +[package.extras] +docs = ["furo (>=2023.9.10)", "proselint (>=0.13)", "sphinx (>=7.2.6)", "sphinx-autodoc-typehints (>=1.25.2)"] +test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4.3)", "pytest-cov (>=4.1)", "pytest-mock (>=3.12)"] +type = ["mypy (>=1.8)"] + [[package]] name = "pluggy" version = "1.5.0" @@ -59,6 +474,38 @@ files = [ dev = ["pre-commit", "tox"] testing = ["pytest", "pytest-benchmark"] +[[package]] +name = "pygments" +version = "2.18.0" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.18.0-py3-none-any.whl", hash = "sha256:b8e6aca0523f3ab76fee51799c488e38782ac06eafcf95e7ba832985c8e7b13a"}, + {file = "pygments-2.18.0.tar.gz", hash = "sha256:786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + +[[package]] +name = "pymdown-extensions" +version = "10.8.1" +description = "Extension pack for Python Markdown." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pymdown_extensions-10.8.1-py3-none-any.whl", hash = "sha256:f938326115884f48c6059c67377c46cf631c733ef3629b6eed1349989d1b30cb"}, + {file = "pymdown_extensions-10.8.1.tar.gz", hash = "sha256:3ab1db5c9e21728dabf75192d71471f8e50f216627e9a1fa9535ecb0231b9940"}, +] + +[package.dependencies] +markdown = ">=3.6" +pyyaml = "*" + +[package.extras] +extra = ["pygments (>=2.12)"] + [[package]] name = "pytest" version = "8.2.2" @@ -93,6 +540,275 @@ files = [ [package.dependencies] where = ">=1.0.2,<2.0.0" +[[package]] +name = "python-dateutil" +version = "2.9.0.post0" +description = "Extensions to the standard Python datetime module" +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" +files = [ + {file = "python-dateutil-2.9.0.post0.tar.gz", hash = "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3"}, + {file = "python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427"}, +] + +[package.dependencies] +six = ">=1.5" + +[[package]] +name = "pyyaml" +version = "6.0.1" +description = "YAML parser and emitter for Python" +optional = false +python-versions = ">=3.6" +files = [ + {file = "PyYAML-6.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d858aa552c999bc8a8d57426ed01e40bef403cd8ccdd0fc5f6f04a00414cac2a"}, + {file = "PyYAML-6.0.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:fd66fc5d0da6d9815ba2cebeb4205f95818ff4b79c3ebe268e75d961704af52f"}, + {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:69b023b2b4daa7548bcfbd4aa3da05b3a74b772db9e23b982788168117739938"}, + {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:81e0b275a9ecc9c0c0c07b4b90ba548307583c125f54d5b6946cfee6360c733d"}, + {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ba336e390cd8e4d1739f42dfe9bb83a3cc2e80f567d8805e11b46f4a943f5515"}, + {file = "PyYAML-6.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:326c013efe8048858a6d312ddd31d56e468118ad4cdeda36c719bf5bb6192290"}, + {file = "PyYAML-6.0.1-cp310-cp310-win32.whl", hash = "sha256:bd4af7373a854424dabd882decdc5579653d7868b8fb26dc7d0e99f823aa5924"}, + {file = "PyYAML-6.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:fd1592b3fdf65fff2ad0004b5e363300ef59ced41c2e6b3a99d4089fa8c5435d"}, + {file = "PyYAML-6.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6965a7bc3cf88e5a1c3bd2e0b5c22f8d677dc88a455344035f03399034eb3007"}, + {file = "PyYAML-6.0.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f003ed9ad21d6a4713f0a9b5a7a0a79e08dd0f221aff4525a2be4c346ee60aab"}, + {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42f8152b8dbc4fe7d96729ec2b99c7097d656dc1213a3229ca5383f973a5ed6d"}, + {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:062582fca9fabdd2c8b54a3ef1c978d786e0f6b3a1510e0ac93ef59e0ddae2bc"}, + {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d2b04aac4d386b172d5b9692e2d2da8de7bfb6c387fa4f801fbf6fb2e6ba4673"}, + {file = "PyYAML-6.0.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e7d73685e87afe9f3b36c799222440d6cf362062f78be1013661b00c5c6f678b"}, + {file = "PyYAML-6.0.1-cp311-cp311-win32.whl", hash = "sha256:1635fd110e8d85d55237ab316b5b011de701ea0f29d07611174a1b42f1444741"}, + {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, + {file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"}, + {file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"}, + {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a08c6f0fe150303c1c6b71ebcd7213c2858041a7e01975da3a99aed1e7a378ef"}, + {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"}, + {file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"}, + {file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"}, + {file = "PyYAML-6.0.1-cp312-cp312-win_amd64.whl", hash = "sha256:0d3304d8c0adc42be59c5f8a4d9e3d7379e6955ad754aa9d6ab7a398b59dd1df"}, + {file = "PyYAML-6.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50550eb667afee136e9a77d6dc71ae76a44df8b3e51e41b77f6de2932bfe0f47"}, + {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1fe35611261b29bd1de0070f0b2f47cb6ff71fa6595c077e42bd0c419fa27b98"}, + {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:704219a11b772aea0d8ecd7058d0082713c3562b4e271b849ad7dc4a5c90c13c"}, + {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:afd7e57eddb1a54f0f1a974bc4391af8bcce0b444685d936840f125cf046d5bd"}, + {file = "PyYAML-6.0.1-cp36-cp36m-win32.whl", hash = "sha256:fca0e3a251908a499833aa292323f32437106001d436eca0e6e7833256674585"}, + {file = "PyYAML-6.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:f22ac1c3cac4dbc50079e965eba2c1058622631e526bd9afd45fedd49ba781fa"}, + {file = "PyYAML-6.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:b1275ad35a5d18c62a7220633c913e1b42d44b46ee12554e5fd39c70a243d6a3"}, + {file = "PyYAML-6.0.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:18aeb1bf9a78867dc38b259769503436b7c72f7a1f1f4c93ff9a17de54319b27"}, + {file = "PyYAML-6.0.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:596106435fa6ad000c2991a98fa58eeb8656ef2325d7e158344fb33864ed87e3"}, + {file = "PyYAML-6.0.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:baa90d3f661d43131ca170712d903e6295d1f7a0f595074f151c0aed377c9b9c"}, + {file = "PyYAML-6.0.1-cp37-cp37m-win32.whl", hash = "sha256:9046c58c4395dff28dd494285c82ba00b546adfc7ef001486fbf0324bc174fba"}, + {file = "PyYAML-6.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:4fb147e7a67ef577a588a0e2c17b6db51dda102c71de36f8549b6816a96e1867"}, + {file = "PyYAML-6.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1d4c7e777c441b20e32f52bd377e0c409713e8bb1386e1099c2415f26e479595"}, + {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a0cd17c15d3bb3fa06978b4e8958dcdc6e0174ccea823003a106c7d4d7899ac5"}, + {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:28c119d996beec18c05208a8bd78cbe4007878c6dd15091efb73a30e90539696"}, + {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7e07cbde391ba96ab58e532ff4803f79c4129397514e1413a7dc761ccd755735"}, + {file = "PyYAML-6.0.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:49a183be227561de579b4a36efbb21b3eab9651dd81b1858589f796549873dd6"}, + {file = "PyYAML-6.0.1-cp38-cp38-win32.whl", hash = "sha256:184c5108a2aca3c5b3d3bf9395d50893a7ab82a38004c8f61c258d4428e80206"}, + {file = "PyYAML-6.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:1e2722cc9fbb45d9b87631ac70924c11d3a401b2d7f410cc0e3bbf249f2dca62"}, + {file = "PyYAML-6.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9eb6caa9a297fc2c2fb8862bc5370d0303ddba53ba97e71f08023b6cd73d16a8"}, + {file = "PyYAML-6.0.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:c8098ddcc2a85b61647b2590f825f3db38891662cfc2fc776415143f599bb859"}, + {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5773183b6446b2c99bb77e77595dd486303b4faab2b086e7b17bc6bef28865f6"}, + {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b786eecbdf8499b9ca1d697215862083bd6d2a99965554781d0d8d1ad31e13a0"}, + {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc1bf2925a1ecd43da378f4db9e4f799775d6367bdb94671027b73b393a7c42c"}, + {file = "PyYAML-6.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:04ac92ad1925b2cff1db0cfebffb6ffc43457495c9b3c39d3fcae417d7125dc5"}, + {file = "PyYAML-6.0.1-cp39-cp39-win32.whl", hash = "sha256:faca3bdcf85b2fc05d06ff3fbc1f83e1391b3e724afa3feba7d13eeab355484c"}, + {file = "PyYAML-6.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:510c9deebc5c0225e8c96813043e62b680ba2f9c50a08d3724c7f28a747d1486"}, + {file = "PyYAML-6.0.1.tar.gz", hash = "sha256:bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43"}, +] + +[[package]] +name = "pyyaml-env-tag" +version = "0.1" +description = "A custom YAML tag for referencing environment variables in YAML files. " +optional = false +python-versions = ">=3.6" +files = [ + {file = "pyyaml_env_tag-0.1-py3-none-any.whl", hash = "sha256:af31106dec8a4d68c60207c1886031cbf839b68aa7abccdb19868200532c2069"}, + {file = "pyyaml_env_tag-0.1.tar.gz", hash = "sha256:70092675bda14fdec33b31ba77e7543de9ddc88f2e5b99160396572d11525bdb"}, +] + +[package.dependencies] +pyyaml = "*" + +[[package]] +name = "regex" +version = "2024.5.15" +description = "Alternative regular expression module, to replace re." +optional = false +python-versions = ">=3.8" +files = [ + {file = "regex-2024.5.15-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a81e3cfbae20378d75185171587cbf756015ccb14840702944f014e0d93ea09f"}, + {file = "regex-2024.5.15-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:7b59138b219ffa8979013be7bc85bb60c6f7b7575df3d56dc1e403a438c7a3f6"}, + {file = "regex-2024.5.15-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a0bd000c6e266927cb7a1bc39d55be95c4b4f65c5be53e659537537e019232b1"}, + {file = "regex-2024.5.15-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5eaa7ddaf517aa095fa8da0b5015c44d03da83f5bd49c87961e3c997daed0de7"}, + {file = "regex-2024.5.15-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ba68168daedb2c0bab7fd7e00ced5ba90aebf91024dea3c88ad5063c2a562cca"}, + {file = "regex-2024.5.15-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6e8d717bca3a6e2064fc3a08df5cbe366369f4b052dcd21b7416e6d71620dca1"}, + {file = "regex-2024.5.15-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1337b7dbef9b2f71121cdbf1e97e40de33ff114801263b275aafd75303bd62b5"}, + {file = "regex-2024.5.15-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f9ebd0a36102fcad2f03696e8af4ae682793a5d30b46c647eaf280d6cfb32796"}, + {file = "regex-2024.5.15-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:9efa1a32ad3a3ea112224897cdaeb6aa00381627f567179c0314f7b65d354c62"}, + {file = "regex-2024.5.15-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:1595f2d10dff3d805e054ebdc41c124753631b6a471b976963c7b28543cf13b0"}, + {file = "regex-2024.5.15-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:b802512f3e1f480f41ab5f2cfc0e2f761f08a1f41092d6718868082fc0d27143"}, + {file = "regex-2024.5.15-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:a0981022dccabca811e8171f913de05720590c915b033b7e601f35ce4ea7019f"}, + {file = "regex-2024.5.15-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:19068a6a79cf99a19ccefa44610491e9ca02c2be3305c7760d3831d38a467a6f"}, + {file = "regex-2024.5.15-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:1b5269484f6126eee5e687785e83c6b60aad7663dafe842b34691157e5083e53"}, + {file = "regex-2024.5.15-cp310-cp310-win32.whl", hash = "sha256:ada150c5adfa8fbcbf321c30c751dc67d2f12f15bd183ffe4ec7cde351d945b3"}, + {file = "regex-2024.5.15-cp310-cp310-win_amd64.whl", hash = "sha256:ac394ff680fc46b97487941f5e6ae49a9f30ea41c6c6804832063f14b2a5a145"}, + {file = "regex-2024.5.15-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:f5b1dff3ad008dccf18e652283f5e5339d70bf8ba7c98bf848ac33db10f7bc7a"}, + {file = "regex-2024.5.15-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c6a2b494a76983df8e3d3feea9b9ffdd558b247e60b92f877f93a1ff43d26656"}, + {file = "regex-2024.5.15-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a32b96f15c8ab2e7d27655969a23895eb799de3665fa94349f3b2fbfd547236f"}, + {file = "regex-2024.5.15-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:10002e86e6068d9e1c91eae8295ef690f02f913c57db120b58fdd35a6bb1af35"}, + {file = "regex-2024.5.15-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ec54d5afa89c19c6dd8541a133be51ee1017a38b412b1321ccb8d6ddbeb4cf7d"}, + {file = "regex-2024.5.15-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:10e4ce0dca9ae7a66e6089bb29355d4432caed736acae36fef0fdd7879f0b0cb"}, + {file = "regex-2024.5.15-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3e507ff1e74373c4d3038195fdd2af30d297b4f0950eeda6f515ae3d84a1770f"}, + {file = "regex-2024.5.15-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d1f059a4d795e646e1c37665b9d06062c62d0e8cc3c511fe01315973a6542e40"}, + {file = "regex-2024.5.15-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:0721931ad5fe0dda45d07f9820b90b2148ccdd8e45bb9e9b42a146cb4f695649"}, + {file = "regex-2024.5.15-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:833616ddc75ad595dee848ad984d067f2f31be645d603e4d158bba656bbf516c"}, + {file = "regex-2024.5.15-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:287eb7f54fc81546346207c533ad3c2c51a8d61075127d7f6d79aaf96cdee890"}, + {file = "regex-2024.5.15-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:19dfb1c504781a136a80ecd1fff9f16dddf5bb43cec6871778c8a907a085bb3d"}, + {file = "regex-2024.5.15-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:119af6e56dce35e8dfb5222573b50c89e5508d94d55713c75126b753f834de68"}, + {file = "regex-2024.5.15-cp311-cp311-win32.whl", hash = "sha256:1c1c174d6ec38d6c8a7504087358ce9213d4332f6293a94fbf5249992ba54efa"}, + {file = "regex-2024.5.15-cp311-cp311-win_amd64.whl", hash = "sha256:9e717956dcfd656f5055cc70996ee2cc82ac5149517fc8e1b60261b907740201"}, + {file = "regex-2024.5.15-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:632b01153e5248c134007209b5c6348a544ce96c46005d8456de1d552455b014"}, + {file = "regex-2024.5.15-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:e64198f6b856d48192bf921421fdd8ad8eb35e179086e99e99f711957ffedd6e"}, + {file = "regex-2024.5.15-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:68811ab14087b2f6e0fc0c2bae9ad689ea3584cad6917fc57be6a48bbd012c49"}, + {file = "regex-2024.5.15-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f8ec0c2fea1e886a19c3bee0cd19d862b3aa75dcdfb42ebe8ed30708df64687a"}, + {file = "regex-2024.5.15-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d0c0c0003c10f54a591d220997dd27d953cd9ccc1a7294b40a4be5312be8797b"}, + {file = "regex-2024.5.15-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2431b9e263af1953c55abbd3e2efca67ca80a3de8a0437cb58e2421f8184717a"}, + {file = "regex-2024.5.15-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4a605586358893b483976cffc1723fb0f83e526e8f14c6e6614e75919d9862cf"}, + {file = "regex-2024.5.15-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:391d7f7f1e409d192dba8bcd42d3e4cf9e598f3979cdaed6ab11288da88cb9f2"}, + {file = "regex-2024.5.15-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:9ff11639a8d98969c863d4617595eb5425fd12f7c5ef6621a4b74b71ed8726d5"}, + {file = "regex-2024.5.15-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:4eee78a04e6c67e8391edd4dad3279828dd66ac4b79570ec998e2155d2e59fd5"}, + {file = "regex-2024.5.15-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:8fe45aa3f4aa57faabbc9cb46a93363edd6197cbc43523daea044e9ff2fea83e"}, + {file = "regex-2024.5.15-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:d0a3d8d6acf0c78a1fff0e210d224b821081330b8524e3e2bc5a68ef6ab5803d"}, + {file = "regex-2024.5.15-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:c486b4106066d502495b3025a0a7251bf37ea9540433940a23419461ab9f2a80"}, + {file = "regex-2024.5.15-cp312-cp312-win32.whl", hash = "sha256:c49e15eac7c149f3670b3e27f1f28a2c1ddeccd3a2812cba953e01be2ab9b5fe"}, + {file = "regex-2024.5.15-cp312-cp312-win_amd64.whl", hash = "sha256:673b5a6da4557b975c6c90198588181029c60793835ce02f497ea817ff647cb2"}, + {file = "regex-2024.5.15-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:87e2a9c29e672fc65523fb47a90d429b70ef72b901b4e4b1bd42387caf0d6835"}, + {file = "regex-2024.5.15-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:c3bea0ba8b73b71b37ac833a7f3fd53825924165da6a924aec78c13032f20850"}, + {file = "regex-2024.5.15-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:bfc4f82cabe54f1e7f206fd3d30fda143f84a63fe7d64a81558d6e5f2e5aaba9"}, + {file = "regex-2024.5.15-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e5bb9425fe881d578aeca0b2b4b3d314ec88738706f66f219c194d67179337cb"}, + {file = "regex-2024.5.15-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:64c65783e96e563103d641760664125e91bd85d8e49566ee560ded4da0d3e704"}, + {file = "regex-2024.5.15-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cf2430df4148b08fb4324b848672514b1385ae3807651f3567871f130a728cc3"}, + {file = "regex-2024.5.15-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5397de3219a8b08ae9540c48f602996aa6b0b65d5a61683e233af8605c42b0f2"}, + {file = "regex-2024.5.15-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:455705d34b4154a80ead722f4f185b04c4237e8e8e33f265cd0798d0e44825fa"}, + {file = "regex-2024.5.15-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:b2b6f1b3bb6f640c1a92be3bbfbcb18657b125b99ecf141fb3310b5282c7d4ed"}, + {file = "regex-2024.5.15-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:3ad070b823ca5890cab606c940522d05d3d22395d432f4aaaf9d5b1653e47ced"}, + {file = "regex-2024.5.15-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:5b5467acbfc153847d5adb21e21e29847bcb5870e65c94c9206d20eb4e99a384"}, + {file = "regex-2024.5.15-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:e6662686aeb633ad65be2a42b4cb00178b3fbf7b91878f9446075c404ada552f"}, + {file = "regex-2024.5.15-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:2b4c884767504c0e2401babe8b5b7aea9148680d2e157fa28f01529d1f7fcf67"}, + {file = "regex-2024.5.15-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:3cd7874d57f13bf70078f1ff02b8b0aa48d5b9ed25fc48547516c6aba36f5741"}, + {file = "regex-2024.5.15-cp38-cp38-win32.whl", hash = "sha256:e4682f5ba31f475d58884045c1a97a860a007d44938c4c0895f41d64481edbc9"}, + {file = "regex-2024.5.15-cp38-cp38-win_amd64.whl", hash = "sha256:d99ceffa25ac45d150e30bd9ed14ec6039f2aad0ffa6bb87a5936f5782fc1569"}, + {file = "regex-2024.5.15-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:13cdaf31bed30a1e1c2453ef6015aa0983e1366fad2667657dbcac7b02f67133"}, + {file = "regex-2024.5.15-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:cac27dcaa821ca271855a32188aa61d12decb6fe45ffe3e722401fe61e323cd1"}, + {file = "regex-2024.5.15-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:7dbe2467273b875ea2de38ded4eba86cbcbc9a1a6d0aa11dcf7bd2e67859c435"}, + {file = "regex-2024.5.15-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:64f18a9a3513a99c4bef0e3efd4c4a5b11228b48aa80743be822b71e132ae4f5"}, + {file = "regex-2024.5.15-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d347a741ea871c2e278fde6c48f85136c96b8659b632fb57a7d1ce1872547600"}, + {file = "regex-2024.5.15-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1878b8301ed011704aea4c806a3cadbd76f84dece1ec09cc9e4dc934cfa5d4da"}, + {file = "regex-2024.5.15-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4babf07ad476aaf7830d77000874d7611704a7fcf68c9c2ad151f5d94ae4bfc4"}, + {file = "regex-2024.5.15-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:35cb514e137cb3488bce23352af3e12fb0dbedd1ee6e60da053c69fb1b29cc6c"}, + {file = "regex-2024.5.15-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:cdd09d47c0b2efee9378679f8510ee6955d329424c659ab3c5e3a6edea696294"}, + {file = "regex-2024.5.15-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:72d7a99cd6b8f958e85fc6ca5b37c4303294954eac1376535b03c2a43eb72629"}, + {file = "regex-2024.5.15-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:a094801d379ab20c2135529948cb84d417a2169b9bdceda2a36f5f10977ebc16"}, + {file = "regex-2024.5.15-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:c0c18345010870e58238790a6779a1219b4d97bd2e77e1140e8ee5d14df071aa"}, + {file = "regex-2024.5.15-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:16093f563098448ff6b1fa68170e4acbef94e6b6a4e25e10eae8598bb1694b5d"}, + {file = "regex-2024.5.15-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:e38a7d4e8f633a33b4c7350fbd8bad3b70bf81439ac67ac38916c4a86b465456"}, + {file = "regex-2024.5.15-cp39-cp39-win32.whl", hash = "sha256:71a455a3c584a88f654b64feccc1e25876066c4f5ef26cd6dd711308aa538694"}, + {file = "regex-2024.5.15-cp39-cp39-win_amd64.whl", hash = "sha256:cab12877a9bdafde5500206d1020a584355a97884dfd388af3699e9137bf7388"}, + {file = "regex-2024.5.15.tar.gz", hash = "sha256:d3ee02d9e5f482cc8309134a91eeaacbdd2261ba111b0fef3748eeb4913e6a2c"}, +] + +[[package]] +name = "requests" +version = "2.32.3" +description = "Python HTTP for Humans." +optional = false +python-versions = ">=3.8" +files = [ + {file = "requests-2.32.3-py3-none-any.whl", hash = "sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6"}, + {file = "requests-2.32.3.tar.gz", hash = "sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760"}, +] + +[package.dependencies] +certifi = ">=2017.4.17" +charset-normalizer = ">=2,<4" +idna = ">=2.5,<4" +urllib3 = ">=1.21.1,<3" + +[package.extras] +socks = ["PySocks (>=1.5.6,!=1.5.7)"] +use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] + +[[package]] +name = "six" +version = "1.16.0" +description = "Python 2 and 3 compatibility utilities" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" +files = [ + {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, + {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, +] + +[[package]] +name = "urllib3" +version = "2.2.2" +description = "HTTP library with thread-safe connection pooling, file post, and more." +optional = false +python-versions = ">=3.8" +files = [ + {file = "urllib3-2.2.2-py3-none-any.whl", hash = "sha256:a448b2f64d686155468037e1ace9f2d2199776e17f0a46610480d311f73e3472"}, + {file = "urllib3-2.2.2.tar.gz", hash = "sha256:dd505485549a7a552833da5e6063639d0d177c04f23bc3864e41e5dc5f612168"}, +] + +[package.extras] +brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)"] +h2 = ["h2 (>=4,<5)"] +socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] +zstd = ["zstandard (>=0.18.0)"] + +[[package]] +name = "watchdog" +version = "4.0.1" +description = "Filesystem events monitoring" +optional = false +python-versions = ">=3.8" +files = [ + {file = "watchdog-4.0.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:da2dfdaa8006eb6a71051795856bedd97e5b03e57da96f98e375682c48850645"}, + {file = "watchdog-4.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e93f451f2dfa433d97765ca2634628b789b49ba8b504fdde5837cdcf25fdb53b"}, + {file = "watchdog-4.0.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ef0107bbb6a55f5be727cfc2ef945d5676b97bffb8425650dadbb184be9f9a2b"}, + {file = "watchdog-4.0.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:17e32f147d8bf9657e0922c0940bcde863b894cd871dbb694beb6704cfbd2fb5"}, + {file = "watchdog-4.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:03e70d2df2258fb6cb0e95bbdbe06c16e608af94a3ffbd2b90c3f1e83eb10767"}, + {file = "watchdog-4.0.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:123587af84260c991dc5f62a6e7ef3d1c57dfddc99faacee508c71d287248459"}, + {file = "watchdog-4.0.1-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:093b23e6906a8b97051191a4a0c73a77ecc958121d42346274c6af6520dec175"}, + {file = "watchdog-4.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:611be3904f9843f0529c35a3ff3fd617449463cb4b73b1633950b3d97fa4bfb7"}, + {file = "watchdog-4.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:62c613ad689ddcb11707f030e722fa929f322ef7e4f18f5335d2b73c61a85c28"}, + {file = "watchdog-4.0.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:d4925e4bf7b9bddd1c3de13c9b8a2cdb89a468f640e66fbfabaf735bd85b3e35"}, + {file = "watchdog-4.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:cad0bbd66cd59fc474b4a4376bc5ac3fc698723510cbb64091c2a793b18654db"}, + {file = "watchdog-4.0.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:a3c2c317a8fb53e5b3d25790553796105501a235343f5d2bf23bb8649c2c8709"}, + {file = "watchdog-4.0.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:c9904904b6564d4ee8a1ed820db76185a3c96e05560c776c79a6ce5ab71888ba"}, + {file = "watchdog-4.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:667f3c579e813fcbad1b784db7a1aaa96524bed53437e119f6a2f5de4db04235"}, + {file = "watchdog-4.0.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:d10a681c9a1d5a77e75c48a3b8e1a9f2ae2928eda463e8d33660437705659682"}, + {file = "watchdog-4.0.1-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:0144c0ea9997b92615af1d94afc0c217e07ce2c14912c7b1a5731776329fcfc7"}, + {file = "watchdog-4.0.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:998d2be6976a0ee3a81fb8e2777900c28641fb5bfbd0c84717d89bca0addcdc5"}, + {file = "watchdog-4.0.1-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:e7921319fe4430b11278d924ef66d4daa469fafb1da679a2e48c935fa27af193"}, + {file = "watchdog-4.0.1-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:f0de0f284248ab40188f23380b03b59126d1479cd59940f2a34f8852db710625"}, + {file = "watchdog-4.0.1-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:bca36be5707e81b9e6ce3208d92d95540d4ca244c006b61511753583c81c70dd"}, + {file = "watchdog-4.0.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:ab998f567ebdf6b1da7dc1e5accfaa7c6992244629c0fdaef062f43249bd8dee"}, + {file = "watchdog-4.0.1-py3-none-manylinux2014_aarch64.whl", hash = "sha256:dddba7ca1c807045323b6af4ff80f5ddc4d654c8bce8317dde1bd96b128ed253"}, + {file = "watchdog-4.0.1-py3-none-manylinux2014_armv7l.whl", hash = "sha256:4513ec234c68b14d4161440e07f995f231be21a09329051e67a2118a7a612d2d"}, + {file = "watchdog-4.0.1-py3-none-manylinux2014_i686.whl", hash = "sha256:4107ac5ab936a63952dea2a46a734a23230aa2f6f9db1291bf171dac3ebd53c6"}, + {file = "watchdog-4.0.1-py3-none-manylinux2014_ppc64.whl", hash = "sha256:6e8c70d2cd745daec2a08734d9f63092b793ad97612470a0ee4cbb8f5f705c57"}, + {file = "watchdog-4.0.1-py3-none-manylinux2014_ppc64le.whl", hash = "sha256:f27279d060e2ab24c0aa98363ff906d2386aa6c4dc2f1a374655d4e02a6c5e5e"}, + {file = "watchdog-4.0.1-py3-none-manylinux2014_s390x.whl", hash = "sha256:f8affdf3c0f0466e69f5b3917cdd042f89c8c63aebdb9f7c078996f607cdb0f5"}, + {file = "watchdog-4.0.1-py3-none-manylinux2014_x86_64.whl", hash = "sha256:ac7041b385f04c047fcc2951dc001671dee1b7e0615cde772e84b01fbf68ee84"}, + {file = "watchdog-4.0.1-py3-none-win32.whl", hash = "sha256:206afc3d964f9a233e6ad34618ec60b9837d0582b500b63687e34011e15bb429"}, + {file = "watchdog-4.0.1-py3-none-win_amd64.whl", hash = "sha256:7577b3c43e5909623149f76b099ac49a1a01ca4e167d1785c76eb52fa585745a"}, + {file = "watchdog-4.0.1-py3-none-win_ia64.whl", hash = "sha256:d7b9f5f3299e8dd230880b6c55504a1f69cf1e4316275d1b215ebdd8187ec88d"}, + {file = "watchdog-4.0.1.tar.gz", hash = "sha256:eebaacf674fa25511e8867028d281e602ee6500045b57f43b08778082f7f8b44"}, +] + +[package.extras] +watchmedo = ["PyYAML (>=3.10)"] + [[package]] name = "where" version = "1.0.2" @@ -110,4 +826,4 @@ itermate = "1.0.2" [metadata] lock-version = "2.0" python-versions = "^3.12" -content-hash = "60306942735e6663ad39c8a3bf7b864a5652bb34a3d37f72b74a96c103ec4f03" +content-hash = "e108aa3806e59c2d057cedcce2ead4ac6aa3dd0654fa366cbc781fec439a384a" diff --git a/pyproject.toml b/pyproject.toml index 1a987de..481e510 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,6 +14,9 @@ packages = [{include = "tests/*.py"}] [tool.poetry.dependencies] python = "^3.12" +mkdocs = "^1.5.3" +mkdocs-material = "^9.5.11" +mkdocs-include-dir-to-nav = "^1.2.0" [tool.poetry.group.test] [tool.poetry.group.test.dependencies] diff --git a/toolbox.Dockerfile b/toolbox.Dockerfile new file mode 100644 index 0000000..14155c4 --- /dev/null +++ b/toolbox.Dockerfile @@ -0,0 +1,42 @@ +FROM python:3.12-alpine3.20 as builder + +ENV POETRY_NO_INTERACTION=1 \ + POETRY_VIRTUALENVS_IN_PROJECT=1 \ + POETRY_VIRTUALENVS_CREATE=1 \ + POETRY_CACHE_DIR=/tmp/poetry_cache \ + PYTHONFAULTHANDLER=1 \ + PYTHONUNBUFFERED=1 \ + PYTHONHASHSEED=random \ + PIP_DISABLE_PIP_VERSION_CHECK=on \ + PIP_DEFAULT_TIMEOUT=100 \ + POETRY_VERSION=1.7.1 + +RUN pip install "poetry==$POETRY_VERSION" +RUN apk add --update --no-cache gcc libc-dev +WORKDIR /app +COPY pyproject.toml poetry.lock ./ +RUN --mount=type=cache,target=$POETRY_CACHE_DIR poetry install --no-root --no-ansi + +FROM python:3.12-alpine3.20 as runtime + +ENV VIRTUAL_ENV=/app/.venv \ + PATH="/app/.venv/bin:$PATH" + +# Installing prerequisites +RUN apk add --update --no-cache bash curl shellcheck gawk git make \ + && rm -rf /var/cache/apk/* + +# Install shdoc +RUN git clone --recursive https://github.com/reconquest/shdoc /tmp/shdoc +RUN make install -C /tmp/shdoc + +# Create user +RUN addgroup -g 1000 app \ + && adduser -G app -u 1000 app -D +USER app +WORKDIR /app + +# Copy the Python virtual environment +COPY --chown=app:app --from=builder ${VIRTUAL_ENV} ${VIRTUAL_ENV} + +CMD ["/bin/bash"] diff --git a/toolbox.sh b/toolbox.sh index 39b7f0d..6a5af65 100755 --- a/toolbox.sh +++ b/toolbox.sh @@ -1,9 +1,18 @@ #!/usr/bin/env bash # @name toolbox.sh # @brief **toolbox.sh** is a utility script for installing the SonarQube dev environment. +# @description +# This toolbox enables you to perform the following actions: +# +# * Installing the SonarQube dev environment +# * Run unit tests with **pytest** +# * Linter the code with the **shellcheck** utility +# * Generating the API documentation with the **shdoc** utility +# * Generating a site from markdown files with **mkdocs** # Global variables CURRENT_PATH="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)" +DOC_PATH="$CURRENT_PATH/docs" ECOCODE_DC_FILE="$CURRENT_PATH/docker-compose.yml" ECOCODE_DOCKER_ENV="$CURRENT_PATH/.default.docker.env" ECOCODE_JAVA_PLUGIN_VERSION=$(< "$CURRENT_PATH/pom.xml" grep ""|head -n1|sed 's/<\(\/\)*version>//g'|xargs) @@ -43,39 +52,6 @@ function error() { return 0 } -# @description Compile and package source code with maven. -# @noargs -# @exitcode 0 If successful. -# @exitcode 1 If an error was encountered when building source code. -# @exitcode 2 If the ecoCode plugin in target directory cannot be found. -function build() { - info "Building source code in the target folder" - if ! [[ -f $ECOCODE_JAVA_PLUGIN_JAR ]] || [[ $FORCE -gt 0 ]]; then - debug "mvn clean package -DskipTests" - if ! mvn clean package -DskipTests; then - return 1 - fi - fi - # Check that the plugin is present in the target folder - if ! [[ -f $ECOCODE_JAVA_PLUGIN_JAR ]]; then - error "Cannot find ecoCode plugin in target directory" && return 2 - fi - return 0 -} - -# @description Compile source code with maven. -# @noargs -# @exitcode 0 If successful. -# @exitcode 1 If an error was encountered when compiling the source code. -function compile() { - info "Compile source code" - debug "mvn clean compile" - if ! mvn clean compile; then - return 1 - fi - return 0 -} - # @description Export environment variables from .default.docker.env file. # @noargs # @exitcode 0 If successful. @@ -156,6 +132,28 @@ function docker_down() { return 0 } +# @description Use maven plugin release to prepare locally next release and next SNAPSHOT. +# @noargs +# @exitcode 0 If successful. +function release_prepare() { + # creation of 2 commits with release and next SNAPSHOT + if ! mvn release:prepare -B -ff -DpushChanges=false -DtagNameFormat=@{project.version}; then + return 1 + fi + sleep 2 + return 0 +} + +# @description Clean temporary files. +# @noargs +# @exitcode 0 If successful. +function release_clean() { + if ! mvn release:clean; then + return 1 + fi + return 0 +} + # @description Display Docker service logs. # @noargs # @exitcode 0 If successful. @@ -212,6 +210,50 @@ function clean() { return 0 } +# @description Use maven plugin to create a new release. +# @noargs +# @exitcode 0 If successful. +# @exitcode 1 If an error is encountered when prepare the release. +# @exitcode 1 If an error is encountered when cleaning files. +function release() { + ! release_prepare && return 1 + ! release_clean && return 2 + return 0 +} + +# @description Compile and package source code with maven. +# @noargs +# @exitcode 0 If successful. +# @exitcode 1 If an error was encountered when building source code. +# @exitcode 2 If the ecoCode plugin in target directory cannot be found. +function build() { + info "Building source code in the target folder" + if ! [[ -f $ECOCODE_JAVA_PLUGIN_JAR ]] || [[ $FORCE -gt 0 ]]; then + debug "mvn clean package -DskipTests" + if ! mvn clean package -DskipTests; then + return 1 + fi + fi + # Check that the plugin is present in the target folder + if ! [[ -f $ECOCODE_JAVA_PLUGIN_JAR ]]; then + error "Cannot find ecoCode plugin in target directory" && return 2 + fi + return 0 +} + +# @description Compile source code with maven. +# @noargs +# @exitcode 0 If successful. +# @exitcode 1 If an error was encountered when compiling the source code. +function compile() { + info "Compile source code" + debug "mvn clean compile" + if ! mvn clean compile; then + return 1 + fi + return 0 +} + # @description Display Docker container logs. # @noargs # @exitcode 0 If successful. @@ -220,10 +262,39 @@ function display_logs() { return 0 } -# @description Use maven plugin release to prepare locally next release and next SNAPSHOT. +# @description Run unit tests. # @noargs # @exitcode 0 If successful. -function release() { +function run_tests() { + info "Run unit tests" + pytest tests/test_*.py + return 0 +} + +# @description Linter the application's bash code. +# @noargs +# @exitcode 0 If successful. +function lint_bash() { + info "Linting bash code" + shellcheck -x toolbox.sh + return 0 +} + +# @description Generate API documentation in markdown format. +# @noargs +# @exitcode 0 If successful. +function generate_bash_doc() { + info "Generating the toolbox API documentation" + shdoc < "$CURRENT_PATH/toolbox.sh" > "$DOC_PATH/toolbox.md" + return 0 +} + +# @description Start the mkdocs server to browse the API documentation in a browser. +# @noargs +# @exitcode 0 If successful. +function mkdocs_server_start() { + info "Start the mkdocs server" + mkdocs serve -a 0.0.0.0:8000 return 0 } @@ -238,6 +309,7 @@ function check_opts() { start) START=1 ;; stop) STOP=1 ;; clean) CLEAN=1 ;; + release) RELEASE=1 ;; build) BUILD=1 ;; compile) COMPILE=1 ;; build-docker) BUILD_DOCKER=1 ;; @@ -250,7 +322,7 @@ function check_opts() { esac done # Help is displayed if no option is passed as script parameter - if [[ $((HELP+BUILD+COMPILE+BUILD_DOCKER+INIT+START+STOP+CLEAN+DISPLAY_LOGS)) -eq 0 ]]; then + if [[ $((HELP+INIT+START+STOP+CLEAN+RELEASE+BUILD+COMPILE+BUILD_DOCKER+DISPLAY_LOGS)) -eq 0 ]]; then HELP=1 fi return 0 @@ -286,18 +358,6 @@ function execute_tasks() { ! display_help && return 1 return 0 fi - # Build the ecoCode plugin - if [[ $BUILD -gt 0 ]]; then - ! build && return 2 - fi - # Compile the ecoCode plugin - if [[ $COMPILE -gt 0 ]]; then - ! compile && return 3 - fi - # Build Docker services - if [[ $BUILD_DOCKER -gt 0 ]]; then - ! docker_build && return 4 - fi # Building the ecoCode plugin and creating Docker containers if [[ $INIT -gt 0 ]]; then ! init && return 5 @@ -314,6 +374,22 @@ function execute_tasks() { if [[ $CLEAN -gt 0 ]]; then ! clean && return 8 fi + # Use maven plugin to create a new release + if [[ $RELEASE -gt 0 ]]; then + ! release && return 2 + fi + # Build the ecoCode plugin + if [[ $BUILD -gt 0 ]]; then + ! build && return 2 + fi + # Compile the ecoCode plugin + if [[ $COMPILE -gt 0 ]]; then + ! compile && return 3 + fi + # Build Docker services + if [[ $BUILD_DOCKER -gt 0 ]]; then + ! docker_build && return 4 + fi # Display Docker container logs if [[ $DISPLAY_LOGS -gt 0 ]]; then ! display_logs && return 9 @@ -338,6 +414,7 @@ ${COLORS[GREEN]}init${COLORS[WHITE]} Initialize and creating cont ${COLORS[GREEN]}start${COLORS[WHITE]} Starting Docker containers ${COLORS[GREEN]}stop${COLORS[WHITE]} Stopping Docker containers ${COLORS[GREEN]}clean${COLORS[WHITE]} Stop and remove containers, networks and volumes +${COLORS[GREEN]}release${COLORS[WHITE]} Create a new release ${COLORS[GREEN]}build${COLORS[WHITE]} Build the ecoCode plugin ${COLORS[GREEN]}compile${COLORS[WHITE]} Compile the ecoCode plugin ${COLORS[GREEN]}build-docker${COLORS[WHITE]} Build Docker services @@ -358,7 +435,11 @@ ${COLORS[GREEN]}-v, --verbose${COLORS[WHITE]} Make the command more talkat # @exitcode 1 If the options check failed. # @exitcode 2 If task execution failed. function main() { - ARGS=() HELP=0 BUILD=0 COMPILE=0 BUILD_DOCKER=0 INIT=0 START=0 STOP=0 CLEAN=0 DISPLAY_LOGS=0 VERBOSE=0 FORCE=0 + ARGS=() + HELP=0 + INIT=0 START=0 STOP=0 CLEAN=0 + RELEASE=0 BUILD=0 COMPILE=0 BUILD_DOCKER=0 + DISPLAY_LOGS=0 VERBOSE=0 FORCE=0 # Check options passed as script parameters and execute tasks ! check_opts "$@" && return 1 # Used by unit tests to execute a function diff --git a/utils.sh b/utils.sh new file mode 100755 index 0000000..6465077 --- /dev/null +++ b/utils.sh @@ -0,0 +1,63 @@ +#!/usr/bin/env bash +# @name Utils +# @brief **utils.sh**. + +DOCKER_IMAGE="toolbox:1.0.0" + +# @description Check if docker is installed. +# @noargs +# @exitcode 0 If docker is installed. +# @exitcode 1 If docker is not installed. +function check_env_docker() { + ! [[ -x "$(command -v docker)" ]] && echo "Please install docker" && return 1 + return 0 +} + +# @description Building the utils docker image. +# @noargs +# @exitcode 0 If successful. +function docker_build() { + DOCKER_BUILDKIT=1 docker build -f toolbox.Dockerfile --target=runtime -t="$DOCKER_IMAGE" . + return 0 +} + +# @description Removing the utils docker image. +# @noargs +# @exitcode 0 If successful. +function docker_image_remove() { + docker image rm "$DOCKER_IMAGE" 2> /dev/null + return 0 +} + +# @description Execute a command in the docker container. +# @noargs +# @exitcode 0 If successful. +function docker_run() { + docker run --rm -it \ + -e ENV=docker \ + -p 8000:8000 \ + -v "$(pwd)/toolbox.sh:/app/toolbox.sh" \ + -v "$(pwd)/mkdocs.yml:/app/mkdocs.yml" \ + -v "$(pwd)/docs:/app/docs" \ + -v "$(pwd)/tests:/app/tests" \ + $DOCKER_IMAGE /bin/bash + return 0 +} + +# @description Main function. +# @noargs +# @exitcode 0 If successful. +# @exitcode 1 If the options check failed. +# @exitcode 2 If menu display has failed. +# @exitcode 3 If task execution failed. +function main() { + ! check_env_docker && return 1 + if [[ $FORCE -gt 0 ]]; then + ! docker_image_remove && return 2 + fi + ! docker_build && return 3 + ! docker_run && return 4 + return 0 +} + +main "$@" From c6822950404378e3363368d4aa346f2e175cfded Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20LOU=C3=8BT?= Date: Tue, 16 Jul 2024 22:00:53 +0200 Subject: [PATCH 04/15] =?UTF-8?q?=F0=9F=94=A8=20Added=20utils=5Fbash.sh=20?= =?UTF-8?q?script=20to=20run=20unit=20tests=20and=20generate=20documentati?= =?UTF-8?q?on?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/toolbox.md | 251 ++++++++++++++++++++++++++++++++++++++++++++++++ toolbox.sh | 207 +++++++++++---------------------------- utils.sh | 22 +++-- utils_bash.sh | 178 ++++++++++++++++++++++++++++++++++ 4 files changed, 499 insertions(+), 159 deletions(-) create mode 100644 docs/toolbox.md create mode 100755 utils_bash.sh diff --git a/docs/toolbox.md b/docs/toolbox.md new file mode 100644 index 0000000..07bc028 --- /dev/null +++ b/docs/toolbox.md @@ -0,0 +1,251 @@ +# toolbox.sh + +**toolbox.sh** is a utility script for installing the SonarQube dev environment. + +## Overview + +This toolbox enables you to install the SonarQube dev environment. + +## Index + +* [info](#info) +* [debug](#debug) +* [error](#error) +* [docker_env_source](#dockerenvsource) +* [docker_build](#dockerbuild) +* [docker_logs](#dockerlogs) +* [init](#init) +* [start](#start) +* [stop](#stop) +* [clean](#clean) +* [release](#release) +* [build](#build) +* [compile](#compile) +* [display_logs](#displaylogs) +* [check_opts](#checkopts) +* [execute_function](#executefunction) +* [execute_tasks](#executetasks) +* [display_help](#displayhelp) +* [main](#main) + +### info + +Display an information message. + +_Function has no arguments._ + +#### Exit codes + +* **0**: If successful. + +### debug + +Display an debug message. + +_Function has no arguments._ + +#### Exit codes + +* **0**: If successful. + +### error + +Display an error message. + +_Function has no arguments._ + +#### Exit codes + +* **0**: If successful. + +### docker_env_source + +Export environment variables from .default.docker.env file. + +_Function has no arguments._ + +#### Exit codes + +* **0**: If successful. +* **1**: If the environment file cannot be found. + +### docker_build + +Build Docker services. + +_Function has no arguments._ + +#### Exit codes + +* **0**: If successful. +* **1**: If an error was encountered retrieving environment variables. +* **2**: If an error has been encountered when building services. + +### docker_logs + +Display Docker service logs. + +_Function has no arguments._ + +#### Exit codes + +* **0**: If successful. +* **1**: If an error was encountered retrieving environment variables. + +### init + +Building the ecoCode plugin and creating containers. + +_Function has no arguments._ + +#### Exit codes + +* **0**: If successful. +* **1**: If an error was encountered when building project code in the target folder. +* **2**: If an error was encountered retrieving environment variables. +* **3**: If an error was encountered during container creating. + +### start + +Starting Docker containers. + +_Function has no arguments._ + +#### Exit codes + +* **0**: If successful. +* **1**: If the ecoCode plugin is not present in the target folder. +* **2**: If an error was encountered retrieving environment variables. +* **3**: If an error was encountered during container startup. + +### stop + +Stopping Docker containers. + +_Function has no arguments._ + +#### Exit codes + +* **0**: If successful. +* **1**: If an error was encountered retrieving environment variables. +* **2**: If an error was encountered during container shutdown. + +### clean + +Stop and remove containers, networks and volumes. + +_Function has no arguments._ + +#### Exit codes + +* **0**: If successful. +* **1**: If an error was encountered retrieving environment variables. +* **2**: If an error was encountered during deletion. + +### release + +Use maven plugin release to prepare locally next release and next SNAPSHOT. + +_Function has no arguments._ + +#### Exit codes + +* **0**: If successful. +* **1**: If an error is encountered when prepare the release. +* **2**: If an error is encountered when cleaning files. + +### build + +Compile and package source code with maven. + +_Function has no arguments._ + +#### Exit codes + +* **0**: If successful. +* **1**: If an error was encountered when building source code. +* **2**: If the ecoCode plugin in target directory cannot be found. + +### compile + +Compile source code with maven. + +_Function has no arguments._ + +#### Exit codes + +* **0**: If successful. +* **1**: If an error was encountered when compiling the source code. + +### display_logs + +Display Docker container logs. + +_Function has no arguments._ + +#### Exit codes + +* **0**: If successful. + +### check_opts + +Check options passed as script parameters. + +_Function has no arguments._ + +#### Exit codes + +* **0**: If successful. + +### execute_function + +Used by unit tests to execute a function. + +_Function has no arguments._ + +#### Exit codes + +* **0**: If successful. +* **>0**: If an error has been encountered while executing a function + +### execute_tasks + +Execute tasks based on script parameters or user actions. + +_Function has no arguments._ + +#### Exit codes + +* **0**: If successful. +* **1**: If an error has been encountered displaying help. +* **2**: If an error is encountered when building the ecoCode plugin. +* **3**: If an error is encountered when compiling the ecoCode plugin. +* **4**: If an error is encountered when building Docker services. +* **5**: If an error was encountered while initialize docker compose. +* **6**: If an error is encountered when starting Docker containers. +* **7**: If an error is encountered when stopping Docker containers. +* **8**: If an error is encountered when cleaning Docker containers. +* **9**: If an error is encountered when displaying Docker logs. + +### display_help + +Display help. + +_Function has no arguments._ + +#### Exit codes + +* **0**: If successful. + +### main + +Main function. + +_Function has no arguments._ + +#### Exit codes + +* **0**: If successful. +* **1**: If the options check failed. +* **2**: If task execution failed. + diff --git a/toolbox.sh b/toolbox.sh index 6a5af65..2704296 100755 --- a/toolbox.sh +++ b/toolbox.sh @@ -2,17 +2,10 @@ # @name toolbox.sh # @brief **toolbox.sh** is a utility script for installing the SonarQube dev environment. # @description -# This toolbox enables you to perform the following actions: -# -# * Installing the SonarQube dev environment -# * Run unit tests with **pytest** -# * Linter the code with the **shellcheck** utility -# * Generating the API documentation with the **shdoc** utility -# * Generating a site from markdown files with **mkdocs** +# This toolbox enables you to install the SonarQube dev environment. # Global variables CURRENT_PATH="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)" -DOC_PATH="$CURRENT_PATH/docs" ECOCODE_DC_FILE="$CURRENT_PATH/docker-compose.yml" ECOCODE_DOCKER_ENV="$CURRENT_PATH/.default.docker.env" ECOCODE_JAVA_PLUGIN_VERSION=$(< "$CURRENT_PATH/pom.xml" grep ""|head -n1|sed 's/<\(\/\)*version>//g'|xargs) @@ -80,80 +73,6 @@ function docker_build() { return 0 } -# @description Creating and starting Docker containers. -# @noargs -# @exitcode 0 If successful. -# @exitcode 1 If an error was encountered retrieving environment variables. -# @exitcode 2 If an error was encountered during container creating. -function docker_up() { - ! docker_env_source && return 1 - info "Creating and starting Docker containers" - debug "docker compose -f $ECOCODE_DC_FILE up --build -d" - ! docker compose -f "$ECOCODE_DC_FILE" up --build -d && return 2 - return 0 -} - -# @description Starting Docker containers. -# @noargs -# @exitcode 0 If successful. -# @exitcode 1 If an error was encountered retrieving environment variables. -# @exitcode 2 If an error was encountered during container startup. -function docker_start() { - ! docker_env_source && return 1 - info "Starting Docker containers" - debug "docker compose -f $ECOCODE_DC_FILE start" - ! TOKEN=$ECOCODE_TOKEN docker compose -f "$ECOCODE_DC_FILE" start && return 2 - return 0 -} - -# @description Stopping Docker containers. -# @noargs -# @exitcode 0 If successful. -# @exitcode 1 If an error was encountered retrieving environment variables. -# @exitcode 2 If an error was encountered during container shutdown. -function docker_stop() { - ! docker_env_source && return 1 - info "Stopping Docker containers" - debug "docker compose -f $ECOCODE_DC_FILE stop" - ! docker compose -f "$ECOCODE_DC_FILE" stop && return 2 - return 0 -} - -# @description Stop and remove containers, networks and volumes. -# @noargs -# @exitcode 0 If successful. -# @exitcode 1 If an error was encountered retrieving environment variables. -# @exitcode 2 If an error was encountered during deletion. -function docker_down() { - ! docker_env_source && return 1 - info "Remove Docker containers, networks and volumes" - debug "docker compose -f $ECOCODE_DC_FILE down --volumes" - ! docker compose -f "$ECOCODE_DC_FILE" down --volumes && return 2 - return 0 -} - -# @description Use maven plugin release to prepare locally next release and next SNAPSHOT. -# @noargs -# @exitcode 0 If successful. -function release_prepare() { - # creation of 2 commits with release and next SNAPSHOT - if ! mvn release:prepare -B -ff -DpushChanges=false -DtagNameFormat=@{project.version}; then - return 1 - fi - sleep 2 - return 0 -} - -# @description Clean temporary files. -# @noargs -# @exitcode 0 If successful. -function release_clean() { - if ! mvn release:clean; then - return 1 - fi - return 0 -} - # @description Display Docker service logs. # @noargs # @exitcode 0 If successful. @@ -170,10 +89,14 @@ function docker_logs() { # @noargs # @exitcode 0 If successful. # @exitcode 1 If an error was encountered when building project code in the target folder. -# @exitcode 2 If an error was encountered while initialize docker compose. +# @exitcode 2 If an error was encountered retrieving environment variables. +# @exitcode 3 If an error was encountered during container creating. function init() { ! build && return 1 - ! docker_up && return 2 + ! docker_env_source && return 2 + info "Creating and starting Docker containers" + debug "docker compose -f $ECOCODE_DC_FILE up --build -d" + ! docker compose -f "$ECOCODE_DC_FILE" up --build -d && return 3 return 0 } @@ -181,43 +104,64 @@ function init() { # @noargs # @exitcode 0 If successful. # @exitcode 1 If the ecoCode plugin is not present in the target folder. -# @exitcode 2 If an error is encountered when starting Docker containers. +# @exitcode 2 If an error was encountered retrieving environment variables. +# @exitcode 3 If an error was encountered during container startup. function start() { # Check that the plugin is present in the target folder if ! [[ -f $ECOCODE_JAVA_PLUGIN_JAR ]]; then error "Cannot find ecoCode plugin in target directory" && return 1 fi - ! docker_start && return 2 + ! docker_env_source && return 2 + info "Starting Docker containers" + debug "docker compose -f $ECOCODE_DC_FILE start" + ! TOKEN=$ECOCODE_TOKEN docker compose -f "$ECOCODE_DC_FILE" start && return 3 return 0 } # @description Stopping Docker containers. # @noargs # @exitcode 0 If successful. -# @exitcode 1 If an error is encountered when stopping Docker containers. +# @exitcode 1 If an error was encountered retrieving environment variables. +# @exitcode 2 If an error was encountered during container shutdown. function stop() { - ! docker_stop && return 1 + ! docker_env_source && return 1 + info "Stopping Docker containers" + debug "docker compose -f $ECOCODE_DC_FILE stop" + ! docker compose -f "$ECOCODE_DC_FILE" stop && return 2 + return 0 return 0 } # @description Stop and remove containers, networks and volumes. # @noargs # @exitcode 0 If successful. -# @exitcode 1 If an error is encountered when cleaning Docker services. +# @exitcode 1 If an error was encountered retrieving environment variables. +# @exitcode 2 If an error was encountered during deletion. function clean() { - ! docker_down && return 1 + ! docker_env_source && return 1 + info "Remove Docker containers, networks and volumes" + debug "docker compose -f $ECOCODE_DC_FILE down --volumes" + ! docker compose -f "$ECOCODE_DC_FILE" down --volumes && return 2 + [[ $FORCE -gt 0 ]] && rm -rf "$CURRENT_PATH/target" return 0 } -# @description Use maven plugin to create a new release. +# @description Use maven plugin release to prepare locally next release and next SNAPSHOT. # @noargs # @exitcode 0 If successful. # @exitcode 1 If an error is encountered when prepare the release. -# @exitcode 1 If an error is encountered when cleaning files. +# @exitcode 2 If an error is encountered when cleaning files. function release() { - ! release_prepare && return 1 - ! release_clean && return 2 + # creation of 2 commits with release and next SNAPSHOT + if ! mvn release:prepare -B -ff -DpushChanges=false -DtagNameFormat=@{project.version}; then + return 1 + fi + sleep 2 + # Clean temporary files + if ! mvn release:clean; then + return 2 + fi return 0 } @@ -262,42 +206,6 @@ function display_logs() { return 0 } -# @description Run unit tests. -# @noargs -# @exitcode 0 If successful. -function run_tests() { - info "Run unit tests" - pytest tests/test_*.py - return 0 -} - -# @description Linter the application's bash code. -# @noargs -# @exitcode 0 If successful. -function lint_bash() { - info "Linting bash code" - shellcheck -x toolbox.sh - return 0 -} - -# @description Generate API documentation in markdown format. -# @noargs -# @exitcode 0 If successful. -function generate_bash_doc() { - info "Generating the toolbox API documentation" - shdoc < "$CURRENT_PATH/toolbox.sh" > "$DOC_PATH/toolbox.md" - return 0 -} - -# @description Start the mkdocs server to browse the API documentation in a browser. -# @noargs -# @exitcode 0 If successful. -function mkdocs_server_start() { - info "Start the mkdocs server" - mkdocs serve -a 0.0.0.0:8000 - return 0 -} - # @description Check options passed as script parameters. # @noargs # @exitcode 0 If successful. @@ -314,10 +222,10 @@ function check_opts() { compile) COMPILE=1 ;; build-docker) BUILD_DOCKER=1 ;; --token=*) ECOCODE_TOKEN=$(echo "$opt"|awk -F= '{print $2}') ;; - -h|--help) HELP=1 ;; - -v|--verbose) VERBOSE=1 ;; - -f|--force) FORCE=1 ;; - -l|--logs) DISPLAY_LOGS=1 ;; + --logs) DISPLAY_LOGS=1 ;; + --verbose) VERBOSE=1 ;; + --force) FORCE=1 ;; + --help) HELP=1 ;; *) ARGS+=("$opt") ;; esac done @@ -360,45 +268,45 @@ function execute_tasks() { fi # Building the ecoCode plugin and creating Docker containers if [[ $INIT -gt 0 ]]; then - ! init && return 5 + ! init && return 2 fi # Starting Docker containers if [[ $START -gt 0 ]]; then - ! start && return 6 + ! start && return 3 fi # Stopping Docker containers if [[ $STOP -gt 0 ]]; then - ! stop && return 7 + ! stop && return 4 fi # Stop and remove containers, networks and volumes if [[ $CLEAN -gt 0 ]]; then - ! clean && return 8 + ! clean && return 5 fi # Use maven plugin to create a new release if [[ $RELEASE -gt 0 ]]; then - ! release && return 2 + ! release && return 6 + fi + # create an push an new branch with commits previously prepared + if [[ $RELEASE_PUSH -gt 0 ]]; then + ! release_push && return 7 fi # Build the ecoCode plugin if [[ $BUILD -gt 0 ]]; then - ! build && return 2 + ! build && return 8 fi # Compile the ecoCode plugin if [[ $COMPILE -gt 0 ]]; then - ! compile && return 3 + ! compile && return 9 fi # Build Docker services if [[ $BUILD_DOCKER -gt 0 ]]; then - ! docker_build && return 4 + ! docker_build && return 10 fi # Display Docker container logs if [[ $DISPLAY_LOGS -gt 0 ]]; then - ! display_logs && return 9 + ! display_logs && return 11 fi - return 0 -} -function toto() { - echo "hello world" return 0 } @@ -436,10 +344,9 @@ ${COLORS[GREEN]}-v, --verbose${COLORS[WHITE]} Make the command more talkat # @exitcode 2 If task execution failed. function main() { ARGS=() - HELP=0 + HELP=0 VERBOSE=0 FORCE=0 INIT=0 START=0 STOP=0 CLEAN=0 - RELEASE=0 BUILD=0 COMPILE=0 BUILD_DOCKER=0 - DISPLAY_LOGS=0 VERBOSE=0 FORCE=0 + RELEASE=0 BUILD=0 COMPILE=0 BUILD_DOCKER=0 DISPLAY_LOGS=0 # Check options passed as script parameters and execute tasks ! check_opts "$@" && return 1 # Used by unit tests to execute a function diff --git a/utils.sh b/utils.sh index 6465077..1cd396f 100755 --- a/utils.sh +++ b/utils.sh @@ -13,19 +13,19 @@ function check_env_docker() { return 0 } -# @description Building the utils docker image. +# @description Removing the utils docker image. # @noargs # @exitcode 0 If successful. -function docker_build() { - DOCKER_BUILDKIT=1 docker build -f toolbox.Dockerfile --target=runtime -t="$DOCKER_IMAGE" . +function docker_image_remove() { + docker image rm "$DOCKER_IMAGE" 2> /dev/null return 0 } -# @description Removing the utils docker image. +# @description Building the utils docker image. # @noargs # @exitcode 0 If successful. -function docker_image_remove() { - docker image rm "$DOCKER_IMAGE" 2> /dev/null +function docker_build() { + DOCKER_BUILDKIT=1 docker build -f toolbox.Dockerfile --target=runtime -t="$DOCKER_IMAGE" . return 0 } @@ -37,6 +37,7 @@ function docker_run() { -e ENV=docker \ -p 8000:8000 \ -v "$(pwd)/toolbox.sh:/app/toolbox.sh" \ + -v "$(pwd)/utils_bash.sh:/app/utils_bash.sh" \ -v "$(pwd)/mkdocs.yml:/app/mkdocs.yml" \ -v "$(pwd)/docs:/app/docs" \ -v "$(pwd)/tests:/app/tests" \ @@ -47,10 +48,13 @@ function docker_run() { # @description Main function. # @noargs # @exitcode 0 If successful. -# @exitcode 1 If the options check failed. -# @exitcode 2 If menu display has failed. -# @exitcode 3 If task execution failed. +# @exitcode 1 If Docker is not installed. +# @exitcode 2 If an error is encountered when removing the Docker image. +# @exitcode 3 If an error is encountered when building the Docker image. +# @exitcode 4 If an error occurs in the Docker container. function main() { + FORCE=0 + [[ "$1" = "--force" ]] && FORCE=1 ! check_env_docker && return 1 if [[ $FORCE -gt 0 ]]; then ! docker_image_remove && return 2 diff --git a/utils_bash.sh b/utils_bash.sh new file mode 100755 index 0000000..2373f49 --- /dev/null +++ b/utils_bash.sh @@ -0,0 +1,178 @@ +#!/usr/bin/env bash +# @name utils_bash.sh +# @brief **utils_bash.sh** is a utility script for the toolbox.sh. +# @description +# This utility script enables you to perform the following actions: +# +# * Run unit tests with **pytest** +# * Linter the code with the **shellcheck** utility +# * Generating the API documentation with the **shdoc** utility +# * Generating a site from markdown files with **mkdocs** + +# Global variables +CURRENT_PATH="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)" +DOC_PATH="$CURRENT_PATH/docs" + +# Shell coloring +declare -A COLORS=( + [RED]='\033[0;31m' + [GREEN]='\033[0;32m' + [YELLOW]='\033[0;33m' + [BLUE]='\033[0;34m' + [WHITE]='\033[0;37m' + [NOCOLOR]='\033[0;0m' +) + +# @description Display an information message. +# @noargs +# @exitcode 0 If successful. +function info() { + echo -e "${COLORS[WHITE]}$*${COLORS[NOCOLOR]}" + return 0 +} + +# @description Display an debug message. +# @noargs +# @exitcode 0 If successful. +function debug() { + [[ $VERBOSE -gt 0 ]] && echo -e "${COLORS[BLUE]}$*${COLORS[NOCOLOR]}" + return 0 +} + +# @description Display an error message. +# @noargs +# @exitcode 0 If successful. +function error() { + echo -e "${COLORS[RED]}$*${COLORS[NOCOLOR]}" + return 0 +} + +# @description Run unit tests. +# @noargs +# @exitcode 0 If successful. +function unit_tests() { + info "Run unit tests" + pytest tests/test_*.py + return 0 +} + +# @description Linter the application's bash code. +# @noargs +# @exitcode 0 If successful. +function lint() { + info "Linting bash code" + shellcheck -x toolbox.sh + return 0 +} + +# @description Generate API documentation in markdown format. +# @noargs +# @exitcode 0 If successful. +function generate_doc() { + info "Generating the toolbox API documentation" + shdoc < "$CURRENT_PATH/toolbox.sh" > "$DOC_PATH/toolbox.md" + return 0 +} + +# @description Start the mkdocs server to browse the API documentation in a browser. +# @noargs +# @exitcode 0 If successful. +function mkdocs_server_start() { + info "Start the mkdocs server" + mkdocs serve -a 0.0.0.0:8000 + return 0 +} + +# @description Check options passed as script parameters. +# @noargs +# @exitcode 0 If successful. +function check_opts() { + read -ra opts <<< "$@" + for opt in "${opts[@]}"; do + case "$opt" in + test) UNIT_TEST=1 ;; + lint) LINT=1 ;; + doc) GENERATE_DOC=1 ;; + mkdocs) MKDOCS=1 ;; + --verbose) VERBOSE=1 ;; + --help) HELP=1 ;; + *) ARGS+=("$opt") ;; + esac + done + # Help is displayed if no option is passed as script parameter + if [[ $((HELP+UNIT_TEST+LINT+GENERATE_DOC+MKDOCS)) -eq 0 ]]; then + HELP=1 + fi + return 0 +} + +# @description Execute tasks based on script parameters or user actions. +# @noargs +# @exitcode 0 If successful. +# @exitcode 1 If an error has been encountered displaying help. +# @exitcode 2 If an error is encountered when running unit tests. +# @exitcode 3 If an error is encountered when linter the application's bash code. +# @exitcode 4 If an error is encountered when generate API documentation. +# @exitcode 5 If an error is encountered when starting the mkdocs server. +function execute_tasks() { + # Display help + if [[ $HELP -gt 0 ]]; then + ! display_help && return 1 + return 0 + fi + # Run unit tests + if [[ $UNIT_TEST -gt 0 ]]; then + ! unit_tests && return 2 + fi + # Linter the application's bash code + if [[ $LINT -gt 0 ]]; then + ! lint && return 3 + fi + # Generate API documentation in markdown format + if [[ $GENERATE_DOC -gt 0 ]]; then + ! generate_doc && return 4 + fi + # Start the mkdocs server to browse the API documentation in a browser + if [[ $MKDOCS -gt 0 ]]; then + ! mkdocs_server_start && return 5 + fi + return 0 +} + +# @description Display help. +# @noargs +# @exitcode 0 If successful. +function display_help() { + local output="" + output=" +${COLORS[YELLOW]}Usage${COLORS[WHITE]} $(basename "$0") [OPTIONS] COMMAND +${COLORS[YELLOW]}Commands:${COLORS[NOCOLOR]} +${COLORS[GREEN]}test${COLORS[WHITE]} Run unit tests +${COLORS[GREEN]}lint${COLORS[WHITE]} Linter the application's bash code +${COLORS[GREEN]}doc${COLORS[WHITE]} Generate API documentation +${COLORS[GREEN]}mkdocs${COLORS[WHITE]} Start the mkdocs server +${COLORS[YELLOW]}Options:${COLORS[NOCOLOR]} +${COLORS[GREEN]}-h, --help${COLORS[WHITE]} Display help +${COLORS[GREEN]}-v, --verbose${COLORS[WHITE]} Make the command more talkative + " + echo -e "$output\n"|sed '1d; $d' + return 0 +} + +# @description Main function. +# @noargs +# @exitcode 0 If successful. +# @exitcode 1 If the options check failed. +# @exitcode 2 If task execution failed. +function main() { + ARGS=() + HELP=0 VERBOSE=0 + UNIT_TEST=0 LINT=0 GENERATE_DOC=0 MKDOCS=0 + # Check options passed as script parameters and execute tasks + ! check_opts "$@" && return 1 + # Execute one or more tasks according to script parameters + ! execute_tasks && return 2 + return 0 +} + +main "$@" From cb550315bc02d459a956dad24976bf511418f910 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20LOU=C3=8BT?= Date: Wed, 17 Jul 2024 07:56:41 +0200 Subject: [PATCH 05/15] =?UTF-8?q?=F0=9F=94=A8=20Added=20release=20function?= =?UTF-8?q?s=20and=20updated=20bash=20documentation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/toolbox.md | 138 ++++----------------------------- docs/utils_bash.md | 61 +++++++++++++++ mkdocs.yml | 3 +- toolbox.sh | 187 +++++++++++++++++++-------------------------- utils.sh | 22 ------ utils_bash.sh | 73 ++++++------------ 6 files changed, 178 insertions(+), 306 deletions(-) create mode 100644 docs/utils_bash.md diff --git a/docs/toolbox.md b/docs/toolbox.md index 07bc028..65fb7e3 100644 --- a/docs/toolbox.md +++ b/docs/toolbox.md @@ -8,62 +8,23 @@ This toolbox enables you to install the SonarQube dev environment. ## Index -* [info](#info) -* [debug](#debug) -* [error](#error) * [docker_env_source](#dockerenvsource) * [docker_build](#dockerbuild) -* [docker_logs](#dockerlogs) * [init](#init) * [start](#start) * [stop](#stop) * [clean](#clean) -* [release](#release) +* [display_logs](#displaylogs) * [build](#build) * [compile](#compile) -* [display_logs](#displaylogs) -* [check_opts](#checkopts) -* [execute_function](#executefunction) -* [execute_tasks](#executetasks) +* [release](#release) +* [release_push](#releasepush) * [display_help](#displayhelp) -* [main](#main) - -### info - -Display an information message. - -_Function has no arguments._ - -#### Exit codes - -* **0**: If successful. - -### debug - -Display an debug message. - -_Function has no arguments._ - -#### Exit codes - -* **0**: If successful. - -### error - -Display an error message. - -_Function has no arguments._ - -#### Exit codes - -* **0**: If successful. ### docker_env_source Export environment variables from .default.docker.env file. -_Function has no arguments._ - #### Exit codes * **0**: If successful. @@ -73,31 +34,16 @@ _Function has no arguments._ Build Docker services. -_Function has no arguments._ - #### Exit codes * **0**: If successful. * **1**: If an error was encountered retrieving environment variables. * **2**: If an error has been encountered when building services. -### docker_logs - -Display Docker service logs. - -_Function has no arguments._ - -#### Exit codes - -* **0**: If successful. -* **1**: If an error was encountered retrieving environment variables. - ### init Building the ecoCode plugin and creating containers. -_Function has no arguments._ - #### Exit codes * **0**: If successful. @@ -109,8 +55,6 @@ _Function has no arguments._ Starting Docker containers. -_Function has no arguments._ - #### Exit codes * **0**: If successful. @@ -122,8 +66,6 @@ _Function has no arguments._ Stopping Docker containers. -_Function has no arguments._ - #### Exit codes * **0**: If successful. @@ -134,32 +76,25 @@ _Function has no arguments._ Stop and remove containers, networks and volumes. -_Function has no arguments._ - #### Exit codes * **0**: If successful. * **1**: If an error was encountered retrieving environment variables. * **2**: If an error was encountered during deletion. -### release - -Use maven plugin release to prepare locally next release and next SNAPSHOT. +### display_logs -_Function has no arguments._ +Display Docker container logs. #### Exit codes * **0**: If successful. -* **1**: If an error is encountered when prepare the release. -* **2**: If an error is encountered when cleaning files. +* **1**: If an error was encountered retrieving environment variables. ### build Compile and package source code with maven. -_Function has no arguments._ - #### Exit codes * **0**: If successful. @@ -170,82 +105,35 @@ _Function has no arguments._ Compile source code with maven. -_Function has no arguments._ - #### Exit codes * **0**: If successful. * **1**: If an error was encountered when compiling the source code. -### display_logs - -Display Docker container logs. - -_Function has no arguments._ - -#### Exit codes - -* **0**: If successful. - -### check_opts - -Check options passed as script parameters. - -_Function has no arguments._ - -#### Exit codes - -* **0**: If successful. - -### execute_function - -Used by unit tests to execute a function. +### release -_Function has no arguments._ +Use maven plugin release to prepare locally next release and next SNAPSHOT. #### Exit codes * **0**: If successful. -* **>0**: If an error has been encountered while executing a function - -### execute_tasks +* **1**: If an error is encountered when prepare the release. +* **2**: If an error is encountered when cleaning files. -Execute tasks based on script parameters or user actions. +### release_push -_Function has no arguments._ +Create a push and a new branch with commits previously prepared #### Exit codes * **0**: If successful. -* **1**: If an error has been encountered displaying help. -* **2**: If an error is encountered when building the ecoCode plugin. -* **3**: If an error is encountered when compiling the ecoCode plugin. -* **4**: If an error is encountered when building Docker services. -* **5**: If an error was encountered while initialize docker compose. -* **6**: If an error is encountered when starting Docker containers. -* **7**: If an error is encountered when stopping Docker containers. -* **8**: If an error is encountered when cleaning Docker containers. -* **9**: If an error is encountered when displaying Docker logs. +* **1**: If an error is encountered when push the release. ### display_help Display help. -_Function has no arguments._ - -#### Exit codes - -* **0**: If successful. - -### main - -Main function. - -_Function has no arguments._ - #### Exit codes * **0**: If successful. -* **1**: If the options check failed. -* **2**: If task execution failed. diff --git a/docs/utils_bash.md b/docs/utils_bash.md new file mode 100644 index 0000000..86b2560 --- /dev/null +++ b/docs/utils_bash.md @@ -0,0 +1,61 @@ +# utils_bash.sh + +**utils_bash.sh** is a utility script for the toolbox.sh. + +## Overview + +This utility script enables you to perform the following actions: + +* Run unit tests with **pytest** +* Linter the code with the **shellcheck** utility +* Generating the API documentation with the **shdoc** utility +* Generating a site from markdown files with **mkdocs** + +## Index + +* [unit_tests](#unittests) +* [lint](#lint) +* [generate_doc](#generatedoc) +* [mkdocs_server_start](#mkdocsserverstart) +* [display_help](#displayhelp) + +### unit_tests + +Run unit tests. + +#### Exit codes + +* **0**: If successful. + +### lint + +Linter the application's bash code. + +#### Exit codes + +* **0**: If successful. + +### generate_doc + +Generate API documentation in markdown format. + +#### Exit codes + +* **0**: If successful. + +### mkdocs_server_start + +Start the mkdocs server to browse the API documentation in a browser. + +#### Exit codes + +* **0**: If successful. + +### display_help + +Display help. + +#### Exit codes + +* **0**: If successful. + diff --git a/mkdocs.yml b/mkdocs.yml index e2f9842..5ea7950 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,9 +1,10 @@ site_name: ecoCode-java repo_url: https://github.com/green-code-initiative/ecoCode-java/ -site_description: todo +site_description: Documentation based on ecoCode bash scripts nav: - Home: - toolbox.md + - utils_bash.md theme: name: material palette: diff --git a/toolbox.sh b/toolbox.sh index 2704296..07d2f03 100755 --- a/toolbox.sh +++ b/toolbox.sh @@ -21,32 +21,22 @@ declare -A COLORS=( [NOCOLOR]='\033[0;0m' ) -# @description Display an information message. -# @noargs -# @exitcode 0 If successful. function info() { echo -e "${COLORS[WHITE]}$*${COLORS[NOCOLOR]}" return 0 } -# @description Display an debug message. -# @noargs -# @exitcode 0 If successful. function debug() { [[ $VERBOSE -gt 0 ]] && echo -e "${COLORS[BLUE]}$*${COLORS[NOCOLOR]}" return 0 } -# @description Display an error message. -# @noargs -# @exitcode 0 If successful. function error() { echo -e "${COLORS[RED]}$*${COLORS[NOCOLOR]}" return 0 } # @description Export environment variables from .default.docker.env file. -# @noargs # @exitcode 0 If successful. # @exitcode 1 If the environment file cannot be found. function docker_env_source() { @@ -60,7 +50,6 @@ function docker_env_source() { } # @description Build Docker services. -# @noargs # @exitcode 0 If successful. # @exitcode 1 If an error was encountered retrieving environment variables. # @exitcode 2 If an error has been encountered when building services. @@ -73,20 +62,7 @@ function docker_build() { return 0 } -# @description Display Docker service logs. -# @noargs -# @exitcode 0 If successful. -# @exitcode 1 If an error was encountered retrieving environment variables. -function docker_logs() { - ! docker_env_source && return 1 - info "Display Docker container logs" - debug "docker compose -f $ECOCODE_DC_FILE logs -f" - docker compose -f "$ECOCODE_DC_FILE" logs -f - return 0 -} - # @description Building the ecoCode plugin and creating containers. -# @noargs # @exitcode 0 If successful. # @exitcode 1 If an error was encountered when building project code in the target folder. # @exitcode 2 If an error was encountered retrieving environment variables. @@ -101,7 +77,6 @@ function init() { } # @description Starting Docker containers. -# @noargs # @exitcode 0 If successful. # @exitcode 1 If the ecoCode plugin is not present in the target folder. # @exitcode 2 If an error was encountered retrieving environment variables. @@ -119,7 +94,6 @@ function start() { } # @description Stopping Docker containers. -# @noargs # @exitcode 0 If successful. # @exitcode 1 If an error was encountered retrieving environment variables. # @exitcode 2 If an error was encountered during container shutdown. @@ -129,11 +103,9 @@ function stop() { debug "docker compose -f $ECOCODE_DC_FILE stop" ! docker compose -f "$ECOCODE_DC_FILE" stop && return 2 return 0 - return 0 } # @description Stop and remove containers, networks and volumes. -# @noargs # @exitcode 0 If successful. # @exitcode 1 If an error was encountered retrieving environment variables. # @exitcode 2 If an error was encountered during deletion. @@ -142,31 +114,22 @@ function clean() { info "Remove Docker containers, networks and volumes" debug "docker compose -f $ECOCODE_DC_FILE down --volumes" ! docker compose -f "$ECOCODE_DC_FILE" down --volumes && return 2 - [[ $FORCE -gt 0 ]] && rm -rf "$CURRENT_PATH/target" return 0 } -# @description Use maven plugin release to prepare locally next release and next SNAPSHOT. -# @noargs +# @description Display Docker container logs. # @exitcode 0 If successful. -# @exitcode 1 If an error is encountered when prepare the release. -# @exitcode 2 If an error is encountered when cleaning files. -function release() { - # creation of 2 commits with release and next SNAPSHOT - if ! mvn release:prepare -B -ff -DpushChanges=false -DtagNameFormat=@{project.version}; then - return 1 - fi - sleep 2 - # Clean temporary files - if ! mvn release:clean; then - return 2 - fi +# @exitcode 1 If an error was encountered retrieving environment variables. +function display_logs() { + ! docker_env_source && return 1 + info "Display Docker container logs" + debug "docker compose -f $ECOCODE_DC_FILE logs -f" + docker compose -f "$ECOCODE_DC_FILE" logs -f return 0 } # @description Compile and package source code with maven. -# @noargs # @exitcode 0 If successful. # @exitcode 1 If an error was encountered when building source code. # @exitcode 2 If the ecoCode plugin in target directory cannot be found. @@ -186,7 +149,6 @@ function build() { } # @description Compile source code with maven. -# @noargs # @exitcode 0 If successful. # @exitcode 1 If an error was encountered when compiling the source code. function compile() { @@ -198,17 +160,66 @@ function compile() { return 0 } -# @description Display Docker container logs. -# @noargs +# @description Use maven plugin release to prepare locally next release and next SNAPSHOT. # @exitcode 0 If successful. -function display_logs() { - ! docker_logs && return 1 +# @exitcode 1 If an error is encountered when prepare the release. +# @exitcode 2 If an error is encountered when cleaning files. +function release() { + # creation of 2 commits with release and next SNAPSHOT + if ! mvn release:prepare -B -ff -DpushChanges=false -DtagNameFormat=@{project.version}; then + return 1 + fi + sleep 2 + # Clean temporary files + if ! mvn release:clean; then + return 2 + fi return 0 } -# @description Check options passed as script parameters. -# @noargs +# @description Create a push and a new branch with commits previously prepared # @exitcode 0 If successful. +# @exitcode 1 If an error is encountered when push the release. +function release_push() { + local last_tag="" branch_name="" + # checkout released tag and creation of branch to push (becasue of main protection) + last_tag=$(git tag --sort=-version:refname | head -n 1) + branch_name="release_${last_tag}" + git checkout -b "${branch_name}" + # push branch associated to new tag release + git push --set-upstream origin "${branch_name}" + return 0 +} + +# @description Display help. +# @exitcode 0 If successful. +function display_help() { + local output="" + output=" +${COLORS[YELLOW]}Usage${COLORS[WHITE]} $(basename "$0") [OPTIONS] COMMAND +${COLORS[YELLOW]}Commands:${COLORS[NOCOLOR]} +${COLORS[GREEN]}init${COLORS[WHITE]} Initialize and creating containers +${COLORS[GREEN]}start${COLORS[WHITE]} Starting Docker containers +${COLORS[GREEN]}stop${COLORS[WHITE]} Stopping Docker containers +${COLORS[GREEN]}clean${COLORS[WHITE]} Stop and remove containers, networks and volumes +${COLORS[GREEN]}build${COLORS[WHITE]} Build the ecoCode plugin +${COLORS[GREEN]}compile${COLORS[WHITE]} Compile the ecoCode plugin +${COLORS[GREEN]}build-docker${COLORS[WHITE]} Build Docker services +${COLORS[GREEN]}release${COLORS[WHITE]} Create a new release +${COLORS[GREEN]}release-push${COLORS[WHITE]} Push the new release +${COLORS[YELLOW]}Options:${COLORS[NOCOLOR]} +${COLORS[GREEN]}-l, --logs${COLORS[WHITE]} Display Docker container logs +${COLORS[GREEN]}-p, --push${COLORS[WHITE]} Push the new release +${COLORS[GREEN]}-f, --force${COLORS[WHITE]} To delete the target folder or recompile the source code +${COLORS[GREEN]}--token=${COLORS[WHITE]} Creating containers with previously created token +${COLORS[GREEN]}-h, --help${COLORS[WHITE]} Display help +${COLORS[GREEN]}-v, --verbose${COLORS[WHITE]} Make the command more talkative + " + echo -e "$output\n"|sed '1d; $d' + return 0 +} + +# Check options passed as script parameters. function check_opts() { read -ra opts <<< "$@" for opt in "${opts[@]}"; do @@ -218,6 +229,7 @@ function check_opts() { stop) STOP=1 ;; clean) CLEAN=1 ;; release) RELEASE=1 ;; + release-push) RELEASE_PUSH=1 ;; build) BUILD=1 ;; compile) COMPILE=1 ;; build-docker) BUILD_DOCKER=1 ;; @@ -236,10 +248,7 @@ function check_opts() { return 0 } -# @description Used by unit tests to execute a function. -# @noargs -# @exitcode 0 If successful. -# @exitcode >0 If an error has been encountered while executing a function +# Used by unit tests to execute a function. function execute_function() { if ! [[ $(type -t "${ARGS[0]}") == function ]]; then error "Function with name ${ARGS[0]} does not exist" && return 1 @@ -248,18 +257,7 @@ function execute_function() { return $? } -# @description Execute tasks based on script parameters or user actions. -# @noargs -# @exitcode 0 If successful. -# @exitcode 1 If an error has been encountered displaying help. -# @exitcode 2 If an error is encountered when building the ecoCode plugin. -# @exitcode 3 If an error is encountered when compiling the ecoCode plugin. -# @exitcode 4 If an error is encountered when building Docker services. -# @exitcode 5 If an error was encountered while initialize docker compose. -# @exitcode 6 If an error is encountered when starting Docker containers. -# @exitcode 7 If an error is encountered when stopping Docker containers. -# @exitcode 8 If an error is encountered when cleaning Docker containers. -# @exitcode 9 If an error is encountered when displaying Docker logs. +# Execute tasks based on script parameters or user actions. function execute_tasks() { # Display help if [[ $HELP -gt 0 ]]; then @@ -282,25 +280,25 @@ function execute_tasks() { if [[ $CLEAN -gt 0 ]]; then ! clean && return 5 fi - # Use maven plugin to create a new release - if [[ $RELEASE -gt 0 ]]; then - ! release && return 6 - fi - # create an push an new branch with commits previously prepared - if [[ $RELEASE_PUSH -gt 0 ]]; then - ! release_push && return 7 - fi # Build the ecoCode plugin if [[ $BUILD -gt 0 ]]; then - ! build && return 8 + ! build && return 6 fi # Compile the ecoCode plugin if [[ $COMPILE -gt 0 ]]; then - ! compile && return 9 + ! compile && return 7 fi # Build Docker services if [[ $BUILD_DOCKER -gt 0 ]]; then - ! docker_build && return 10 + ! docker_build && return 8 + fi + # Use maven plugin to create a new release + if [[ $RELEASE -gt 0 ]]; then + ! release && return 9 + fi + # create an push an new branch with commits previously prepared + if [[ $RELEASE_PUSH -gt 0 ]]; then + ! release_push && return 10 fi # Display Docker container logs if [[ $DISPLAY_LOGS -gt 0 ]]; then @@ -310,38 +308,7 @@ function execute_tasks() { return 0 } -# @description Display help. -# @noargs -# @exitcode 0 If successful. -function display_help() { - local output="" - output=" -${COLORS[YELLOW]}Usage${COLORS[WHITE]} $(basename "$0") [OPTIONS] COMMAND -${COLORS[YELLOW]}Commands:${COLORS[NOCOLOR]} -${COLORS[GREEN]}init${COLORS[WHITE]} Initialize and creating containers -${COLORS[GREEN]}start${COLORS[WHITE]} Starting Docker containers -${COLORS[GREEN]}stop${COLORS[WHITE]} Stopping Docker containers -${COLORS[GREEN]}clean${COLORS[WHITE]} Stop and remove containers, networks and volumes -${COLORS[GREEN]}release${COLORS[WHITE]} Create a new release -${COLORS[GREEN]}build${COLORS[WHITE]} Build the ecoCode plugin -${COLORS[GREEN]}compile${COLORS[WHITE]} Compile the ecoCode plugin -${COLORS[GREEN]}build-docker${COLORS[WHITE]} Build Docker services -${COLORS[YELLOW]}Options:${COLORS[NOCOLOR]} -${COLORS[GREEN]}-l, --logs${COLORS[WHITE]} Display Docker container logs -${COLORS[GREEN]}-f, --force${COLORS[WHITE]} To delete the target folder or recompile the source code -${COLORS[GREEN]}--token=${COLORS[WHITE]} Creating containers with previously created token -${COLORS[GREEN]}-h, --help${COLORS[WHITE]} Display help -${COLORS[GREEN]}-v, --verbose${COLORS[WHITE]} Make the command more talkative - " - echo -e "$output\n"|sed '1d; $d' - return 0 -} - -# @description Main function. -# @noargs -# @exitcode 0 If successful. -# @exitcode 1 If the options check failed. -# @exitcode 2 If task execution failed. +# Main function. function main() { ARGS=() HELP=0 VERBOSE=0 FORCE=0 diff --git a/utils.sh b/utils.sh index 1cd396f..7ff7113 100755 --- a/utils.sh +++ b/utils.sh @@ -1,37 +1,22 @@ #!/usr/bin/env bash -# @name Utils -# @brief **utils.sh**. DOCKER_IMAGE="toolbox:1.0.0" -# @description Check if docker is installed. -# @noargs -# @exitcode 0 If docker is installed. -# @exitcode 1 If docker is not installed. function check_env_docker() { ! [[ -x "$(command -v docker)" ]] && echo "Please install docker" && return 1 return 0 } -# @description Removing the utils docker image. -# @noargs -# @exitcode 0 If successful. function docker_image_remove() { docker image rm "$DOCKER_IMAGE" 2> /dev/null return 0 } -# @description Building the utils docker image. -# @noargs -# @exitcode 0 If successful. function docker_build() { DOCKER_BUILDKIT=1 docker build -f toolbox.Dockerfile --target=runtime -t="$DOCKER_IMAGE" . return 0 } -# @description Execute a command in the docker container. -# @noargs -# @exitcode 0 If successful. function docker_run() { docker run --rm -it \ -e ENV=docker \ @@ -45,13 +30,6 @@ function docker_run() { return 0 } -# @description Main function. -# @noargs -# @exitcode 0 If successful. -# @exitcode 1 If Docker is not installed. -# @exitcode 2 If an error is encountered when removing the Docker image. -# @exitcode 3 If an error is encountered when building the Docker image. -# @exitcode 4 If an error occurs in the Docker container. function main() { FORCE=0 [[ "$1" = "--force" ]] && FORCE=1 diff --git a/utils_bash.sh b/utils_bash.sh index 2373f49..c04b2ac 100755 --- a/utils_bash.sh +++ b/utils_bash.sh @@ -23,32 +23,25 @@ declare -A COLORS=( [NOCOLOR]='\033[0;0m' ) -# @description Display an information message. -# @noargs -# @exitcode 0 If successful. +# Display an information message. function info() { echo -e "${COLORS[WHITE]}$*${COLORS[NOCOLOR]}" return 0 } -# @description Display an debug message. -# @noargs -# @exitcode 0 If successful. +# Display an debug message. function debug() { [[ $VERBOSE -gt 0 ]] && echo -e "${COLORS[BLUE]}$*${COLORS[NOCOLOR]}" return 0 } -# @description Display an error message. -# @noargs -# @exitcode 0 If successful. +# Display an error message. function error() { echo -e "${COLORS[RED]}$*${COLORS[NOCOLOR]}" return 0 } # @description Run unit tests. -# @noargs # @exitcode 0 If successful. function unit_tests() { info "Run unit tests" @@ -57,7 +50,6 @@ function unit_tests() { } # @description Linter the application's bash code. -# @noargs # @exitcode 0 If successful. function lint() { info "Linting bash code" @@ -66,16 +58,15 @@ function lint() { } # @description Generate API documentation in markdown format. -# @noargs # @exitcode 0 If successful. function generate_doc() { info "Generating the toolbox API documentation" shdoc < "$CURRENT_PATH/toolbox.sh" > "$DOC_PATH/toolbox.md" + shdoc < "$CURRENT_PATH/utils_bash.sh" > "$DOC_PATH/utils_bash.md" return 0 } # @description Start the mkdocs server to browse the API documentation in a browser. -# @noargs # @exitcode 0 If successful. function mkdocs_server_start() { info "Start the mkdocs server" @@ -83,9 +74,26 @@ function mkdocs_server_start() { return 0 } -# @description Check options passed as script parameters. -# @noargs +# @description Display help. # @exitcode 0 If successful. +function display_help() { + local output="" + output=" +${COLORS[YELLOW]}Usage${COLORS[WHITE]} $(basename "$0") [OPTIONS] COMMAND +${COLORS[YELLOW]}Commands:${COLORS[NOCOLOR]} +${COLORS[GREEN]}test${COLORS[WHITE]} Run unit tests +${COLORS[GREEN]}lint${COLORS[WHITE]} Linter the application's bash code +${COLORS[GREEN]}doc${COLORS[WHITE]} Generate API documentation +${COLORS[GREEN]}mkdocs${COLORS[WHITE]} Start the mkdocs server +${COLORS[YELLOW]}Options:${COLORS[NOCOLOR]} +${COLORS[GREEN]}-h, --help${COLORS[WHITE]} Display help +${COLORS[GREEN]}-v, --verbose${COLORS[WHITE]} Make the command more talkative + " + echo -e "$output\n"|sed '1d; $d' + return 0 +} + +# Check options passed as script parameters. function check_opts() { read -ra opts <<< "$@" for opt in "${opts[@]}"; do @@ -106,14 +114,7 @@ function check_opts() { return 0 } -# @description Execute tasks based on script parameters or user actions. -# @noargs -# @exitcode 0 If successful. -# @exitcode 1 If an error has been encountered displaying help. -# @exitcode 2 If an error is encountered when running unit tests. -# @exitcode 3 If an error is encountered when linter the application's bash code. -# @exitcode 4 If an error is encountered when generate API documentation. -# @exitcode 5 If an error is encountered when starting the mkdocs server. +# Execute tasks based on script parameters or user actions. function execute_tasks() { # Display help if [[ $HELP -gt 0 ]]; then @@ -139,31 +140,7 @@ function execute_tasks() { return 0 } -# @description Display help. -# @noargs -# @exitcode 0 If successful. -function display_help() { - local output="" - output=" -${COLORS[YELLOW]}Usage${COLORS[WHITE]} $(basename "$0") [OPTIONS] COMMAND -${COLORS[YELLOW]}Commands:${COLORS[NOCOLOR]} -${COLORS[GREEN]}test${COLORS[WHITE]} Run unit tests -${COLORS[GREEN]}lint${COLORS[WHITE]} Linter the application's bash code -${COLORS[GREEN]}doc${COLORS[WHITE]} Generate API documentation -${COLORS[GREEN]}mkdocs${COLORS[WHITE]} Start the mkdocs server -${COLORS[YELLOW]}Options:${COLORS[NOCOLOR]} -${COLORS[GREEN]}-h, --help${COLORS[WHITE]} Display help -${COLORS[GREEN]}-v, --verbose${COLORS[WHITE]} Make the command more talkative - " - echo -e "$output\n"|sed '1d; $d' - return 0 -} - -# @description Main function. -# @noargs -# @exitcode 0 If successful. -# @exitcode 1 If the options check failed. -# @exitcode 2 If task execution failed. +# Main function. function main() { ARGS=() HELP=0 VERBOSE=0 From e2210ccc4f943b69ddfc32a78b75a8fd625e3ec6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20LOU=C3=8BT?= Date: Wed, 17 Jul 2024 08:28:43 +0200 Subject: [PATCH 06/15] =?UTF-8?q?=F0=9F=94=A8=20Update=20release=20functio?= =?UTF-8?q?n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- toolbox.sh | 18 +++++++++++++----- utils.sh | 1 + utils_bash.sh | 2 +- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/toolbox.sh b/toolbox.sh index 07d2f03..8897200 100755 --- a/toolbox.sh +++ b/toolbox.sh @@ -179,11 +179,19 @@ function release() { # @description Create a push and a new branch with commits previously prepared # @exitcode 0 If successful. -# @exitcode 1 If an error is encountered when push the release. +# @exitcode 1 If the last commit tag does not match the last git tag. function release_push() { - local last_tag="" branch_name="" - # checkout released tag and creation of branch to push (becasue of main protection) + local last_tag_prepare="" last_tag="" branch_name="" + # Check that the release has been properly prepared + last_tag_prepare=$(git log -2 --pretty=%B|grep "prepare release"|awk '{print $NF}') + # Retrieve last tag last_tag=$(git tag --sort=-version:refname | head -n 1) + # Check that the tag is correct + if ! [[ "$last_tag_prepare" = "$last_tag" ]]; then + error "The last commit tag does not match the last git tag" + return 1 + fi + # Checkout released tag and creation of branch to push (because of main protection) branch_name="release_${last_tag}" git checkout -b "${branch_name}" # push branch associated to new tag release @@ -242,7 +250,7 @@ function check_opts() { esac done # Help is displayed if no option is passed as script parameter - if [[ $((HELP+INIT+START+STOP+CLEAN+RELEASE+BUILD+COMPILE+BUILD_DOCKER+DISPLAY_LOGS)) -eq 0 ]]; then + if [[ $((HELP+INIT+START+STOP+CLEAN+RELEASE+RELEASE_PUSH+BUILD+COMPILE+BUILD_DOCKER+DISPLAY_LOGS)) -eq 0 ]]; then HELP=1 fi return 0 @@ -253,7 +261,7 @@ function execute_function() { if ! [[ $(type -t "${ARGS[0]}") == function ]]; then error "Function with name ${ARGS[0]} does not exist" && return 1 fi - eval "${ARGS[@]}" + "${ARGS[@]}" return $? } diff --git a/utils.sh b/utils.sh index 7ff7113..de7861b 100755 --- a/utils.sh +++ b/utils.sh @@ -23,6 +23,7 @@ function docker_run() { -p 8000:8000 \ -v "$(pwd)/toolbox.sh:/app/toolbox.sh" \ -v "$(pwd)/utils_bash.sh:/app/utils_bash.sh" \ + -v "$(pwd)/.default.docker.env:/app/.default.docker.env" \ -v "$(pwd)/mkdocs.yml:/app/mkdocs.yml" \ -v "$(pwd)/docs:/app/docs" \ -v "$(pwd)/tests:/app/tests" \ diff --git a/utils_bash.sh b/utils_bash.sh index c04b2ac..474ddd0 100755 --- a/utils_bash.sh +++ b/utils_bash.sh @@ -53,7 +53,7 @@ function unit_tests() { # @exitcode 0 If successful. function lint() { info "Linting bash code" - shellcheck -x toolbox.sh + shellcheck -e SC1083 -x toolbox.sh return 0 } From 59a2b92506de3c45a9418720ba4c9cfd28097602 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20Lou=C3=ABt?= Date: Fri, 19 Jul 2024 08:54:48 +0200 Subject: [PATCH 07/15] =?UTF-8?q?=F0=9F=94=A8=20Update=20the=20pytest=20en?= =?UTF-8?q?vironment=20and=20add=20various=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/{toolbox.md => index.md} | 4 +- docs/utils_bash.md | 61 ------------ mkdocs.yml | 4 +- poetry.lock | 179 +++++++++++++++++++++++++++------- pyproject.toml | 2 +- tests/test_toolbox.py | 20 ++-- toolbox.Dockerfile | 10 +- toolbox.sh | 3 +- utils.sh | 2 + utils_bash.sh | 6 +- 10 files changed, 168 insertions(+), 123 deletions(-) rename docs/{toolbox.md => index.md} (95%) delete mode 100644 docs/utils_bash.md diff --git a/docs/toolbox.md b/docs/index.md similarity index 95% rename from docs/toolbox.md rename to docs/index.md index 65fb7e3..0ce65c0 100644 --- a/docs/toolbox.md +++ b/docs/index.md @@ -1,7 +1,5 @@ # toolbox.sh -**toolbox.sh** is a utility script for installing the SonarQube dev environment. - ## Overview This toolbox enables you to install the SonarQube dev environment. @@ -127,7 +125,7 @@ Create a push and a new branch with commits previously prepared #### Exit codes * **0**: If successful. -* **1**: If an error is encountered when push the release. +* **1**: If the last commit tag does not match the last git tag. ### display_help diff --git a/docs/utils_bash.md b/docs/utils_bash.md deleted file mode 100644 index 86b2560..0000000 --- a/docs/utils_bash.md +++ /dev/null @@ -1,61 +0,0 @@ -# utils_bash.sh - -**utils_bash.sh** is a utility script for the toolbox.sh. - -## Overview - -This utility script enables you to perform the following actions: - -* Run unit tests with **pytest** -* Linter the code with the **shellcheck** utility -* Generating the API documentation with the **shdoc** utility -* Generating a site from markdown files with **mkdocs** - -## Index - -* [unit_tests](#unittests) -* [lint](#lint) -* [generate_doc](#generatedoc) -* [mkdocs_server_start](#mkdocsserverstart) -* [display_help](#displayhelp) - -### unit_tests - -Run unit tests. - -#### Exit codes - -* **0**: If successful. - -### lint - -Linter the application's bash code. - -#### Exit codes - -* **0**: If successful. - -### generate_doc - -Generate API documentation in markdown format. - -#### Exit codes - -* **0**: If successful. - -### mkdocs_server_start - -Start the mkdocs server to browse the API documentation in a browser. - -#### Exit codes - -* **0**: If successful. - -### display_help - -Display help. - -#### Exit codes - -* **0**: If successful. - diff --git a/mkdocs.yml b/mkdocs.yml index 5ea7950..a959630 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -2,9 +2,7 @@ site_name: ecoCode-java repo_url: https://github.com/green-code-initiative/ecoCode-java/ site_description: Documentation based on ecoCode bash scripts nav: - - Home: - - toolbox.md - - utils_bash.md + - index.md theme: name: material palette: diff --git a/poetry.lock b/poetry.lock index 8b21a07..aa11155 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,23 @@ -# This file is automatically @generated by Poetry 1.8.0 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. + +[[package]] +name = "attrs" +version = "23.2.0" +description = "Classes Without Boilerplate" +optional = false +python-versions = ">=3.7" +files = [ + {file = "attrs-23.2.0-py3-none-any.whl", hash = "sha256:99b87a485a5820b23b879f04c2305b44b951b502fd64be915879d77a7e8fc6f1"}, + {file = "attrs-23.2.0.tar.gz", hash = "sha256:935dc3b529c262f6cf76e50877d35a4bd3c1de194fd41f47a2b7ae8f19971f30"}, +] + +[package.extras] +cov = ["attrs[tests]", "coverage[toml] (>=5.3)"] +dev = ["attrs[tests]", "pre-commit"] +docs = ["furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier", "zope-interface"] +tests = ["attrs[tests-no-zope]", "zope-interface"] +tests-mypy = ["mypy (>=1.6)", "pytest-mypy-plugins"] +tests-no-zope = ["attrs[tests-mypy]", "cloudpickle", "hypothesis", "pympler", "pytest (>=4.3.0)", "pytest-xdist[psutil]"] [[package]] name = "babel" @@ -149,6 +168,17 @@ files = [ {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, ] +[[package]] +name = "distro" +version = "1.9.0" +description = "Distro - an OS platform information API" +optional = false +python-versions = ">=3.6" +files = [ + {file = "distro-1.9.0-py3-none-any.whl", hash = "sha256:7bffd925d65168f85027d8da9af6bddab658135b840670a223589bc0c8ef02b2"}, + {file = "distro-1.9.0.tar.gz", hash = "sha256:2fa77c6fd8940f116ee1d6b94a2f90b13b5ea8d019b98bc8bafdcabcdd9bdbed"}, +] + [[package]] name = "ghp-import" version = "2.1.0" @@ -188,17 +218,6 @@ files = [ {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, ] -[[package]] -name = "itermate" -version = "1.0.2" -description = "Iterator-tools for functional programming." -optional = false -python-versions = "*" -files = [ - {file = "itermate-1.0.2-py2-none-any.whl", hash = "sha256:00308991e0fe54465e0e0fbec4d47180b4f6df0f26c1e5d2ce3641e3373f28a0"}, - {file = "itermate-1.0.2.zip", hash = "sha256:5ee758cbb363493156cee7a29effc2b148a1a19d2be3097e92fc824991901e2a"}, -] - [[package]] name = "jinja2" version = "3.1.4" @@ -474,6 +493,35 @@ files = [ dev = ["pre-commit", "tox"] testing = ["pytest", "pytest-benchmark"] +[[package]] +name = "psutil" +version = "6.0.0" +description = "Cross-platform lib for process and system monitoring in Python." +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,>=2.7" +files = [ + {file = "psutil-6.0.0-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:a021da3e881cd935e64a3d0a20983bda0bb4cf80e4f74fa9bfcb1bc5785360c6"}, + {file = "psutil-6.0.0-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:1287c2b95f1c0a364d23bc6f2ea2365a8d4d9b726a3be7294296ff7ba97c17f0"}, + {file = "psutil-6.0.0-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:a9a3dbfb4de4f18174528d87cc352d1f788b7496991cca33c6996f40c9e3c92c"}, + {file = "psutil-6.0.0-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:6ec7588fb3ddaec7344a825afe298db83fe01bfaaab39155fa84cf1c0d6b13c3"}, + {file = "psutil-6.0.0-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:1e7c870afcb7d91fdea2b37c24aeb08f98b6d67257a5cb0a8bc3ac68d0f1a68c"}, + {file = "psutil-6.0.0-cp27-none-win32.whl", hash = "sha256:02b69001f44cc73c1c5279d02b30a817e339ceb258ad75997325e0e6169d8b35"}, + {file = "psutil-6.0.0-cp27-none-win_amd64.whl", hash = "sha256:21f1fb635deccd510f69f485b87433460a603919b45e2a324ad65b0cc74f8fb1"}, + {file = "psutil-6.0.0-cp36-abi3-macosx_10_9_x86_64.whl", hash = "sha256:c588a7e9b1173b6e866756dde596fd4cad94f9399daf99ad8c3258b3cb2b47a0"}, + {file = "psutil-6.0.0-cp36-abi3-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6ed2440ada7ef7d0d608f20ad89a04ec47d2d3ab7190896cd62ca5fc4fe08bf0"}, + {file = "psutil-6.0.0-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5fd9a97c8e94059b0ef54a7d4baf13b405011176c3b6ff257c247cae0d560ecd"}, + {file = "psutil-6.0.0-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e2e8d0054fc88153ca0544f5c4d554d42e33df2e009c4ff42284ac9ebdef4132"}, + {file = "psutil-6.0.0-cp36-cp36m-win32.whl", hash = "sha256:fc8c9510cde0146432bbdb433322861ee8c3efbf8589865c8bf8d21cb30c4d14"}, + {file = "psutil-6.0.0-cp36-cp36m-win_amd64.whl", hash = "sha256:34859b8d8f423b86e4385ff3665d3f4d94be3cdf48221fbe476e883514fdb71c"}, + {file = "psutil-6.0.0-cp37-abi3-win32.whl", hash = "sha256:a495580d6bae27291324fe60cea0b5a7c23fa36a7cd35035a16d93bdcf076b9d"}, + {file = "psutil-6.0.0-cp37-abi3-win_amd64.whl", hash = "sha256:33ea5e1c975250a720b3a6609c490db40dae5d83a4eb315170c4fe0d8b1f34b3"}, + {file = "psutil-6.0.0-cp38-abi3-macosx_11_0_arm64.whl", hash = "sha256:ffe7fc9b6b36beadc8c322f84e1caff51e8703b88eee1da46d1e3a6ae11b4fd0"}, + {file = "psutil-6.0.0.tar.gz", hash = "sha256:8faae4f310b6d969fa26ca0545338b21f73c6b15db7c4a8d934a5482faa818f2"}, +] + +[package.extras] +test = ["enum34", "ipaddress", "mock", "pywin32", "wmi"] + [[package]] name = "pygments" version = "2.18.0" @@ -527,18 +575,72 @@ pluggy = ">=1.5,<2.0" dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] [[package]] -name = "pytest-shell" -version = "0.3.2" -description = "A pytest plugin to help with testing shell scripts / black box commands" +name = "pytest-helpers-namespace" +version = "2021.12.29" +description = "Pytest Helpers Namespace Plugin" optional = false -python-versions = ">=3.7,<4.0" +python-versions = ">=3.5.6" files = [ - {file = "pytest-shell-0.3.2.tar.gz", hash = "sha256:7e30cf518a5271328f25eaa9013e1639607f169d7396a4b85204a8b34dacbab1"}, - {file = "pytest_shell-0.3.2-py3-none-any.whl", hash = "sha256:f60716134fc30e2c1fe9facb9fe60121d18b4d7b95e692b2c6f29271350aa12b"}, + {file = "pytest-helpers-namespace-2021.12.29.tar.gz", hash = "sha256:792038247e0021beb966a7ea6e3a70ff5fcfba77eb72c6ec8fd6287af871c35b"}, + {file = "pytest_helpers_namespace-2021.12.29-py3-none-any.whl", hash = "sha256:d5c0262642998437a73d85cb6ae0db57d574facc551c4a4695e92ec50469eb98"}, ] [package.dependencies] -where = ">=1.0.2,<2.0.0" +pytest = ">=6.0.0" + +[package.extras] +changelog = ["towncrier (==21.9.0rc1)"] +docs = ["furo", "sphinx", "sphinx-copybutton", "sphinx-prompt", "sphinxcontrib-spelling", "sphinxcontrib-towncrier (>=0.2.0a0)", "towncrier (==21.3.0)"] +lint = ["black", "pyenchant", "pylint (==2.12.2)", "reorder-python-imports"] + +[[package]] +name = "pytest-shell-utilities" +version = "1.9.0" +description = "Pytest plugin to simplify running shell commands against the system" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pytest-shell-utilities-1.9.0.tar.gz", hash = "sha256:e9ae85f8c64dd2b95e35ed1f110a90e25d498cb1af946be7cf1b7f069c089499"}, + {file = "pytest_shell_utilities-1.9.0-py3-none-any.whl", hash = "sha256:6c05c90cc8bc04fe4e3cbe342acfff5559f88816d1d20c80e7713895cc79687c"}, +] + +[package.dependencies] +attrs = ">=22.1.0" +psutil = ">=5.0.0" +pytest = ">=7.4.0" +pytest-helpers-namespace = "*" +pytest-skip-markers = "*" + +[package.extras] +changelog = ["towncrier (==21.9.0rc1)"] +docs = ["furo", "sphinx", "sphinx-copybutton", "sphinx-prompt", "sphinxcontrib-spelling", "sphinxcontrib-towncrier (>=0.2.1a0)"] +lint = ["black", "flake8 (>=4.0.1)", "flake8-docstrings", "flake8-mypy-fork", "flake8-typing-imports", "pyenchant", "pylint (==2.12.2)", "reorder-python-imports"] +tests = ["pytest-skip-markers", "pytest-subtests"] + +[[package]] +name = "pytest-skip-markers" +version = "1.5.1" +description = "Pytest Salt Plugin" +optional = false +python-versions = ">=3.7" +files = [ + {file = "pytest-skip-markers-1.5.1.tar.gz", hash = "sha256:b208b6b804a320691f9e3a0d0721345a8710b9791c4324499294b6a8e4b0e82b"}, + {file = "pytest_skip_markers-1.5.1-py3-none-any.whl", hash = "sha256:9e3f5ede6e1e6d6dc65e83136e9335abe7d5c4f2f55b94b4fb83d3da5b8d8f0c"}, +] + +[package.dependencies] +attrs = ">=19.2.0" +distro = "*" +pytest = ">=7.1.0" +pywin32 = {version = "*", markers = "sys_platform == \"win32\""} + +[package.extras] +changelog = ["towncrier (==21.9.0rc1)"] +docker = ["docker"] +docs = ["furo", "sphinx", "sphinx-copybutton", "sphinx-prompt", "sphinxcontrib-spelling", "sphinxcontrib-towncrier (>=0.2.1a0)"] +lint = ["black", "flake8 (>=4.0.1)", "flake8-docstrings", "flake8-mypy-fork", "flake8-typing-imports", "pyenchant", "pylint (==2.12.2)", "reorder-python-imports"] +salt = ["salt (>=3001)"] +tests = ["cryptography", "docker", "pyfakefs", "pyfakefs (==4.4.0)", "pytest-subtests"] [[package]] name = "python-dateutil" @@ -554,6 +656,29 @@ files = [ [package.dependencies] six = ">=1.5" +[[package]] +name = "pywin32" +version = "306" +description = "Python for Window Extensions" +optional = false +python-versions = "*" +files = [ + {file = "pywin32-306-cp310-cp310-win32.whl", hash = "sha256:06d3420a5155ba65f0b72f2699b5bacf3109f36acbe8923765c22938a69dfc8d"}, + {file = "pywin32-306-cp310-cp310-win_amd64.whl", hash = "sha256:84f4471dbca1887ea3803d8848a1616429ac94a4a8d05f4bc9c5dcfd42ca99c8"}, + {file = "pywin32-306-cp311-cp311-win32.whl", hash = "sha256:e65028133d15b64d2ed8f06dd9fbc268352478d4f9289e69c190ecd6818b6407"}, + {file = "pywin32-306-cp311-cp311-win_amd64.whl", hash = "sha256:a7639f51c184c0272e93f244eb24dafca9b1855707d94c192d4a0b4c01e1100e"}, + {file = "pywin32-306-cp311-cp311-win_arm64.whl", hash = "sha256:70dba0c913d19f942a2db25217d9a1b726c278f483a919f1abfed79c9cf64d3a"}, + {file = "pywin32-306-cp312-cp312-win32.whl", hash = "sha256:383229d515657f4e3ed1343da8be101000562bf514591ff383ae940cad65458b"}, + {file = "pywin32-306-cp312-cp312-win_amd64.whl", hash = "sha256:37257794c1ad39ee9be652da0462dc2e394c8159dfd913a8a4e8eb6fd346da0e"}, + {file = "pywin32-306-cp312-cp312-win_arm64.whl", hash = "sha256:5821ec52f6d321aa59e2db7e0a35b997de60c201943557d108af9d4ae1ec7040"}, + {file = "pywin32-306-cp37-cp37m-win32.whl", hash = "sha256:1c73ea9a0d2283d889001998059f5eaaba3b6238f767c9cf2833b13e6a685f65"}, + {file = "pywin32-306-cp37-cp37m-win_amd64.whl", hash = "sha256:72c5f621542d7bdd4fdb716227be0dd3f8565c11b280be6315b06ace35487d36"}, + {file = "pywin32-306-cp38-cp38-win32.whl", hash = "sha256:e4c092e2589b5cf0d365849e73e02c391c1349958c5ac3e9d5ccb9a28e017b3a"}, + {file = "pywin32-306-cp38-cp38-win_amd64.whl", hash = "sha256:e8ac1ae3601bee6ca9f7cb4b5363bf1c0badb935ef243c4733ff9a393b1690c0"}, + {file = "pywin32-306-cp39-cp39-win32.whl", hash = "sha256:e25fd5b485b55ac9c057f67d94bc203f3f6595078d1fb3b458c9c28b7153a802"}, + {file = "pywin32-306-cp39-cp39-win_amd64.whl", hash = "sha256:39b61c15272833b5c329a2989999dcae836b1eed650252ab1b7bfbe1d59f30f4"}, +] + [[package]] name = "pyyaml" version = "6.0.1" @@ -809,21 +934,7 @@ files = [ [package.extras] watchmedo = ["PyYAML (>=3.10)"] -[[package]] -name = "where" -version = "1.0.2" -description = "Locates absolute file paths like the Windows 'where' or the Linux 'which' utility.\nMakes use of the PATH variable and the current directory." -optional = false -python-versions = "*" -files = [ - {file = "where-1.0.2-py2.py3-none-any.whl", hash = "sha256:66abc8edf95be7516e949d08a771f25acacff708ef481618562ab484fe5bc63e"}, - {file = "where-1.0.2.zip", hash = "sha256:325ef3a492a26189a47819f7375bc146887d39edd36fce132e86514334803fb1"}, -] - -[package.dependencies] -itermate = "1.0.2" - [metadata] lock-version = "2.0" python-versions = "^3.12" -content-hash = "e108aa3806e59c2d057cedcce2ead4ac6aa3dd0654fa366cbc781fec439a384a" +content-hash = "fdf2ec53a4820aaf070a55cd5377d1307ced015136a5dfad3470ea63a1d98741" diff --git a/pyproject.toml b/pyproject.toml index 481e510..f77b309 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,4 +21,4 @@ mkdocs-include-dir-to-nav = "^1.2.0" [tool.poetry.group.test] [tool.poetry.group.test.dependencies] pytest = "^8.2.2" -pytest-shell = "^0.3.2" +pytest-shell-utilities = "^1.9.0" diff --git a/tests/test_toolbox.py b/tests/test_toolbox.py index 86c302f..f19e7dd 100644 --- a/tests/test_toolbox.py +++ b/tests/test_toolbox.py @@ -1,16 +1,16 @@ import inspect import os +import pytest +import unittest -current_dir: str = "./" -if os.getenv('ENV') == "docker": + +current_dir: str = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) +if os.environ['HOME'] == "/app": current_dir = "/app/tests" -else: - current_dir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) -script: str = os.path.abspath(f"{current_dir}/../toolbox.sh") +script: str = os.path.abspath(f"{current_dir}/../toolbox.sh") -def test_function_not_exist(bash): - with bash() as s: - s.auto_return_code_error = False - assert s.run_script(script, ['test_function']) == "Function with name test_function does not exist" - assert s.last_return_code == 1 +def test_function_not_exist(shell): + ret = shell.run(script, "test_function") + assert ret.returncode == 1 + assert "Function with name test_function does not exist" in ret.stderr diff --git a/toolbox.Dockerfile b/toolbox.Dockerfile index 14155c4..7553c65 100644 --- a/toolbox.Dockerfile +++ b/toolbox.Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.12-alpine3.20 as builder +FROM python:3.12-alpine3.20 AS builder ENV POETRY_NO_INTERACTION=1 \ POETRY_VIRTUALENVS_IN_PROJECT=1 \ @@ -9,15 +9,15 @@ ENV POETRY_NO_INTERACTION=1 \ PYTHONHASHSEED=random \ PIP_DISABLE_PIP_VERSION_CHECK=on \ PIP_DEFAULT_TIMEOUT=100 \ - POETRY_VERSION=1.7.1 + POETRY_VERSION=1.8.3 RUN pip install "poetry==$POETRY_VERSION" -RUN apk add --update --no-cache gcc libc-dev +RUN apk add --update --no-cache gcc libc-dev musl-dev linux-headers python3-dev WORKDIR /app COPY pyproject.toml poetry.lock ./ RUN --mount=type=cache,target=$POETRY_CACHE_DIR poetry install --no-root --no-ansi -FROM python:3.12-alpine3.20 as runtime +FROM python:3.12-alpine3.20 AS runtime ENV VIRTUAL_ENV=/app/.venv \ PATH="/app/.venv/bin:$PATH" @@ -32,7 +32,7 @@ RUN make install -C /tmp/shdoc # Create user RUN addgroup -g 1000 app \ - && adduser -G app -u 1000 app -D + && adduser --home /app -G app -u 1000 app -D USER app WORKDIR /app diff --git a/toolbox.sh b/toolbox.sh index 8897200..271ab72 100755 --- a/toolbox.sh +++ b/toolbox.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash # @name toolbox.sh -# @brief **toolbox.sh** is a utility script for installing the SonarQube dev environment. # @description # This toolbox enables you to install the SonarQube dev environment. @@ -32,7 +31,7 @@ function debug() { } function error() { - echo -e "${COLORS[RED]}$*${COLORS[NOCOLOR]}" + >&2 echo -e "${COLORS[RED]}$*${COLORS[NOCOLOR]}" return 0 } diff --git a/utils.sh b/utils.sh index de7861b..f48dafc 100755 --- a/utils.sh +++ b/utils.sh @@ -24,6 +24,8 @@ function docker_run() { -v "$(pwd)/toolbox.sh:/app/toolbox.sh" \ -v "$(pwd)/utils_bash.sh:/app/utils_bash.sh" \ -v "$(pwd)/.default.docker.env:/app/.default.docker.env" \ + -v "$(pwd)/pom.xml:/app/pom.xml" \ + -v "$(pwd)/pytest.ini:/app/pytest.ini" \ -v "$(pwd)/mkdocs.yml:/app/mkdocs.yml" \ -v "$(pwd)/docs:/app/docs" \ -v "$(pwd)/tests:/app/tests" \ diff --git a/utils_bash.sh b/utils_bash.sh index 474ddd0..c60c8e5 100755 --- a/utils_bash.sh +++ b/utils_bash.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash # @name utils_bash.sh -# @brief **utils_bash.sh** is a utility script for the toolbox.sh. # @description # This utility script enables you to perform the following actions: # @@ -37,7 +36,7 @@ function debug() { # Display an error message. function error() { - echo -e "${COLORS[RED]}$*${COLORS[NOCOLOR]}" + >&2 echo -e "${COLORS[RED]}$*${COLORS[NOCOLOR]}" return 0 } @@ -61,8 +60,7 @@ function lint() { # @exitcode 0 If successful. function generate_doc() { info "Generating the toolbox API documentation" - shdoc < "$CURRENT_PATH/toolbox.sh" > "$DOC_PATH/toolbox.md" - shdoc < "$CURRENT_PATH/utils_bash.sh" > "$DOC_PATH/utils_bash.md" + shdoc < "$CURRENT_PATH/toolbox.sh" > "$DOC_PATH/index.md" return 0 } From acc0891bfbba05f0b13875329dae8ae71c196ee6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20Lou=C3=ABt?= Date: Mon, 22 Jul 2024 18:38:48 +0200 Subject: [PATCH 08/15] =?UTF-8?q?=F0=9F=94=A8=20Merge=20of=20release=201.6?= =?UTF-8?q?.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .default.docker.env | 4 ++-- CHANGELOG.md | 17 ----------------- Dockerfile | 1 + docker-compose.yml | 11 +++++++++-- 4 files changed, 12 insertions(+), 21 deletions(-) diff --git a/.default.docker.env b/.default.docker.env index 8a64376..aed2dd9 100644 --- a/.default.docker.env +++ b/.default.docker.env @@ -1,5 +1,5 @@ -MAVEN_BUILDER_VERSION=3-openjdk-11-slim -SONARQUBE_VERSION=10.5.1-community +MAVEN_BUILDER_VERSION=3-openjdk-17-slim +SONARQUBE_VERSION=10.6.0-community POSTGRES_VERSION=12 DOCKER_BUILDKIT=1 COMPOSE_DOCKER_CLI_BUILD=1 diff --git a/CHANGELOG.md b/CHANGELOG.md index a9c792d..1ce62a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,23 +13,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Deleted -## [1.7.0] - 2024-07-13 - -### Added - -- Add **toolbox.sh** utility script for SonarQube development environment installation -- Add **utils.sh** Add utils.sh script to launch toolbox commands -- Addition of the pytest framework for unit testing bash scripts -- - -### Changed - -- Update of the "Getting Started" section in the README file - -### Deleted - -- Removal of utility scripts already present in the toolbox.sh script - ## [1.6.1] - 2024-05-15 ### Changed diff --git a/Dockerfile b/Dockerfile index 7d1b676..f907cf2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,3 +14,4 @@ RUN ${ECOCODE_SRC_PATH}/toolbox.sh build FROM sonarqube:${SONARQUBE_VERSION} COPY --from=builder ${ECOCODE_SRC_PATH}/target/ecocode-*.jar ${SONARQUBE_PLUGINS_PATH} +USER sonarqube diff --git a/docker-compose.yml b/docker-compose.yml index 03e29ab..ca32556 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,11 +10,12 @@ services: - SONARQUBE_VERSION=${SONARQUBE_VERSION} container_name: sonar_ecocode_java ports: - - "9000:9000" + - ":9000" networks: - sonarnet depends_on: - - db + db: + condition: service_healthy environment: SONAR_JDBC_USERNAME: sonar SONAR_JDBC_PASSWORD: sonar @@ -37,6 +38,12 @@ services: POSTGRES_PASSWORD: sonar POSTGRES_DB: sonarqube PGDATA: pg_data:/var/lib/postgresql/data/pgdata + healthcheck: + test: [ "CMD-SHELL", "pg_isready -U sonar -d sonarqube" ] + interval: 5s + timeout: 5s + retries: 5 + networks: sonarnet: From 96e76ae19c36da65fbbe101d4ce543933712c151 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20Lou=C3=ABt?= Date: Tue, 23 Jul 2024 10:37:02 +0200 Subject: [PATCH 09/15] =?UTF-8?q?=F0=9F=94=A8=20Updated=20utils.sh=20to=20?= =?UTF-8?q?start=20a=20container=20with=20docker=20and=20java=20environmen?= =?UTF-8?q?t.=20The=20toolbox.sh=20script=20can=20now=20be=20run=20correct?= =?UTF-8?q?ly=20from=20this=20container?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- toolbox.Dockerfile | 17 +++++++++++++++-- toolbox.sh | 4 ++-- utils.sh | 11 +++++++++-- 3 files changed, 26 insertions(+), 6 deletions(-) diff --git a/toolbox.Dockerfile b/toolbox.Dockerfile index 7553c65..ebc75a8 100644 --- a/toolbox.Dockerfile +++ b/toolbox.Dockerfile @@ -1,3 +1,5 @@ +FROM maven:3.9.6-eclipse-temurin-21-alpine AS maven + FROM python:3.12-alpine3.20 AS builder ENV POETRY_NO_INTERACTION=1 \ @@ -23,13 +25,24 @@ ENV VIRTUAL_ENV=/app/.venv \ PATH="/app/.venv/bin:$PATH" # Installing prerequisites -RUN apk add --update --no-cache bash curl shellcheck gawk git make \ - && rm -rf /var/cache/apk/* +RUN apk add --update --no-cache bash curl shellcheck gawk git make docker docker-cli-compose openrc \ + && rm -rf /var/cache/apk/* \ +RUN rc-update add docker boot # Install shdoc RUN git clone --recursive https://github.com/reconquest/shdoc /tmp/shdoc RUN make install -C /tmp/shdoc +# Install java and maven +COPY --from=maven /opt/java/openjdk /opt/java/openjdk +COPY --from=maven /usr/share/maven /usr/share/maven +RUN ln -s /usr/share/maven/bin/mvn /usr/bin/mvn + +COPY --from=maven /usr/bin/mvn /usr/bin/mvn +ENV PATH="/opt/java/openjdk/bin:$PATH" +ENV MAVEN_HOME="/usr/share/maven" +ENV JAVA_HOME="/opt/java/openjdk" + # Create user RUN addgroup -g 1000 app \ && adduser --home /app -G app -u 1000 app -D diff --git a/toolbox.sh b/toolbox.sh index 271ab72..2f6efff 100755 --- a/toolbox.sh +++ b/toolbox.sh @@ -135,8 +135,8 @@ function display_logs() { function build() { info "Building source code in the target folder" if ! [[ -f $ECOCODE_JAVA_PLUGIN_JAR ]] || [[ $FORCE -gt 0 ]]; then - debug "mvn clean package -DskipTests" - if ! mvn clean package -DskipTests; then + debug "mvn clean package -Dmaven.clean.failOnError=false -DskipTests" + if ! mvn clean package -Dmaven.clean.failOnError=false -DskipTests; then return 1 fi fi diff --git a/utils.sh b/utils.sh index f48dafc..bdd3c13 100755 --- a/utils.sh +++ b/utils.sh @@ -19,12 +19,19 @@ function docker_build() { function docker_run() { docker run --rm -it \ - -e ENV=docker \ - -p 8000:8000 \ + --name ecocode_java_utils \ + -u $(id -u):$(getent group docker | cut -d: -f3) \ + -p :8000 \ + -v "//var/run/docker.sock:/var/run/docker.sock" \ + -v "$HOME/.m2:/app/.m2" \ -v "$(pwd)/toolbox.sh:/app/toolbox.sh" \ -v "$(pwd)/utils_bash.sh:/app/utils_bash.sh" \ -v "$(pwd)/.default.docker.env:/app/.default.docker.env" \ + -v "$(pwd)/docker-compose.yml:/app/docker-compose.yml" \ + -v "$(pwd)/Dockerfile:/app/Dockerfile" \ -v "$(pwd)/pom.xml:/app/pom.xml" \ + -v "$(pwd)/src:/app/src" \ + -v "$(pwd)/target:/app/target:rw" \ -v "$(pwd)/pytest.ini:/app/pytest.ini" \ -v "$(pwd)/mkdocs.yml:/app/mkdocs.yml" \ -v "$(pwd)/docs:/app/docs" \ From 85ff7b3eb8c366da7bb7cf222d77fa14d035532d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20Lou=C3=ABt?= Date: Wed, 24 Jul 2024 09:47:07 +0200 Subject: [PATCH 10/15] =?UTF-8?q?=F0=9F=94=A8=20Added=20fixes=20to=20the?= =?UTF-8?q?=20toolbox.sh=20script=20and=20updated=20unit=20tests.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/index.md | 48 +-- mkdocs.yml | 20 -- poetry.lock | 726 +----------------------------------------- pyproject.toml | 3 - tests/test_toolbox.py | 205 +++++++++++- toolbox.sh | 220 +++++++------ utils_bash.sh | 18 +- 7 files changed, 358 insertions(+), 882 deletions(-) delete mode 100644 mkdocs.yml diff --git a/docs/index.md b/docs/index.md index 0ce65c0..974d065 100644 --- a/docs/index.md +++ b/docs/index.md @@ -6,6 +6,8 @@ This toolbox enables you to install the SonarQube dev environment. ## Index +* [build](#build) +* [compile](#compile) * [docker_env_source](#dockerenvsource) * [docker_build](#dockerbuild) * [init](#init) @@ -13,12 +15,29 @@ This toolbox enables you to install the SonarQube dev environment. * [stop](#stop) * [clean](#clean) * [display_logs](#displaylogs) -* [build](#build) -* [compile](#compile) * [release](#release) * [release_push](#releasepush) * [display_help](#displayhelp) +### build + +Compile and package source code with maven. + +#### Exit codes + +* **0**: If successful. +* **1**: If an error was encountered when building source code. +* **2**: If the ecoCode plugin in target directory cannot be found. + +### compile + +Compile source code with maven. + +#### Exit codes + +* **0**: If successful. +* **1**: If an error was encountered when compiling the source code. + ### docker_env_source Export environment variables from .default.docker.env file. @@ -56,8 +75,8 @@ Starting Docker containers. #### Exit codes * **0**: If successful. -* **1**: If the ecoCode plugin is not present in the target folder. -* **2**: If an error was encountered retrieving environment variables. +* **1**: If an error was encountered retrieving environment variables. +* **2**: If the ecoCode plugin is not present in the target folder. * **3**: If an error was encountered during container startup. ### stop @@ -89,25 +108,6 @@ Display Docker container logs. * **0**: If successful. * **1**: If an error was encountered retrieving environment variables. -### build - -Compile and package source code with maven. - -#### Exit codes - -* **0**: If successful. -* **1**: If an error was encountered when building source code. -* **2**: If the ecoCode plugin in target directory cannot be found. - -### compile - -Compile source code with maven. - -#### Exit codes - -* **0**: If successful. -* **1**: If an error was encountered when compiling the source code. - ### release Use maven plugin release to prepare locally next release and next SNAPSHOT. @@ -120,7 +120,7 @@ Use maven plugin release to prepare locally next release and next SNAPSHOT. ### release_push -Create a push and a new branch with commits previously prepared +Create a push and a new branch with commits previously prepared. #### Exit codes diff --git a/mkdocs.yml b/mkdocs.yml deleted file mode 100644 index a959630..0000000 --- a/mkdocs.yml +++ /dev/null @@ -1,20 +0,0 @@ -site_name: ecoCode-java -repo_url: https://github.com/green-code-initiative/ecoCode-java/ -site_description: Documentation based on ecoCode bash scripts -nav: - - index.md -theme: - name: material - palette: - scheme: slate - primary: purple - accent: cyan - features: - - navigation.tabs - - navigation.tabs.sticky - - navigation.sections -plugins: - - search - - include_dir_to_nav: - sort_file: true - sort_directory: true diff --git a/poetry.lock b/poetry.lock index aa11155..ce44941 100644 --- a/poetry.lock +++ b/poetry.lock @@ -19,144 +19,6 @@ tests = ["attrs[tests-no-zope]", "zope-interface"] tests-mypy = ["mypy (>=1.6)", "pytest-mypy-plugins"] tests-no-zope = ["attrs[tests-mypy]", "cloudpickle", "hypothesis", "pympler", "pytest (>=4.3.0)", "pytest-xdist[psutil]"] -[[package]] -name = "babel" -version = "2.15.0" -description = "Internationalization utilities" -optional = false -python-versions = ">=3.8" -files = [ - {file = "Babel-2.15.0-py3-none-any.whl", hash = "sha256:08706bdad8d0a3413266ab61bd6c34d0c28d6e1e7badf40a2cebe67644e2e1fb"}, - {file = "babel-2.15.0.tar.gz", hash = "sha256:8daf0e265d05768bc6c7a314cf1321e9a123afc328cc635c18622a2f30a04413"}, -] - -[package.extras] -dev = ["freezegun (>=1.0,<2.0)", "pytest (>=6.0)", "pytest-cov"] - -[[package]] -name = "certifi" -version = "2024.7.4" -description = "Python package for providing Mozilla's CA Bundle." -optional = false -python-versions = ">=3.6" -files = [ - {file = "certifi-2024.7.4-py3-none-any.whl", hash = "sha256:c198e21b1289c2ab85ee4e67bb4b4ef3ead0892059901a8d5b622f24a1101e90"}, - {file = "certifi-2024.7.4.tar.gz", hash = "sha256:5a1e7645bc0ec61a09e26c36f6106dd4cf40c6db3a1fb6352b0244e7fb057c7b"}, -] - -[[package]] -name = "charset-normalizer" -version = "3.3.2" -description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." -optional = false -python-versions = ">=3.7.0" -files = [ - {file = "charset-normalizer-3.3.2.tar.gz", hash = "sha256:f30c3cb33b24454a82faecaf01b19c18562b1e89558fb6c56de4d9118a032fd5"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:25baf083bf6f6b341f4121c2f3c548875ee6f5339300e08be3f2b2ba1721cdd3"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:06435b539f889b1f6f4ac1758871aae42dc3a8c0e24ac9e60c2384973ad73027"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9063e24fdb1e498ab71cb7419e24622516c4a04476b17a2dab57e8baa30d6e03"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6897af51655e3691ff853668779c7bad41579facacf5fd7253b0133308cf000d"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1d3193f4a680c64b4b6a9115943538edb896edc190f0b222e73761716519268e"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cd70574b12bb8a4d2aaa0094515df2463cb429d8536cfb6c7ce983246983e5a6"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8465322196c8b4d7ab6d1e049e4c5cb460d0394da4a27d23cc242fbf0034b6b5"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a9a8e9031d613fd2009c182b69c7b2c1ef8239a0efb1df3f7c8da66d5dd3d537"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:beb58fe5cdb101e3a055192ac291b7a21e3b7ef4f67fa1d74e331a7f2124341c"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:e06ed3eb3218bc64786f7db41917d4e686cc4856944f53d5bdf83a6884432e12"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:2e81c7b9c8979ce92ed306c249d46894776a909505d8f5a4ba55b14206e3222f"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:572c3763a264ba47b3cf708a44ce965d98555f618ca42c926a9c1616d8f34269"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:fd1abc0d89e30cc4e02e4064dc67fcc51bd941eb395c502aac3ec19fab46b519"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-win32.whl", hash = "sha256:3d47fa203a7bd9c5b6cee4736ee84ca03b8ef23193c0d1ca99b5089f72645c73"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-win_amd64.whl", hash = "sha256:10955842570876604d404661fbccbc9c7e684caf432c09c715ec38fbae45ae09"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:802fe99cca7457642125a8a88a084cef28ff0cf9407060f7b93dca5aa25480db"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:573f6eac48f4769d667c4442081b1794f52919e7edada77495aaed9236d13a96"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:549a3a73da901d5bc3ce8d24e0600d1fa85524c10287f6004fbab87672bf3e1e"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f27273b60488abe721a075bcca6d7f3964f9f6f067c8c4c605743023d7d3944f"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1ceae2f17a9c33cb48e3263960dc5fc8005351ee19db217e9b1bb15d28c02574"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:65f6f63034100ead094b8744b3b97965785388f308a64cf8d7c34f2f2e5be0c4"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:753f10e867343b4511128c6ed8c82f7bec3bd026875576dfd88483c5c73b2fd8"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4a78b2b446bd7c934f5dcedc588903fb2f5eec172f3d29e52a9096a43722adfc"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e537484df0d8f426ce2afb2d0f8e1c3d0b114b83f8850e5f2fbea0e797bd82ae"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:eb6904c354526e758fda7167b33005998fb68c46fbc10e013ca97f21ca5c8887"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:deb6be0ac38ece9ba87dea880e438f25ca3eddfac8b002a2ec3d9183a454e8ae"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:4ab2fe47fae9e0f9dee8c04187ce5d09f48eabe611be8259444906793ab7cbce"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:80402cd6ee291dcb72644d6eac93785fe2c8b9cb30893c1af5b8fdd753b9d40f"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-win32.whl", hash = "sha256:7cd13a2e3ddeed6913a65e66e94b51d80a041145a026c27e6bb76c31a853c6ab"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-win_amd64.whl", hash = "sha256:663946639d296df6a2bb2aa51b60a2454ca1cb29835324c640dafb5ff2131a77"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:0b2b64d2bb6d3fb9112bafa732def486049e63de9618b5843bcdd081d8144cd8"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:ddbb2551d7e0102e7252db79ba445cdab71b26640817ab1e3e3648dad515003b"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:55086ee1064215781fff39a1af09518bc9255b50d6333f2e4c74ca09fac6a8f6"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8f4a014bc36d3c57402e2977dada34f9c12300af536839dc38c0beab8878f38a"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a10af20b82360ab00827f916a6058451b723b4e65030c5a18577c8b2de5b3389"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8d756e44e94489e49571086ef83b2bb8ce311e730092d2c34ca8f7d925cb20aa"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:90d558489962fd4918143277a773316e56c72da56ec7aa3dc3dbbe20fdfed15b"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6ac7ffc7ad6d040517be39eb591cac5ff87416c2537df6ba3cba3bae290c0fed"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:7ed9e526742851e8d5cc9e6cf41427dfc6068d4f5a3bb03659444b4cabf6bc26"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:8bdb58ff7ba23002a4c5808d608e4e6c687175724f54a5dade5fa8c67b604e4d"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:6b3251890fff30ee142c44144871185dbe13b11bab478a88887a639655be1068"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:b4a23f61ce87adf89be746c8a8974fe1c823c891d8f86eb218bb957c924bb143"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:efcb3f6676480691518c177e3b465bcddf57cea040302f9f4e6e191af91174d4"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-win32.whl", hash = "sha256:d965bba47ddeec8cd560687584e88cf699fd28f192ceb452d1d7ee807c5597b7"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-win_amd64.whl", hash = "sha256:96b02a3dc4381e5494fad39be677abcb5e6634bf7b4fa83a6dd3112607547001"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:95f2a5796329323b8f0512e09dbb7a1860c46a39da62ecb2324f116fa8fdc85c"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c002b4ffc0be611f0d9da932eb0f704fe2602a9a949d1f738e4c34c75b0863d5"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a981a536974bbc7a512cf44ed14938cf01030a99e9b3a06dd59578882f06f985"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3287761bc4ee9e33561a7e058c72ac0938c4f57fe49a09eae428fd88aafe7bb6"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:42cb296636fcc8b0644486d15c12376cb9fa75443e00fb25de0b8602e64c1714"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0a55554a2fa0d408816b3b5cedf0045f4b8e1a6065aec45849de2d6f3f8e9786"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:c083af607d2515612056a31f0a8d9e0fcb5876b7bfc0abad3ecd275bc4ebc2d5"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:87d1351268731db79e0f8e745d92493ee2841c974128ef629dc518b937d9194c"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:bd8f7df7d12c2db9fab40bdd87a7c09b1530128315d047a086fa3ae3435cb3a8"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:c180f51afb394e165eafe4ac2936a14bee3eb10debc9d9e4db8958fe36afe711"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:8c622a5fe39a48f78944a87d4fb8a53ee07344641b0562c540d840748571b811"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-win32.whl", hash = "sha256:db364eca23f876da6f9e16c9da0df51aa4f104a972735574842618b8c6d999d4"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-win_amd64.whl", hash = "sha256:86216b5cee4b06df986d214f664305142d9c76df9b6512be2738aa72a2048f99"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:6463effa3186ea09411d50efc7d85360b38d5f09b870c48e4600f63af490e56a"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6c4caeef8fa63d06bd437cd4bdcf3ffefe6738fb1b25951440d80dc7df8c03ac"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:37e55c8e51c236f95b033f6fb391d7d7970ba5fe7ff453dad675e88cf303377a"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fb69256e180cb6c8a894fee62b3afebae785babc1ee98b81cdf68bbca1987f33"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ae5f4161f18c61806f411a13b0310bea87f987c7d2ecdbdaad0e94eb2e404238"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b2b0a0c0517616b6869869f8c581d4eb2dd83a4d79e0ebcb7d373ef9956aeb0a"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:45485e01ff4d3630ec0d9617310448a8702f70e9c01906b0d0118bdf9d124cf2"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eb00ed941194665c332bf8e078baf037d6c35d7c4f3102ea2d4f16ca94a26dc8"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:2127566c664442652f024c837091890cb1942c30937add288223dc895793f898"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:a50aebfa173e157099939b17f18600f72f84eed3049e743b68ad15bd69b6bf99"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:4d0d1650369165a14e14e1e47b372cfcb31d6ab44e6e33cb2d4e57265290044d"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:923c0c831b7cfcb071580d3f46c4baf50f174be571576556269530f4bbd79d04"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:06a81e93cd441c56a9b65d8e1d043daeb97a3d0856d177d5c90ba85acb3db087"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-win32.whl", hash = "sha256:6ef1d82a3af9d3eecdba2321dc1b3c238245d890843e040e41e470ffa64c3e25"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-win_amd64.whl", hash = "sha256:eb8821e09e916165e160797a6c17edda0679379a4be5c716c260e836e122f54b"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:c235ebd9baae02f1b77bcea61bce332cb4331dc3617d254df3323aa01ab47bd4"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:5b4c145409bef602a690e7cfad0a15a55c13320ff7a3ad7ca59c13bb8ba4d45d"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:68d1f8a9e9e37c1223b656399be5d6b448dea850bed7d0f87a8311f1ff3dabb0"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:22afcb9f253dac0696b5a4be4a1c0f8762f8239e21b99680099abd9b2b1b2269"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e27ad930a842b4c5eb8ac0016b0a54f5aebbe679340c26101df33424142c143c"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1f79682fbe303db92bc2b1136016a38a42e835d932bab5b3b1bfcfbf0640e519"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b261ccdec7821281dade748d088bb6e9b69e6d15b30652b74cbbac25e280b796"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:122c7fa62b130ed55f8f285bfd56d5f4b4a5b503609d181f9ad85e55c89f4185"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:d0eccceffcb53201b5bfebb52600a5fb483a20b61da9dbc885f8b103cbe7598c"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:9f96df6923e21816da7e0ad3fd47dd8f94b2a5ce594e00677c0013018b813458"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:7f04c839ed0b6b98b1a7501a002144b76c18fb1c1850c8b98d458ac269e26ed2"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:34d1c8da1e78d2e001f363791c98a272bb734000fcef47a491c1e3b0505657a8"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:ff8fa367d09b717b2a17a052544193ad76cd49979c805768879cb63d9ca50561"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-win32.whl", hash = "sha256:aed38f6e4fb3f5d6bf81bfa990a07806be9d83cf7bacef998ab1a9bd660a581f"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-win_amd64.whl", hash = "sha256:b01b88d45a6fcb69667cd6d2f7a9aeb4bf53760d7fc536bf679ec94fe9f3ff3d"}, - {file = "charset_normalizer-3.3.2-py3-none-any.whl", hash = "sha256:3e4d1f6587322d2788836a99c69062fbb091331ec940e02d12d179c1d53e25fc"}, -] - -[[package]] -name = "click" -version = "8.1.7" -description = "Composable command line interface toolkit" -optional = false -python-versions = ">=3.7" -files = [ - {file = "click-8.1.7-py3-none-any.whl", hash = "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28"}, - {file = "click-8.1.7.tar.gz", hash = "sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de"}, -] - -[package.dependencies] -colorama = {version = "*", markers = "platform_system == \"Windows\""} - [[package]] name = "colorama" version = "0.4.6" @@ -179,34 +41,6 @@ files = [ {file = "distro-1.9.0.tar.gz", hash = "sha256:2fa77c6fd8940f116ee1d6b94a2f90b13b5ea8d019b98bc8bafdcabcdd9bdbed"}, ] -[[package]] -name = "ghp-import" -version = "2.1.0" -description = "Copy your docs directly to the gh-pages branch." -optional = false -python-versions = "*" -files = [ - {file = "ghp-import-2.1.0.tar.gz", hash = "sha256:9c535c4c61193c2df8871222567d7fd7e5014d835f97dc7b7439069e2413d343"}, - {file = "ghp_import-2.1.0-py3-none-any.whl", hash = "sha256:8337dd7b50877f163d4c0289bc1f1c7f127550241988d568c1db512c4324a619"}, -] - -[package.dependencies] -python-dateutil = ">=2.8.1" - -[package.extras] -dev = ["flake8", "markdown", "twine", "wheel"] - -[[package]] -name = "idna" -version = "3.7" -description = "Internationalized Domain Names in Applications (IDNA)" -optional = false -python-versions = ">=3.5" -files = [ - {file = "idna-3.7-py3-none-any.whl", hash = "sha256:82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0"}, - {file = "idna-3.7.tar.gz", hash = "sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc"}, -] - [[package]] name = "iniconfig" version = "2.0.0" @@ -218,218 +52,6 @@ files = [ {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, ] -[[package]] -name = "jinja2" -version = "3.1.4" -description = "A very fast and expressive template engine." -optional = false -python-versions = ">=3.7" -files = [ - {file = "jinja2-3.1.4-py3-none-any.whl", hash = "sha256:bc5dd2abb727a5319567b7a813e6a2e7318c39f4f487cfe6c89c6f9c7d25197d"}, - {file = "jinja2-3.1.4.tar.gz", hash = "sha256:4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369"}, -] - -[package.dependencies] -MarkupSafe = ">=2.0" - -[package.extras] -i18n = ["Babel (>=2.7)"] - -[[package]] -name = "markdown" -version = "3.6" -description = "Python implementation of John Gruber's Markdown." -optional = false -python-versions = ">=3.8" -files = [ - {file = "Markdown-3.6-py3-none-any.whl", hash = "sha256:48f276f4d8cfb8ce6527c8f79e2ee29708508bf4d40aa410fbc3b4ee832c850f"}, - {file = "Markdown-3.6.tar.gz", hash = "sha256:ed4f41f6daecbeeb96e576ce414c41d2d876daa9a16cb35fa8ed8c2ddfad0224"}, -] - -[package.extras] -docs = ["mdx-gh-links (>=0.2)", "mkdocs (>=1.5)", "mkdocs-gen-files", "mkdocs-literate-nav", "mkdocs-nature (>=0.6)", "mkdocs-section-index", "mkdocstrings[python]"] -testing = ["coverage", "pyyaml"] - -[[package]] -name = "markupsafe" -version = "2.1.5" -description = "Safely add untrusted strings to HTML/XML markup." -optional = false -python-versions = ">=3.7" -files = [ - {file = "MarkupSafe-2.1.5-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a17a92de5231666cfbe003f0e4b9b3a7ae3afb1ec2845aadc2bacc93ff85febc"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:72b6be590cc35924b02c78ef34b467da4ba07e4e0f0454a2c5907f473fc50ce5"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e61659ba32cf2cf1481e575d0462554625196a1f2fc06a1c777d3f48e8865d46"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2174c595a0d73a3080ca3257b40096db99799265e1c27cc5a610743acd86d62f"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ae2ad8ae6ebee9d2d94b17fb62763125f3f374c25618198f40cbb8b525411900"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:075202fa5b72c86ad32dc7d0b56024ebdbcf2048c0ba09f1cde31bfdd57bcfff"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:598e3276b64aff0e7b3451b72e94fa3c238d452e7ddcd893c3ab324717456bad"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:fce659a462a1be54d2ffcacea5e3ba2d74daa74f30f5f143fe0c58636e355fdd"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-win32.whl", hash = "sha256:d9fad5155d72433c921b782e58892377c44bd6252b5af2f67f16b194987338a4"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-win_amd64.whl", hash = "sha256:bf50cd79a75d181c9181df03572cdce0fbb75cc353bc350712073108cba98de5"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:629ddd2ca402ae6dbedfceeba9c46d5f7b2a61d9749597d4307f943ef198fc1f"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:5b7b716f97b52c5a14bffdf688f971b2d5ef4029127f1ad7a513973cfd818df2"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6ec585f69cec0aa07d945b20805be741395e28ac1627333b1c5b0105962ffced"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b91c037585eba9095565a3556f611e3cbfaa42ca1e865f7b8015fe5c7336d5a5"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7502934a33b54030eaf1194c21c692a534196063db72176b0c4028e140f8f32c"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:0e397ac966fdf721b2c528cf028494e86172b4feba51d65f81ffd65c63798f3f"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:c061bb86a71b42465156a3ee7bd58c8c2ceacdbeb95d05a99893e08b8467359a"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:3a57fdd7ce31c7ff06cdfbf31dafa96cc533c21e443d57f5b1ecc6cdc668ec7f"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-win32.whl", hash = "sha256:397081c1a0bfb5124355710fe79478cdbeb39626492b15d399526ae53422b906"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-win_amd64.whl", hash = "sha256:2b7c57a4dfc4f16f7142221afe5ba4e093e09e728ca65c51f5620c9aaeb9a617"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:8dec4936e9c3100156f8a2dc89c4b88d5c435175ff03413b443469c7c8c5f4d1"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:3c6b973f22eb18a789b1460b4b91bf04ae3f0c4234a0a6aa6b0a92f6f7b951d4"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ac07bad82163452a6884fe8fa0963fb98c2346ba78d779ec06bd7a6262132aee"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f5dfb42c4604dddc8e4305050aa6deb084540643ed5804d7455b5df8fe16f5e5"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ea3d8a3d18833cf4304cd2fc9cbb1efe188ca9b5efef2bdac7adc20594a0e46b"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:d050b3361367a06d752db6ead6e7edeb0009be66bc3bae0ee9d97fb326badc2a"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:bec0a414d016ac1a18862a519e54b2fd0fc8bbfd6890376898a6c0891dd82e9f"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:58c98fee265677f63a4385256a6d7683ab1832f3ddd1e66fe948d5880c21a169"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-win32.whl", hash = "sha256:8590b4ae07a35970728874632fed7bd57b26b0102df2d2b233b6d9d82f6c62ad"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-win_amd64.whl", hash = "sha256:823b65d8706e32ad2df51ed89496147a42a2a6e01c13cfb6ffb8b1e92bc910bb"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:c8b29db45f8fe46ad280a7294f5c3ec36dbac9491f2d1c17345be8e69cc5928f"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ec6a563cff360b50eed26f13adc43e61bc0c04d94b8be985e6fb24b81f6dcfdf"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a549b9c31bec33820e885335b451286e2969a2d9e24879f83fe904a5ce59d70a"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4f11aa001c540f62c6166c7726f71f7573b52c68c31f014c25cc7901deea0b52"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:7b2e5a267c855eea6b4283940daa6e88a285f5f2a67f2220203786dfa59b37e9"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:2d2d793e36e230fd32babe143b04cec8a8b3eb8a3122d2aceb4a371e6b09b8df"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:ce409136744f6521e39fd8e2a24c53fa18ad67aa5bc7c2cf83645cce5b5c4e50"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-win32.whl", hash = "sha256:4096e9de5c6fdf43fb4f04c26fb114f61ef0bf2e5604b6ee3019d51b69e8c371"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-win_amd64.whl", hash = "sha256:4275d846e41ecefa46e2015117a9f491e57a71ddd59bbead77e904dc02b1bed2"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:656f7526c69fac7f600bd1f400991cc282b417d17539a1b228617081106feb4a"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:97cafb1f3cbcd3fd2b6fbfb99ae11cdb14deea0736fc2b0952ee177f2b813a46"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1f3fbcb7ef1f16e48246f704ab79d79da8a46891e2da03f8783a5b6fa41a9532"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fa9db3f79de01457b03d4f01b34cf91bc0048eb2c3846ff26f66687c2f6d16ab"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ffee1f21e5ef0d712f9033568f8344d5da8cc2869dbd08d87c84656e6a2d2f68"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:5dedb4db619ba5a2787a94d877bc8ffc0566f92a01c0ef214865e54ecc9ee5e0"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:30b600cf0a7ac9234b2638fbc0fb6158ba5bdcdf46aeb631ead21248b9affbc4"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:8dd717634f5a044f860435c1d8c16a270ddf0ef8588d4887037c5028b859b0c3"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-win32.whl", hash = "sha256:daa4ee5a243f0f20d528d939d06670a298dd39b1ad5f8a72a4275124a7819eff"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-win_amd64.whl", hash = "sha256:619bc166c4f2de5caa5a633b8b7326fbe98e0ccbfacabd87268a2b15ff73a029"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:7a68b554d356a91cce1236aa7682dc01df0edba8d043fd1ce607c49dd3c1edcf"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:db0b55e0f3cc0be60c1f19efdde9a637c32740486004f20d1cff53c3c0ece4d2"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3e53af139f8579a6d5f7b76549125f0d94d7e630761a2111bc431fd820e163b8"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:17b950fccb810b3293638215058e432159d2b71005c74371d784862b7e4683f3"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4c31f53cdae6ecfa91a77820e8b151dba54ab528ba65dfd235c80b086d68a465"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:bff1b4290a66b490a2f4719358c0cdcd9bafb6b8f061e45c7a2460866bf50c2e"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:bc1667f8b83f48511b94671e0e441401371dfd0f0a795c7daa4a3cd1dde55bea"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5049256f536511ee3f7e1b3f87d1d1209d327e818e6ae1365e8653d7e3abb6a6"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-win32.whl", hash = "sha256:00e046b6dd71aa03a41079792f8473dc494d564611a8f89bbbd7cb93295ebdcf"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-win_amd64.whl", hash = "sha256:fa173ec60341d6bb97a89f5ea19c85c5643c1e7dedebc22f5181eb73573142c5"}, - {file = "MarkupSafe-2.1.5.tar.gz", hash = "sha256:d283d37a890ba4c1ae73ffadf8046435c76e7bc2247bbb63c00bd1a709c6544b"}, -] - -[[package]] -name = "mergedeep" -version = "1.3.4" -description = "A deep merge function for 🐍." -optional = false -python-versions = ">=3.6" -files = [ - {file = "mergedeep-1.3.4-py3-none-any.whl", hash = "sha256:70775750742b25c0d8f36c55aed03d24c3384d17c951b3175d898bd778ef0307"}, - {file = "mergedeep-1.3.4.tar.gz", hash = "sha256:0096d52e9dad9939c3d975a774666af186eda617e6ca84df4c94dec30004f2a8"}, -] - -[[package]] -name = "mkdocs" -version = "1.6.0" -description = "Project documentation with Markdown." -optional = false -python-versions = ">=3.8" -files = [ - {file = "mkdocs-1.6.0-py3-none-any.whl", hash = "sha256:1eb5cb7676b7d89323e62b56235010216319217d4af5ddc543a91beb8d125ea7"}, - {file = "mkdocs-1.6.0.tar.gz", hash = "sha256:a73f735824ef83a4f3bcb7a231dcab23f5a838f88b7efc54a0eef5fbdbc3c512"}, -] - -[package.dependencies] -click = ">=7.0" -colorama = {version = ">=0.4", markers = "platform_system == \"Windows\""} -ghp-import = ">=1.0" -jinja2 = ">=2.11.1" -markdown = ">=3.3.6" -markupsafe = ">=2.0.1" -mergedeep = ">=1.3.4" -mkdocs-get-deps = ">=0.2.0" -packaging = ">=20.5" -pathspec = ">=0.11.1" -pyyaml = ">=5.1" -pyyaml-env-tag = ">=0.1" -watchdog = ">=2.0" - -[package.extras] -i18n = ["babel (>=2.9.0)"] -min-versions = ["babel (==2.9.0)", "click (==7.0)", "colorama (==0.4)", "ghp-import (==1.0)", "importlib-metadata (==4.4)", "jinja2 (==2.11.1)", "markdown (==3.3.6)", "markupsafe (==2.0.1)", "mergedeep (==1.3.4)", "mkdocs-get-deps (==0.2.0)", "packaging (==20.5)", "pathspec (==0.11.1)", "pyyaml (==5.1)", "pyyaml-env-tag (==0.1)", "watchdog (==2.0)"] - -[[package]] -name = "mkdocs-get-deps" -version = "0.2.0" -description = "MkDocs extension that lists all dependencies according to a mkdocs.yml file" -optional = false -python-versions = ">=3.8" -files = [ - {file = "mkdocs_get_deps-0.2.0-py3-none-any.whl", hash = "sha256:2bf11d0b133e77a0dd036abeeb06dec8775e46efa526dc70667d8863eefc6134"}, - {file = "mkdocs_get_deps-0.2.0.tar.gz", hash = "sha256:162b3d129c7fad9b19abfdcb9c1458a651628e4b1dea628ac68790fb3061c60c"}, -] - -[package.dependencies] -mergedeep = ">=1.3.4" -platformdirs = ">=2.2.0" -pyyaml = ">=5.1" - -[[package]] -name = "mkdocs-include-dir-to-nav" -version = "1.2.0" -description = "A MkDocs plugin include all file in dir to navigation" -optional = false -python-versions = ">=3.6" -files = [ - {file = "mkdocs_include_dir_to_nav-1.2.0-py3-none-any.whl", hash = "sha256:b09de17ad754aa93aec7ba64acf8fdd53f7a2ceb92e8cffe21646b0e97f4ddf0"}, - {file = "mkdocs_include_dir_to_nav-1.2.0.tar.gz", hash = "sha256:2d7b0bb581471fce6f215b6381f1f4d90a3a069829281b7f5d01a5b7abee15d0"}, -] - -[package.dependencies] -mkdocs = ">=1.0.4" - -[[package]] -name = "mkdocs-material" -version = "9.5.29" -description = "Documentation that simply works" -optional = false -python-versions = ">=3.8" -files = [ - {file = "mkdocs_material-9.5.29-py3-none-any.whl", hash = "sha256:afc1f508e2662ded95f0a35a329e8a5acd73ee88ca07ba73836eb6fcdae5d8b4"}, - {file = "mkdocs_material-9.5.29.tar.gz", hash = "sha256:3e977598ec15a4ddad5c4dfc9e08edab6023edb51e88f0729bd27be77e3d322a"}, -] - -[package.dependencies] -babel = ">=2.10,<3.0" -colorama = ">=0.4,<1.0" -jinja2 = ">=3.0,<4.0" -markdown = ">=3.2,<4.0" -mkdocs = ">=1.6,<2.0" -mkdocs-material-extensions = ">=1.3,<2.0" -paginate = ">=0.5,<1.0" -pygments = ">=2.16,<3.0" -pymdown-extensions = ">=10.2,<11.0" -regex = ">=2022.4" -requests = ">=2.26,<3.0" - -[package.extras] -git = ["mkdocs-git-committers-plugin-2 (>=1.1,<2.0)", "mkdocs-git-revision-date-localized-plugin (>=1.2.4,<2.0)"] -imaging = ["cairosvg (>=2.6,<3.0)", "pillow (>=10.2,<11.0)"] -recommended = ["mkdocs-minify-plugin (>=0.7,<1.0)", "mkdocs-redirects (>=1.2,<2.0)", "mkdocs-rss-plugin (>=1.6,<2.0)"] - -[[package]] -name = "mkdocs-material-extensions" -version = "1.3.1" -description = "Extension pack for Python Markdown and MkDocs Material." -optional = false -python-versions = ">=3.8" -files = [ - {file = "mkdocs_material_extensions-1.3.1-py3-none-any.whl", hash = "sha256:adff8b62700b25cb77b53358dad940f3ef973dd6db797907c49e3c2ef3ab4e31"}, - {file = "mkdocs_material_extensions-1.3.1.tar.gz", hash = "sha256:10c9511cea88f568257f960358a467d12b970e1f7b2c0e5fb2bb48cab1928443"}, -] - [[package]] name = "packaging" version = "24.1" @@ -441,43 +63,6 @@ files = [ {file = "packaging-24.1.tar.gz", hash = "sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002"}, ] -[[package]] -name = "paginate" -version = "0.5.6" -description = "Divides large result sets into pages for easier browsing" -optional = false -python-versions = "*" -files = [ - {file = "paginate-0.5.6.tar.gz", hash = "sha256:5e6007b6a9398177a7e1648d04fdd9f8c9766a1a945bceac82f1929e8c78af2d"}, -] - -[[package]] -name = "pathspec" -version = "0.12.1" -description = "Utility library for gitignore style pattern matching of file paths." -optional = false -python-versions = ">=3.8" -files = [ - {file = "pathspec-0.12.1-py3-none-any.whl", hash = "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08"}, - {file = "pathspec-0.12.1.tar.gz", hash = "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712"}, -] - -[[package]] -name = "platformdirs" -version = "4.2.2" -description = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`." -optional = false -python-versions = ">=3.8" -files = [ - {file = "platformdirs-4.2.2-py3-none-any.whl", hash = "sha256:2d7a1657e36a80ea911db832a8a6ece5ee53d8de21edd5cc5879af6530b1bfee"}, - {file = "platformdirs-4.2.2.tar.gz", hash = "sha256:38b7b51f512eed9e84a22788b4bce1de17c0adb134d6becb09836e37d8654cd3"}, -] - -[package.extras] -docs = ["furo (>=2023.9.10)", "proselint (>=0.13)", "sphinx (>=7.2.6)", "sphinx-autodoc-typehints (>=1.25.2)"] -test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4.3)", "pytest-cov (>=4.1)", "pytest-mock (>=3.12)"] -type = ["mypy (>=1.8)"] - [[package]] name = "pluggy" version = "1.5.0" @@ -522,54 +107,22 @@ files = [ [package.extras] test = ["enum34", "ipaddress", "mock", "pywin32", "wmi"] -[[package]] -name = "pygments" -version = "2.18.0" -description = "Pygments is a syntax highlighting package written in Python." -optional = false -python-versions = ">=3.8" -files = [ - {file = "pygments-2.18.0-py3-none-any.whl", hash = "sha256:b8e6aca0523f3ab76fee51799c488e38782ac06eafcf95e7ba832985c8e7b13a"}, - {file = "pygments-2.18.0.tar.gz", hash = "sha256:786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199"}, -] - -[package.extras] -windows-terminal = ["colorama (>=0.4.6)"] - -[[package]] -name = "pymdown-extensions" -version = "10.8.1" -description = "Extension pack for Python Markdown." -optional = false -python-versions = ">=3.8" -files = [ - {file = "pymdown_extensions-10.8.1-py3-none-any.whl", hash = "sha256:f938326115884f48c6059c67377c46cf631c733ef3629b6eed1349989d1b30cb"}, - {file = "pymdown_extensions-10.8.1.tar.gz", hash = "sha256:3ab1db5c9e21728dabf75192d71471f8e50f216627e9a1fa9535ecb0231b9940"}, -] - -[package.dependencies] -markdown = ">=3.6" -pyyaml = "*" - -[package.extras] -extra = ["pygments (>=2.12)"] - [[package]] name = "pytest" -version = "8.2.2" +version = "8.3.1" description = "pytest: simple powerful testing with Python" optional = false python-versions = ">=3.8" files = [ - {file = "pytest-8.2.2-py3-none-any.whl", hash = "sha256:c434598117762e2bd304e526244f67bf66bbd7b5d6cf22138be51ff661980343"}, - {file = "pytest-8.2.2.tar.gz", hash = "sha256:de4bb8104e201939ccdc688b27a89a7be2079b22e2bd2b07f806b6ba71117977"}, + {file = "pytest-8.3.1-py3-none-any.whl", hash = "sha256:e9600ccf4f563976e2c99fa02c7624ab938296551f280835ee6516df8bc4ae8c"}, + {file = "pytest-8.3.1.tar.gz", hash = "sha256:7e8e5c5abd6e93cb1cc151f23e57adc31fcf8cfd2a3ff2da63e23f732de35db6"}, ] [package.dependencies] colorama = {version = "*", markers = "sys_platform == \"win32\""} iniconfig = "*" packaging = "*" -pluggy = ">=1.5,<2.0" +pluggy = ">=1.5,<2" [package.extras] dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] @@ -642,20 +195,6 @@ lint = ["black", "flake8 (>=4.0.1)", "flake8-docstrings", "flake8-mypy-fork", "f salt = ["salt (>=3001)"] tests = ["cryptography", "docker", "pyfakefs", "pyfakefs (==4.4.0)", "pytest-subtests"] -[[package]] -name = "python-dateutil" -version = "2.9.0.post0" -description = "Extensions to the standard Python datetime module" -optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" -files = [ - {file = "python-dateutil-2.9.0.post0.tar.gz", hash = "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3"}, - {file = "python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427"}, -] - -[package.dependencies] -six = ">=1.5" - [[package]] name = "pywin32" version = "306" @@ -679,262 +218,7 @@ files = [ {file = "pywin32-306-cp39-cp39-win_amd64.whl", hash = "sha256:39b61c15272833b5c329a2989999dcae836b1eed650252ab1b7bfbe1d59f30f4"}, ] -[[package]] -name = "pyyaml" -version = "6.0.1" -description = "YAML parser and emitter for Python" -optional = false -python-versions = ">=3.6" -files = [ - {file = "PyYAML-6.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d858aa552c999bc8a8d57426ed01e40bef403cd8ccdd0fc5f6f04a00414cac2a"}, - {file = "PyYAML-6.0.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:fd66fc5d0da6d9815ba2cebeb4205f95818ff4b79c3ebe268e75d961704af52f"}, - {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:69b023b2b4daa7548bcfbd4aa3da05b3a74b772db9e23b982788168117739938"}, - {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:81e0b275a9ecc9c0c0c07b4b90ba548307583c125f54d5b6946cfee6360c733d"}, - {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ba336e390cd8e4d1739f42dfe9bb83a3cc2e80f567d8805e11b46f4a943f5515"}, - {file = "PyYAML-6.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:326c013efe8048858a6d312ddd31d56e468118ad4cdeda36c719bf5bb6192290"}, - {file = "PyYAML-6.0.1-cp310-cp310-win32.whl", hash = "sha256:bd4af7373a854424dabd882decdc5579653d7868b8fb26dc7d0e99f823aa5924"}, - {file = "PyYAML-6.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:fd1592b3fdf65fff2ad0004b5e363300ef59ced41c2e6b3a99d4089fa8c5435d"}, - {file = "PyYAML-6.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6965a7bc3cf88e5a1c3bd2e0b5c22f8d677dc88a455344035f03399034eb3007"}, - {file = "PyYAML-6.0.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f003ed9ad21d6a4713f0a9b5a7a0a79e08dd0f221aff4525a2be4c346ee60aab"}, - {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42f8152b8dbc4fe7d96729ec2b99c7097d656dc1213a3229ca5383f973a5ed6d"}, - {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:062582fca9fabdd2c8b54a3ef1c978d786e0f6b3a1510e0ac93ef59e0ddae2bc"}, - {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d2b04aac4d386b172d5b9692e2d2da8de7bfb6c387fa4f801fbf6fb2e6ba4673"}, - {file = "PyYAML-6.0.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e7d73685e87afe9f3b36c799222440d6cf362062f78be1013661b00c5c6f678b"}, - {file = "PyYAML-6.0.1-cp311-cp311-win32.whl", hash = "sha256:1635fd110e8d85d55237ab316b5b011de701ea0f29d07611174a1b42f1444741"}, - {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, - {file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"}, - {file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"}, - {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a08c6f0fe150303c1c6b71ebcd7213c2858041a7e01975da3a99aed1e7a378ef"}, - {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"}, - {file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"}, - {file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"}, - {file = "PyYAML-6.0.1-cp312-cp312-win_amd64.whl", hash = "sha256:0d3304d8c0adc42be59c5f8a4d9e3d7379e6955ad754aa9d6ab7a398b59dd1df"}, - {file = "PyYAML-6.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50550eb667afee136e9a77d6dc71ae76a44df8b3e51e41b77f6de2932bfe0f47"}, - {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1fe35611261b29bd1de0070f0b2f47cb6ff71fa6595c077e42bd0c419fa27b98"}, - {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:704219a11b772aea0d8ecd7058d0082713c3562b4e271b849ad7dc4a5c90c13c"}, - {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:afd7e57eddb1a54f0f1a974bc4391af8bcce0b444685d936840f125cf046d5bd"}, - {file = "PyYAML-6.0.1-cp36-cp36m-win32.whl", hash = "sha256:fca0e3a251908a499833aa292323f32437106001d436eca0e6e7833256674585"}, - {file = "PyYAML-6.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:f22ac1c3cac4dbc50079e965eba2c1058622631e526bd9afd45fedd49ba781fa"}, - {file = "PyYAML-6.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:b1275ad35a5d18c62a7220633c913e1b42d44b46ee12554e5fd39c70a243d6a3"}, - {file = "PyYAML-6.0.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:18aeb1bf9a78867dc38b259769503436b7c72f7a1f1f4c93ff9a17de54319b27"}, - {file = "PyYAML-6.0.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:596106435fa6ad000c2991a98fa58eeb8656ef2325d7e158344fb33864ed87e3"}, - {file = "PyYAML-6.0.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:baa90d3f661d43131ca170712d903e6295d1f7a0f595074f151c0aed377c9b9c"}, - {file = "PyYAML-6.0.1-cp37-cp37m-win32.whl", hash = "sha256:9046c58c4395dff28dd494285c82ba00b546adfc7ef001486fbf0324bc174fba"}, - {file = "PyYAML-6.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:4fb147e7a67ef577a588a0e2c17b6db51dda102c71de36f8549b6816a96e1867"}, - {file = "PyYAML-6.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1d4c7e777c441b20e32f52bd377e0c409713e8bb1386e1099c2415f26e479595"}, - {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a0cd17c15d3bb3fa06978b4e8958dcdc6e0174ccea823003a106c7d4d7899ac5"}, - {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:28c119d996beec18c05208a8bd78cbe4007878c6dd15091efb73a30e90539696"}, - {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7e07cbde391ba96ab58e532ff4803f79c4129397514e1413a7dc761ccd755735"}, - {file = "PyYAML-6.0.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:49a183be227561de579b4a36efbb21b3eab9651dd81b1858589f796549873dd6"}, - {file = "PyYAML-6.0.1-cp38-cp38-win32.whl", hash = "sha256:184c5108a2aca3c5b3d3bf9395d50893a7ab82a38004c8f61c258d4428e80206"}, - {file = "PyYAML-6.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:1e2722cc9fbb45d9b87631ac70924c11d3a401b2d7f410cc0e3bbf249f2dca62"}, - {file = "PyYAML-6.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9eb6caa9a297fc2c2fb8862bc5370d0303ddba53ba97e71f08023b6cd73d16a8"}, - {file = "PyYAML-6.0.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:c8098ddcc2a85b61647b2590f825f3db38891662cfc2fc776415143f599bb859"}, - {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5773183b6446b2c99bb77e77595dd486303b4faab2b086e7b17bc6bef28865f6"}, - {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b786eecbdf8499b9ca1d697215862083bd6d2a99965554781d0d8d1ad31e13a0"}, - {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc1bf2925a1ecd43da378f4db9e4f799775d6367bdb94671027b73b393a7c42c"}, - {file = "PyYAML-6.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:04ac92ad1925b2cff1db0cfebffb6ffc43457495c9b3c39d3fcae417d7125dc5"}, - {file = "PyYAML-6.0.1-cp39-cp39-win32.whl", hash = "sha256:faca3bdcf85b2fc05d06ff3fbc1f83e1391b3e724afa3feba7d13eeab355484c"}, - {file = "PyYAML-6.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:510c9deebc5c0225e8c96813043e62b680ba2f9c50a08d3724c7f28a747d1486"}, - {file = "PyYAML-6.0.1.tar.gz", hash = "sha256:bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43"}, -] - -[[package]] -name = "pyyaml-env-tag" -version = "0.1" -description = "A custom YAML tag for referencing environment variables in YAML files. " -optional = false -python-versions = ">=3.6" -files = [ - {file = "pyyaml_env_tag-0.1-py3-none-any.whl", hash = "sha256:af31106dec8a4d68c60207c1886031cbf839b68aa7abccdb19868200532c2069"}, - {file = "pyyaml_env_tag-0.1.tar.gz", hash = "sha256:70092675bda14fdec33b31ba77e7543de9ddc88f2e5b99160396572d11525bdb"}, -] - -[package.dependencies] -pyyaml = "*" - -[[package]] -name = "regex" -version = "2024.5.15" -description = "Alternative regular expression module, to replace re." -optional = false -python-versions = ">=3.8" -files = [ - {file = "regex-2024.5.15-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a81e3cfbae20378d75185171587cbf756015ccb14840702944f014e0d93ea09f"}, - {file = "regex-2024.5.15-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:7b59138b219ffa8979013be7bc85bb60c6f7b7575df3d56dc1e403a438c7a3f6"}, - {file = "regex-2024.5.15-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a0bd000c6e266927cb7a1bc39d55be95c4b4f65c5be53e659537537e019232b1"}, - {file = "regex-2024.5.15-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5eaa7ddaf517aa095fa8da0b5015c44d03da83f5bd49c87961e3c997daed0de7"}, - {file = "regex-2024.5.15-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ba68168daedb2c0bab7fd7e00ced5ba90aebf91024dea3c88ad5063c2a562cca"}, - {file = "regex-2024.5.15-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6e8d717bca3a6e2064fc3a08df5cbe366369f4b052dcd21b7416e6d71620dca1"}, - {file = "regex-2024.5.15-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1337b7dbef9b2f71121cdbf1e97e40de33ff114801263b275aafd75303bd62b5"}, - {file = "regex-2024.5.15-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f9ebd0a36102fcad2f03696e8af4ae682793a5d30b46c647eaf280d6cfb32796"}, - {file = "regex-2024.5.15-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:9efa1a32ad3a3ea112224897cdaeb6aa00381627f567179c0314f7b65d354c62"}, - {file = "regex-2024.5.15-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:1595f2d10dff3d805e054ebdc41c124753631b6a471b976963c7b28543cf13b0"}, - {file = "regex-2024.5.15-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:b802512f3e1f480f41ab5f2cfc0e2f761f08a1f41092d6718868082fc0d27143"}, - {file = "regex-2024.5.15-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:a0981022dccabca811e8171f913de05720590c915b033b7e601f35ce4ea7019f"}, - {file = "regex-2024.5.15-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:19068a6a79cf99a19ccefa44610491e9ca02c2be3305c7760d3831d38a467a6f"}, - {file = "regex-2024.5.15-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:1b5269484f6126eee5e687785e83c6b60aad7663dafe842b34691157e5083e53"}, - {file = "regex-2024.5.15-cp310-cp310-win32.whl", hash = "sha256:ada150c5adfa8fbcbf321c30c751dc67d2f12f15bd183ffe4ec7cde351d945b3"}, - {file = "regex-2024.5.15-cp310-cp310-win_amd64.whl", hash = "sha256:ac394ff680fc46b97487941f5e6ae49a9f30ea41c6c6804832063f14b2a5a145"}, - {file = "regex-2024.5.15-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:f5b1dff3ad008dccf18e652283f5e5339d70bf8ba7c98bf848ac33db10f7bc7a"}, - {file = "regex-2024.5.15-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c6a2b494a76983df8e3d3feea9b9ffdd558b247e60b92f877f93a1ff43d26656"}, - {file = "regex-2024.5.15-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a32b96f15c8ab2e7d27655969a23895eb799de3665fa94349f3b2fbfd547236f"}, - {file = "regex-2024.5.15-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:10002e86e6068d9e1c91eae8295ef690f02f913c57db120b58fdd35a6bb1af35"}, - {file = "regex-2024.5.15-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ec54d5afa89c19c6dd8541a133be51ee1017a38b412b1321ccb8d6ddbeb4cf7d"}, - {file = "regex-2024.5.15-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:10e4ce0dca9ae7a66e6089bb29355d4432caed736acae36fef0fdd7879f0b0cb"}, - {file = "regex-2024.5.15-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3e507ff1e74373c4d3038195fdd2af30d297b4f0950eeda6f515ae3d84a1770f"}, - {file = "regex-2024.5.15-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d1f059a4d795e646e1c37665b9d06062c62d0e8cc3c511fe01315973a6542e40"}, - {file = "regex-2024.5.15-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:0721931ad5fe0dda45d07f9820b90b2148ccdd8e45bb9e9b42a146cb4f695649"}, - {file = "regex-2024.5.15-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:833616ddc75ad595dee848ad984d067f2f31be645d603e4d158bba656bbf516c"}, - {file = "regex-2024.5.15-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:287eb7f54fc81546346207c533ad3c2c51a8d61075127d7f6d79aaf96cdee890"}, - {file = "regex-2024.5.15-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:19dfb1c504781a136a80ecd1fff9f16dddf5bb43cec6871778c8a907a085bb3d"}, - {file = "regex-2024.5.15-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:119af6e56dce35e8dfb5222573b50c89e5508d94d55713c75126b753f834de68"}, - {file = "regex-2024.5.15-cp311-cp311-win32.whl", hash = "sha256:1c1c174d6ec38d6c8a7504087358ce9213d4332f6293a94fbf5249992ba54efa"}, - {file = "regex-2024.5.15-cp311-cp311-win_amd64.whl", hash = "sha256:9e717956dcfd656f5055cc70996ee2cc82ac5149517fc8e1b60261b907740201"}, - {file = "regex-2024.5.15-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:632b01153e5248c134007209b5c6348a544ce96c46005d8456de1d552455b014"}, - {file = "regex-2024.5.15-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:e64198f6b856d48192bf921421fdd8ad8eb35e179086e99e99f711957ffedd6e"}, - {file = "regex-2024.5.15-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:68811ab14087b2f6e0fc0c2bae9ad689ea3584cad6917fc57be6a48bbd012c49"}, - {file = "regex-2024.5.15-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f8ec0c2fea1e886a19c3bee0cd19d862b3aa75dcdfb42ebe8ed30708df64687a"}, - {file = "regex-2024.5.15-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d0c0c0003c10f54a591d220997dd27d953cd9ccc1a7294b40a4be5312be8797b"}, - {file = "regex-2024.5.15-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2431b9e263af1953c55abbd3e2efca67ca80a3de8a0437cb58e2421f8184717a"}, - {file = "regex-2024.5.15-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4a605586358893b483976cffc1723fb0f83e526e8f14c6e6614e75919d9862cf"}, - {file = "regex-2024.5.15-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:391d7f7f1e409d192dba8bcd42d3e4cf9e598f3979cdaed6ab11288da88cb9f2"}, - {file = "regex-2024.5.15-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:9ff11639a8d98969c863d4617595eb5425fd12f7c5ef6621a4b74b71ed8726d5"}, - {file = "regex-2024.5.15-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:4eee78a04e6c67e8391edd4dad3279828dd66ac4b79570ec998e2155d2e59fd5"}, - {file = "regex-2024.5.15-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:8fe45aa3f4aa57faabbc9cb46a93363edd6197cbc43523daea044e9ff2fea83e"}, - {file = "regex-2024.5.15-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:d0a3d8d6acf0c78a1fff0e210d224b821081330b8524e3e2bc5a68ef6ab5803d"}, - {file = "regex-2024.5.15-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:c486b4106066d502495b3025a0a7251bf37ea9540433940a23419461ab9f2a80"}, - {file = "regex-2024.5.15-cp312-cp312-win32.whl", hash = "sha256:c49e15eac7c149f3670b3e27f1f28a2c1ddeccd3a2812cba953e01be2ab9b5fe"}, - {file = "regex-2024.5.15-cp312-cp312-win_amd64.whl", hash = "sha256:673b5a6da4557b975c6c90198588181029c60793835ce02f497ea817ff647cb2"}, - {file = "regex-2024.5.15-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:87e2a9c29e672fc65523fb47a90d429b70ef72b901b4e4b1bd42387caf0d6835"}, - {file = "regex-2024.5.15-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:c3bea0ba8b73b71b37ac833a7f3fd53825924165da6a924aec78c13032f20850"}, - {file = "regex-2024.5.15-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:bfc4f82cabe54f1e7f206fd3d30fda143f84a63fe7d64a81558d6e5f2e5aaba9"}, - {file = "regex-2024.5.15-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e5bb9425fe881d578aeca0b2b4b3d314ec88738706f66f219c194d67179337cb"}, - {file = "regex-2024.5.15-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:64c65783e96e563103d641760664125e91bd85d8e49566ee560ded4da0d3e704"}, - {file = "regex-2024.5.15-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cf2430df4148b08fb4324b848672514b1385ae3807651f3567871f130a728cc3"}, - {file = "regex-2024.5.15-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5397de3219a8b08ae9540c48f602996aa6b0b65d5a61683e233af8605c42b0f2"}, - {file = "regex-2024.5.15-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:455705d34b4154a80ead722f4f185b04c4237e8e8e33f265cd0798d0e44825fa"}, - {file = "regex-2024.5.15-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:b2b6f1b3bb6f640c1a92be3bbfbcb18657b125b99ecf141fb3310b5282c7d4ed"}, - {file = "regex-2024.5.15-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:3ad070b823ca5890cab606c940522d05d3d22395d432f4aaaf9d5b1653e47ced"}, - {file = "regex-2024.5.15-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:5b5467acbfc153847d5adb21e21e29847bcb5870e65c94c9206d20eb4e99a384"}, - {file = "regex-2024.5.15-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:e6662686aeb633ad65be2a42b4cb00178b3fbf7b91878f9446075c404ada552f"}, - {file = "regex-2024.5.15-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:2b4c884767504c0e2401babe8b5b7aea9148680d2e157fa28f01529d1f7fcf67"}, - {file = "regex-2024.5.15-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:3cd7874d57f13bf70078f1ff02b8b0aa48d5b9ed25fc48547516c6aba36f5741"}, - {file = "regex-2024.5.15-cp38-cp38-win32.whl", hash = "sha256:e4682f5ba31f475d58884045c1a97a860a007d44938c4c0895f41d64481edbc9"}, - {file = "regex-2024.5.15-cp38-cp38-win_amd64.whl", hash = "sha256:d99ceffa25ac45d150e30bd9ed14ec6039f2aad0ffa6bb87a5936f5782fc1569"}, - {file = "regex-2024.5.15-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:13cdaf31bed30a1e1c2453ef6015aa0983e1366fad2667657dbcac7b02f67133"}, - {file = "regex-2024.5.15-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:cac27dcaa821ca271855a32188aa61d12decb6fe45ffe3e722401fe61e323cd1"}, - {file = "regex-2024.5.15-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:7dbe2467273b875ea2de38ded4eba86cbcbc9a1a6d0aa11dcf7bd2e67859c435"}, - {file = "regex-2024.5.15-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:64f18a9a3513a99c4bef0e3efd4c4a5b11228b48aa80743be822b71e132ae4f5"}, - {file = "regex-2024.5.15-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d347a741ea871c2e278fde6c48f85136c96b8659b632fb57a7d1ce1872547600"}, - {file = "regex-2024.5.15-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1878b8301ed011704aea4c806a3cadbd76f84dece1ec09cc9e4dc934cfa5d4da"}, - {file = "regex-2024.5.15-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4babf07ad476aaf7830d77000874d7611704a7fcf68c9c2ad151f5d94ae4bfc4"}, - {file = "regex-2024.5.15-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:35cb514e137cb3488bce23352af3e12fb0dbedd1ee6e60da053c69fb1b29cc6c"}, - {file = "regex-2024.5.15-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:cdd09d47c0b2efee9378679f8510ee6955d329424c659ab3c5e3a6edea696294"}, - {file = "regex-2024.5.15-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:72d7a99cd6b8f958e85fc6ca5b37c4303294954eac1376535b03c2a43eb72629"}, - {file = "regex-2024.5.15-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:a094801d379ab20c2135529948cb84d417a2169b9bdceda2a36f5f10977ebc16"}, - {file = "regex-2024.5.15-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:c0c18345010870e58238790a6779a1219b4d97bd2e77e1140e8ee5d14df071aa"}, - {file = "regex-2024.5.15-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:16093f563098448ff6b1fa68170e4acbef94e6b6a4e25e10eae8598bb1694b5d"}, - {file = "regex-2024.5.15-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:e38a7d4e8f633a33b4c7350fbd8bad3b70bf81439ac67ac38916c4a86b465456"}, - {file = "regex-2024.5.15-cp39-cp39-win32.whl", hash = "sha256:71a455a3c584a88f654b64feccc1e25876066c4f5ef26cd6dd711308aa538694"}, - {file = "regex-2024.5.15-cp39-cp39-win_amd64.whl", hash = "sha256:cab12877a9bdafde5500206d1020a584355a97884dfd388af3699e9137bf7388"}, - {file = "regex-2024.5.15.tar.gz", hash = "sha256:d3ee02d9e5f482cc8309134a91eeaacbdd2261ba111b0fef3748eeb4913e6a2c"}, -] - -[[package]] -name = "requests" -version = "2.32.3" -description = "Python HTTP for Humans." -optional = false -python-versions = ">=3.8" -files = [ - {file = "requests-2.32.3-py3-none-any.whl", hash = "sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6"}, - {file = "requests-2.32.3.tar.gz", hash = "sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760"}, -] - -[package.dependencies] -certifi = ">=2017.4.17" -charset-normalizer = ">=2,<4" -idna = ">=2.5,<4" -urllib3 = ">=1.21.1,<3" - -[package.extras] -socks = ["PySocks (>=1.5.6,!=1.5.7)"] -use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] - -[[package]] -name = "six" -version = "1.16.0" -description = "Python 2 and 3 compatibility utilities" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" -files = [ - {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, - {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, -] - -[[package]] -name = "urllib3" -version = "2.2.2" -description = "HTTP library with thread-safe connection pooling, file post, and more." -optional = false -python-versions = ">=3.8" -files = [ - {file = "urllib3-2.2.2-py3-none-any.whl", hash = "sha256:a448b2f64d686155468037e1ace9f2d2199776e17f0a46610480d311f73e3472"}, - {file = "urllib3-2.2.2.tar.gz", hash = "sha256:dd505485549a7a552833da5e6063639d0d177c04f23bc3864e41e5dc5f612168"}, -] - -[package.extras] -brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)"] -h2 = ["h2 (>=4,<5)"] -socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] -zstd = ["zstandard (>=0.18.0)"] - -[[package]] -name = "watchdog" -version = "4.0.1" -description = "Filesystem events monitoring" -optional = false -python-versions = ">=3.8" -files = [ - {file = "watchdog-4.0.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:da2dfdaa8006eb6a71051795856bedd97e5b03e57da96f98e375682c48850645"}, - {file = "watchdog-4.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e93f451f2dfa433d97765ca2634628b789b49ba8b504fdde5837cdcf25fdb53b"}, - {file = "watchdog-4.0.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ef0107bbb6a55f5be727cfc2ef945d5676b97bffb8425650dadbb184be9f9a2b"}, - {file = "watchdog-4.0.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:17e32f147d8bf9657e0922c0940bcde863b894cd871dbb694beb6704cfbd2fb5"}, - {file = "watchdog-4.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:03e70d2df2258fb6cb0e95bbdbe06c16e608af94a3ffbd2b90c3f1e83eb10767"}, - {file = "watchdog-4.0.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:123587af84260c991dc5f62a6e7ef3d1c57dfddc99faacee508c71d287248459"}, - {file = "watchdog-4.0.1-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:093b23e6906a8b97051191a4a0c73a77ecc958121d42346274c6af6520dec175"}, - {file = "watchdog-4.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:611be3904f9843f0529c35a3ff3fd617449463cb4b73b1633950b3d97fa4bfb7"}, - {file = "watchdog-4.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:62c613ad689ddcb11707f030e722fa929f322ef7e4f18f5335d2b73c61a85c28"}, - {file = "watchdog-4.0.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:d4925e4bf7b9bddd1c3de13c9b8a2cdb89a468f640e66fbfabaf735bd85b3e35"}, - {file = "watchdog-4.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:cad0bbd66cd59fc474b4a4376bc5ac3fc698723510cbb64091c2a793b18654db"}, - {file = "watchdog-4.0.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:a3c2c317a8fb53e5b3d25790553796105501a235343f5d2bf23bb8649c2c8709"}, - {file = "watchdog-4.0.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:c9904904b6564d4ee8a1ed820db76185a3c96e05560c776c79a6ce5ab71888ba"}, - {file = "watchdog-4.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:667f3c579e813fcbad1b784db7a1aaa96524bed53437e119f6a2f5de4db04235"}, - {file = "watchdog-4.0.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:d10a681c9a1d5a77e75c48a3b8e1a9f2ae2928eda463e8d33660437705659682"}, - {file = "watchdog-4.0.1-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:0144c0ea9997b92615af1d94afc0c217e07ce2c14912c7b1a5731776329fcfc7"}, - {file = "watchdog-4.0.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:998d2be6976a0ee3a81fb8e2777900c28641fb5bfbd0c84717d89bca0addcdc5"}, - {file = "watchdog-4.0.1-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:e7921319fe4430b11278d924ef66d4daa469fafb1da679a2e48c935fa27af193"}, - {file = "watchdog-4.0.1-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:f0de0f284248ab40188f23380b03b59126d1479cd59940f2a34f8852db710625"}, - {file = "watchdog-4.0.1-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:bca36be5707e81b9e6ce3208d92d95540d4ca244c006b61511753583c81c70dd"}, - {file = "watchdog-4.0.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:ab998f567ebdf6b1da7dc1e5accfaa7c6992244629c0fdaef062f43249bd8dee"}, - {file = "watchdog-4.0.1-py3-none-manylinux2014_aarch64.whl", hash = "sha256:dddba7ca1c807045323b6af4ff80f5ddc4d654c8bce8317dde1bd96b128ed253"}, - {file = "watchdog-4.0.1-py3-none-manylinux2014_armv7l.whl", hash = "sha256:4513ec234c68b14d4161440e07f995f231be21a09329051e67a2118a7a612d2d"}, - {file = "watchdog-4.0.1-py3-none-manylinux2014_i686.whl", hash = "sha256:4107ac5ab936a63952dea2a46a734a23230aa2f6f9db1291bf171dac3ebd53c6"}, - {file = "watchdog-4.0.1-py3-none-manylinux2014_ppc64.whl", hash = "sha256:6e8c70d2cd745daec2a08734d9f63092b793ad97612470a0ee4cbb8f5f705c57"}, - {file = "watchdog-4.0.1-py3-none-manylinux2014_ppc64le.whl", hash = "sha256:f27279d060e2ab24c0aa98363ff906d2386aa6c4dc2f1a374655d4e02a6c5e5e"}, - {file = "watchdog-4.0.1-py3-none-manylinux2014_s390x.whl", hash = "sha256:f8affdf3c0f0466e69f5b3917cdd042f89c8c63aebdb9f7c078996f607cdb0f5"}, - {file = "watchdog-4.0.1-py3-none-manylinux2014_x86_64.whl", hash = "sha256:ac7041b385f04c047fcc2951dc001671dee1b7e0615cde772e84b01fbf68ee84"}, - {file = "watchdog-4.0.1-py3-none-win32.whl", hash = "sha256:206afc3d964f9a233e6ad34618ec60b9837d0582b500b63687e34011e15bb429"}, - {file = "watchdog-4.0.1-py3-none-win_amd64.whl", hash = "sha256:7577b3c43e5909623149f76b099ac49a1a01ca4e167d1785c76eb52fa585745a"}, - {file = "watchdog-4.0.1-py3-none-win_ia64.whl", hash = "sha256:d7b9f5f3299e8dd230880b6c55504a1f69cf1e4316275d1b215ebdd8187ec88d"}, - {file = "watchdog-4.0.1.tar.gz", hash = "sha256:eebaacf674fa25511e8867028d281e602ee6500045b57f43b08778082f7f8b44"}, -] - -[package.extras] -watchmedo = ["PyYAML (>=3.10)"] - [metadata] lock-version = "2.0" python-versions = "^3.12" -content-hash = "fdf2ec53a4820aaf070a55cd5377d1307ced015136a5dfad3470ea63a1d98741" +content-hash = "52d1ac66e8fdd8d71e8a7eeda6e466f1dc9fa619c49b1d03fed13a074de09714" diff --git a/pyproject.toml b/pyproject.toml index f77b309..83a9c5b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,9 +14,6 @@ packages = [{include = "tests/*.py"}] [tool.poetry.dependencies] python = "^3.12" -mkdocs = "^1.5.3" -mkdocs-material = "^9.5.11" -mkdocs-include-dir-to-nav = "^1.2.0" [tool.poetry.group.test] [tool.poetry.group.test.dependencies] diff --git a/tests/test_toolbox.py b/tests/test_toolbox.py index f19e7dd..ec0ee94 100644 --- a/tests/test_toolbox.py +++ b/tests/test_toolbox.py @@ -1,16 +1,215 @@ import inspect import os import pytest -import unittest current_dir: str = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) if os.environ['HOME'] == "/app": current_dir = "/app/tests" +project_path: str = os.path.abspath(f"{current_dir}/..") script: str = os.path.abspath(f"{current_dir}/../toolbox.sh") + +def test_function_empty(shell): + ret = shell.run(script, "--test") + assert ret.stderr.rstrip() == "No function to execute" + assert ret.returncode == 1 + + def test_function_not_exist(shell): - ret = shell.run(script, "test_function") + ret = shell.run(script, "test_function", "--test") + assert ret.stderr.rstrip() == "Function with name test_function does not exist" + assert ret.returncode == 2 + + +@pytest.mark.parametrize("color_key, color_value", [ + ("R","\x1b[0;31m"), + ("G", "\x1b[0;32m"), + ("B", "\x1b[0;34m"), + ("Y", "\x1b[0;33m"), + ("W", "\x1b[0;37m"), + ("N", "\x1b[0;0m") +]) +def test_colors(shell, color_key, color_value): + ret = shell.run(script, "colors", color_key, "--test") + assert ret.stdout.rstrip() == color_value + assert ret.returncode == 0 + + +def test_info(shell): + ret = shell.run(script, "info", "msg_info", "--test") + assert ret.stdout.rstrip() == "msg_info" + assert ret.returncode == 0 + + +def test_debug(shell): + ret = shell.run(script, "debug", "msg_debug", "--test") + assert ret.stdout.rstrip() == "msg_debug" + assert ret.returncode == 0 + + +def test_error(shell): + ret = shell.run(script, "error", "msg_error", "--test") + assert ret.stderr.rstrip() == "msg_error" + assert ret.returncode == 0 + + +def test_build(shell): + ret = shell.run(script, "build", "--test") + assert len(ret.stdout.splitlines()) == 2 + assert ret.stdout.splitlines()[0] == "Building source code in the target folder" + assert ret.stdout.splitlines()[1] == "mvn clean package -Dmaven.clean.failOnError=false -DskipTests" + assert ret.returncode == 0 + + +def test_compile(shell): + ret = shell.run(script, "compile", "--test") + assert len(ret.stdout.splitlines()) == 2 + assert ret.stdout.splitlines()[0] == "Compile source code" + assert ret.stdout.splitlines()[1] == "mvn clean compile" + assert ret.returncode == 0 + + +def test_docker_env_source_not_exist(shell): + ret = shell.run(script, "docker_env_source", "--test", "--fixture=1") + assert len(ret.stdout.splitlines()) == 1 + assert ret.stdout.splitlines()[0] == "source test_docker_env" + assert ret.stderr.rstrip() == "Cannot find test_docker_env" + assert ret.returncode == 1 + + +def test_docker_env_source(shell): + ret = shell.run(script, "docker_env_source", "--test") + assert len(ret.stdout.splitlines()) == 1 + assert ret.stdout.splitlines()[0] == f"source {project_path}/.default.docker.env" + assert ret.returncode == 0 + + +def test_docker_build_env_source_not_exist(shell): + ret = shell.run(script, "docker_build", "--test", "--fixture=1") + assert len(ret.stdout.splitlines()) == 1 + assert ret.stdout.splitlines()[0] == "source test_docker_env" + assert ret.stderr.rstrip() == "Cannot find test_docker_env" assert ret.returncode == 1 - assert "Function with name test_function does not exist" in ret.stderr + + +def test_docker_build(shell): + ret = shell.run(script, "docker_build", "--test") + assert len(ret.stdout.splitlines()) == 3 + assert ret.stdout.splitlines()[0] == f"source {project_path}/.default.docker.env" + assert ret.stdout.splitlines()[1] == "Build Docker services" + assert ret.stdout.splitlines()[2] == f"docker compose -f {project_path}/docker-compose.yml build" + assert ret.returncode == 0 + + +def test_init_env_source_not_exist(shell): + ret = shell.run(script, "init", "--test", "--fixture=1") + assert len(ret.stdout.splitlines()) == 3 + assert ret.stdout.splitlines()[0] == "Building source code in the target folder" + assert ret.stdout.splitlines()[1] == "mvn clean package -Dmaven.clean.failOnError=false -DskipTests" + assert ret.stdout.splitlines()[2] == "source test_docker_env" + assert ret.stderr.rstrip() == "Cannot find test_docker_env" + assert ret.returncode == 2 + + +def test_init(shell): + ret = shell.run(script, "init", "--test") + assert len(ret.stdout.splitlines()) == 5 + assert ret.stdout.splitlines()[0] == "Building source code in the target folder" + assert ret.stdout.splitlines()[1] == "mvn clean package -Dmaven.clean.failOnError=false -DskipTests" + assert ret.stdout.splitlines()[2] == f"source {project_path}/.default.docker.env" + assert ret.stdout.splitlines()[3] == "Creating and starting Docker containers" + assert ret.stdout.splitlines()[4] == f"docker compose -f {project_path}/docker-compose.yml up --build -d" + assert ret.returncode == 0 + + +def test_start_env_source_not_exist(shell): + ret = shell.run(script, "start", "--test", "--fixture=1") + assert len(ret.stdout.splitlines()) == 1 + assert ret.stdout.splitlines()[0] == "source test_docker_env" + assert ret.stderr.rstrip() == "Cannot find test_docker_env" + assert ret.returncode == 1 + + +def test_start(shell): + ret = shell.run(script, "start", "--test") + assert len(ret.stdout.splitlines()) == 3 + assert ret.stdout.splitlines()[0] == f"source {project_path}/.default.docker.env" + assert ret.stdout.splitlines()[1] == "Starting Docker containers" + assert ret.stdout.splitlines()[2] == f"docker compose -f {project_path}/docker-compose.yml start" + assert ret.returncode == 0 + + +def test_stop_env_source_not_exist(shell): + ret = shell.run(script, "stop", "--test", "--fixture=1") + assert len(ret.stdout.splitlines()) == 1 + assert ret.stdout.splitlines()[0] == "source test_docker_env" + assert ret.stderr.rstrip() == "Cannot find test_docker_env" + assert ret.returncode == 1 + + +def test_stop(shell): + ret = shell.run(script, "stop", "--test") + assert len(ret.stdout.splitlines()) == 3 + assert ret.stdout.splitlines()[0] == f"source {project_path}/.default.docker.env" + assert ret.stdout.splitlines()[1] == "Stopping Docker containers" + assert ret.stdout.splitlines()[2] == f"docker compose -f {project_path}/docker-compose.yml stop" + assert ret.returncode == 0 + + +def test_clean_env_source_not_exist(shell): + ret = shell.run(script, "clean", "--test", "--fixture=1") + assert len(ret.stdout.splitlines()) == 1 + assert ret.stdout.splitlines()[0] == "source test_docker_env" + assert ret.stderr.rstrip() == "Cannot find test_docker_env" + assert ret.returncode == 1 + + +def test_clean(shell): + ret = shell.run(script, "clean", "--test") + assert len(ret.stdout.splitlines()) == 3 + assert ret.stdout.splitlines()[0] == f"source {project_path}/.default.docker.env" + assert ret.stdout.splitlines()[1] == "Remove Docker containers, networks and volumes" + assert ret.stdout.splitlines()[2] == f"docker compose -f {project_path}/docker-compose.yml down --volumes" + assert ret.returncode == 0 + + +def test_display_logs_env_source_not_exist(shell): + ret = shell.run(script, "display_logs", "--test", "--fixture=1") + assert len(ret.stdout.splitlines()) == 1 + assert ret.stdout.splitlines()[0] == "source test_docker_env" + assert ret.stderr.rstrip() == "Cannot find test_docker_env" + assert ret.returncode == 1 + + +def test_display_logs(shell): + ret = shell.run(script, "display_logs", "--test") + assert len(ret.stdout.splitlines()) == 3 + assert ret.stdout.splitlines()[0] == f"source {project_path}/.default.docker.env" + assert ret.stdout.splitlines()[1] == "Display Docker container logs" + assert ret.stdout.splitlines()[2] == f"docker compose -f {project_path}/docker-compose.yml logs -f" + assert ret.returncode == 0 + + +def test_release(shell): + ret = shell.run(script, "release", "--test") + assert len(ret.stdout.splitlines()) == 4 + assert ret.stdout.splitlines()[0] == "Creation of 2 commits with release and next SNAPSHOT" + assert ret.stdout.splitlines()[1] == "mvn release:prepare -B -ff -DpushChanges=false -DtagNameFormat=@{project.version}" + assert ret.stdout.splitlines()[2] == "Clean temporary files" + assert ret.stdout.splitlines()[3] == "mvn release:clean" + assert ret.returncode == 0 + + +def test_release_push(shell): + ret = shell.run(script, "release_push", "--test") + assert len(ret.stdout.splitlines()) == 1 + assert ret.stdout.splitlines()[0] == "Create a push and a new branch with commits previously prepared" + assert ret.returncode == 0 + + +def test_display_help(shell): + ret = shell.run(script, "display_help", "--test") + assert len(ret.stdout.splitlines()) == 19 + assert ret.returncode == 0 diff --git a/toolbox.sh b/toolbox.sh index 2f6efff..5e5f458 100755 --- a/toolbox.sh +++ b/toolbox.sh @@ -11,27 +11,74 @@ ECOCODE_JAVA_PLUGIN_VERSION=$(< "$CURRENT_PATH/pom.xml" grep ""|head -n ECOCODE_JAVA_PLUGIN_JAR="$CURRENT_PATH/target/ecocode-java-plugin-$ECOCODE_JAVA_PLUGIN_VERSION.jar" # Shell coloring -declare -A COLORS=( - [RED]='\033[0;31m' - [GREEN]='\033[0;32m' - [YELLOW]='\033[0;33m' - [BLUE]='\033[0;34m' - [WHITE]='\033[0;37m' - [NOCOLOR]='\033[0;0m' -) +function colors() { + case $1 in + 'R') echo -e '\033[0;31m' ;; # RED + 'G') echo -e '\033[0;32m' ;; # GREEN + 'B') echo -e '\033[0;34m' ;; # BLUE + 'Y') echo -e '\033[0;33m' ;; # YELLOW + 'W') echo -e '\033[0;37m' ;; # WHITE + 'N') echo -e '\033[0;0m' ;; # NOCOLOR + esac +} function info() { - echo -e "${COLORS[WHITE]}$*${COLORS[NOCOLOR]}" + if [[ $TEST -gt 0 ]]; then + echo "$*" + else + echo -e "$(colors 'W')$*$(colors 'N')" + fi return 0 } function debug() { - [[ $VERBOSE -gt 0 ]] && echo -e "${COLORS[BLUE]}$*${COLORS[NOCOLOR]}" + if [[ $((VERBOSE+TEST)) -gt 0 ]]; then + if [[ $TEST -gt 0 ]]; then + echo "$*" + else + echo -e "$(colors 'B')$*$(colors 'N')" + fi + fi return 0 } function error() { - >&2 echo -e "${COLORS[RED]}$*${COLORS[NOCOLOR]}" + if [[ $TEST -gt 0 ]]; then + >&2 echo -e "$*" + else + >&2 echo -e "$(colors 'R')$*$(colors 'N')" + fi + return 0 +} + +# @description Compile and package source code with maven. +# @exitcode 0 If successful. +# @exitcode 1 If an error was encountered when building source code. +# @exitcode 2 If the ecoCode plugin in target directory cannot be found. +function build() { + info "Building source code in the target folder" + if ! [[ -f $ECOCODE_JAVA_PLUGIN_JAR ]] || [[ $FORCE -gt 0 ]] || [[ $TEST -gt 0 ]]; then + debug "mvn clean package -Dmaven.clean.failOnError=false -DskipTests" ; [[ $TEST -gt 0 ]] && return 0 + if ! mvn clean package -Dmaven.clean.failOnError=false -DskipTests; then + return 1 + fi + fi + # Check that the plugin is present in the target folder + if ! [[ -f $ECOCODE_JAVA_PLUGIN_JAR ]]; then + error "Cannot find ecoCode plugin in target directory" && return 2 + fi + return 0 +} + +# @description Compile source code with maven. +# @exitcode 0 If successful. +# @exitcode 1 If an error was encountered when compiling the source code. +function compile() { + info "Compile source code" + debug "mvn clean compile" ; [[ $TEST -gt 0 ]] && return 0 + if ! mvn clean compile; then + return 1 + fi return 0 } @@ -43,7 +90,7 @@ function docker_env_source() { # To export variables set -a # shellcheck source=.default.docker.env - ! source "$ECOCODE_DOCKER_ENV" && error "Cannot find $ECOCODE_DOCKER_ENV" && return 1 + ! source "$ECOCODE_DOCKER_ENV" 2&>/dev/null && error "Cannot find $ECOCODE_DOCKER_ENV" && return 1 set +a return 0 } @@ -54,9 +101,9 @@ function docker_env_source() { # @exitcode 2 If an error has been encountered when building services. function docker_build() { ! docker_env_source && return 1 - [[ $FORCE -gt 0 ]] && rm -rf "$CURRENT_PATH/target" + [[ $FORCE -gt 0 ]] && rm -rf "$CURRENT_PATH/target/*" info "Build Docker services" - debug "docker compose -f $ECOCODE_DC_FILE build" + debug "docker compose -f $ECOCODE_DC_FILE build" ; [[ $TEST -gt 0 ]] && return 0 ! docker compose -f "$ECOCODE_DC_FILE" build && return 2 return 0 } @@ -70,24 +117,24 @@ function init() { ! build && return 1 ! docker_env_source && return 2 info "Creating and starting Docker containers" - debug "docker compose -f $ECOCODE_DC_FILE up --build -d" + debug "docker compose -f $ECOCODE_DC_FILE up --build -d" ; [[ $TEST -gt 0 ]] && return 0 ! docker compose -f "$ECOCODE_DC_FILE" up --build -d && return 3 return 0 } # @description Starting Docker containers. # @exitcode 0 If successful. -# @exitcode 1 If the ecoCode plugin is not present in the target folder. -# @exitcode 2 If an error was encountered retrieving environment variables. +# @exitcode 1 If an error was encountered retrieving environment variables. +# @exitcode 2 If the ecoCode plugin is not present in the target folder. # @exitcode 3 If an error was encountered during container startup. function start() { + ! docker_env_source && return 1 # Check that the plugin is present in the target folder - if ! [[ -f $ECOCODE_JAVA_PLUGIN_JAR ]]; then - error "Cannot find ecoCode plugin in target directory" && return 1 + if [[ $TEST -eq 0 ]] && ! [[ -f $ECOCODE_JAVA_PLUGIN_JAR ]]; then + error "Cannot find ecoCode plugin in target directory" && return 2 fi - ! docker_env_source && return 2 info "Starting Docker containers" - debug "docker compose -f $ECOCODE_DC_FILE start" + debug "docker compose -f $ECOCODE_DC_FILE start" ; [[ $TEST -gt 0 ]] && return 0 ! TOKEN=$ECOCODE_TOKEN docker compose -f "$ECOCODE_DC_FILE" start && return 3 return 0 } @@ -99,7 +146,7 @@ function start() { function stop() { ! docker_env_source && return 1 info "Stopping Docker containers" - debug "docker compose -f $ECOCODE_DC_FILE stop" + debug "docker compose -f $ECOCODE_DC_FILE stop" ; [[ $TEST -gt 0 ]] && return 0 ! docker compose -f "$ECOCODE_DC_FILE" stop && return 2 return 0 } @@ -111,7 +158,7 @@ function stop() { function clean() { ! docker_env_source && return 1 info "Remove Docker containers, networks and volumes" - debug "docker compose -f $ECOCODE_DC_FILE down --volumes" + debug "docker compose -f $ECOCODE_DC_FILE down --volumes" ; [[ $TEST -gt 0 ]] && return 0 ! docker compose -f "$ECOCODE_DC_FILE" down --volumes && return 2 [[ $FORCE -gt 0 ]] && rm -rf "$CURRENT_PATH/target" return 0 @@ -123,63 +170,38 @@ function clean() { function display_logs() { ! docker_env_source && return 1 info "Display Docker container logs" - debug "docker compose -f $ECOCODE_DC_FILE logs -f" + debug "docker compose -f $ECOCODE_DC_FILE logs -f" ; [[ $TEST -gt 0 ]] && return 0 docker compose -f "$ECOCODE_DC_FILE" logs -f return 0 } -# @description Compile and package source code with maven. -# @exitcode 0 If successful. -# @exitcode 1 If an error was encountered when building source code. -# @exitcode 2 If the ecoCode plugin in target directory cannot be found. -function build() { - info "Building source code in the target folder" - if ! [[ -f $ECOCODE_JAVA_PLUGIN_JAR ]] || [[ $FORCE -gt 0 ]]; then - debug "mvn clean package -Dmaven.clean.failOnError=false -DskipTests" - if ! mvn clean package -Dmaven.clean.failOnError=false -DskipTests; then - return 1 - fi - fi - # Check that the plugin is present in the target folder - if ! [[ -f $ECOCODE_JAVA_PLUGIN_JAR ]]; then - error "Cannot find ecoCode plugin in target directory" && return 2 - fi - return 0 -} - -# @description Compile source code with maven. -# @exitcode 0 If successful. -# @exitcode 1 If an error was encountered when compiling the source code. -function compile() { - info "Compile source code" - debug "mvn clean compile" - if ! mvn clean compile; then - return 1 - fi - return 0 -} - # @description Use maven plugin release to prepare locally next release and next SNAPSHOT. # @exitcode 0 If successful. # @exitcode 1 If an error is encountered when prepare the release. # @exitcode 2 If an error is encountered when cleaning files. function release() { - # creation of 2 commits with release and next SNAPSHOT - if ! mvn release:prepare -B -ff -DpushChanges=false -DtagNameFormat=@{project.version}; then - return 1 + info "Creation of 2 commits with release and next SNAPSHOT" + debug "mvn release:prepare -B -ff -DpushChanges=false -DtagNameFormat=@{project.version}" + if [[ $TEST -eq 0 ]]; then + if ! mvn release:prepare -B -ff -DpushChanges=false -DtagNameFormat=@{project.version}; then + return 1 + fi fi + info "Clean temporary files" + debug "mvn release:clean" ; [[ $TEST -gt 0 ]] && return 0 sleep 2 - # Clean temporary files if ! mvn release:clean; then return 2 fi return 0 } -# @description Create a push and a new branch with commits previously prepared +# @description Create a push and a new branch with commits previously prepared. # @exitcode 0 If successful. # @exitcode 1 If the last commit tag does not match the last git tag. function release_push() { + info "Create a push and a new branch with commits previously prepared" + [[ $TEST -gt 0 ]] && return 0 local last_tag_prepare="" last_tag="" branch_name="" # Check that the release has been properly prepared last_tag_prepare=$(git log -2 --pretty=%B|grep "prepare release"|awk '{print $NF}') @@ -203,24 +225,24 @@ function release_push() { function display_help() { local output="" output=" -${COLORS[YELLOW]}Usage${COLORS[WHITE]} $(basename "$0") [OPTIONS] COMMAND -${COLORS[YELLOW]}Commands:${COLORS[NOCOLOR]} -${COLORS[GREEN]}init${COLORS[WHITE]} Initialize and creating containers -${COLORS[GREEN]}start${COLORS[WHITE]} Starting Docker containers -${COLORS[GREEN]}stop${COLORS[WHITE]} Stopping Docker containers -${COLORS[GREEN]}clean${COLORS[WHITE]} Stop and remove containers, networks and volumes -${COLORS[GREEN]}build${COLORS[WHITE]} Build the ecoCode plugin -${COLORS[GREEN]}compile${COLORS[WHITE]} Compile the ecoCode plugin -${COLORS[GREEN]}build-docker${COLORS[WHITE]} Build Docker services -${COLORS[GREEN]}release${COLORS[WHITE]} Create a new release -${COLORS[GREEN]}release-push${COLORS[WHITE]} Push the new release -${COLORS[YELLOW]}Options:${COLORS[NOCOLOR]} -${COLORS[GREEN]}-l, --logs${COLORS[WHITE]} Display Docker container logs -${COLORS[GREEN]}-p, --push${COLORS[WHITE]} Push the new release -${COLORS[GREEN]}-f, --force${COLORS[WHITE]} To delete the target folder or recompile the source code -${COLORS[GREEN]}--token=${COLORS[WHITE]} Creating containers with previously created token -${COLORS[GREEN]}-h, --help${COLORS[WHITE]} Display help -${COLORS[GREEN]}-v, --verbose${COLORS[WHITE]} Make the command more talkative +$(colors 'Y')Usage$(colors 'W') $(basename "$0") [OPTIONS] COMMAND +$(colors 'Y')Commands:$(colors 'N') +$(colors 'G')init$(colors 'W') Initialize and creating containers +$(colors 'G')start$(colors 'W') Starting Docker containers +$(colors 'G')stop$(colors 'W') Stopping Docker containers +$(colors 'G')clean$(colors 'W') Stop and remove containers, networks and volumes +$(colors 'G')uild$(colors 'W') Build the ecoCode plugin +$(colors 'G')compile$(colors 'W') Compile the ecoCode plugin +$(colors 'G')build-docker$(colors 'W') Build Docker services +$(colors 'G')release$(colors 'W') Create a new release +$(colors 'G')release-push$(colors 'W') Push the new release +$(colors 'Y')Options:$(colors 'N') +$(colors 'G')-l, --logs$(colors 'W') Display Docker container logs +$(colors 'G')-p, --push$(colors 'W') Push the new release +$(colors 'G')-f, --force$(colors 'W') To delete the target folder or recompile the source code +$(colors 'G')--token=$(colors 'W') Creating containers with previously created token +$(colors 'G')-h, --help$(colors 'W') Display help +$(colors 'G')-v, --verbose$(colors 'W') Make the command more talkative " echo -e "$output\n"|sed '1d; $d' return 0 @@ -231,19 +253,21 @@ function check_opts() { read -ra opts <<< "$@" for opt in "${opts[@]}"; do case "$opt" in - init) INIT=1 ;; - start) START=1 ;; - stop) STOP=1 ;; - clean) CLEAN=1 ;; - release) RELEASE=1 ;; - release-push) RELEASE_PUSH=1 ;; - build) BUILD=1 ;; - compile) COMPILE=1 ;; - build-docker) BUILD_DOCKER=1 ;; + init) INIT=1 ; ARGS+=("$opt") ;; + start) START=1 ; ARGS+=("$opt") ;; + stop) STOP=1 ; ARGS+=("$opt") ;; + clean) CLEAN=1 ; ARGS+=("$opt") ;; + release) RELEASE=1 ; ARGS+=("$opt") ;; + release-push) RELEASE_PUSH=1 ; ARGS+=("$opt") ;; + build) BUILD=1 ; ARGS+=("$opt") ;; + compile) COMPILE=1 ; ARGS+=("$opt") ;; + build-docker) BUILD_DOCKER=1 ; ARGS+=("$opt") ;; --token=*) ECOCODE_TOKEN=$(echo "$opt"|awk -F= '{print $2}') ;; --logs) DISPLAY_LOGS=1 ;; --verbose) VERBOSE=1 ;; --force) FORCE=1 ;; + --test) TEST=1 ;; + --fixture=*) FIXTURE=$(echo "$opt"|awk -F= '{print $2}') ;; --help) HELP=1 ;; *) ARGS+=("$opt") ;; esac @@ -256,10 +280,17 @@ function check_opts() { } # Used by unit tests to execute a function. -function execute_function() { - if ! [[ $(type -t "${ARGS[0]}") == function ]]; then - error "Function with name ${ARGS[0]} does not exist" && return 1 +function execute_unit_test() { + if [[ -z "${ARGS[0]}" ]]; then + error "No function to execute" && return 1 fi + # If a function is passed as the first argument, we check that it exists + if [[ -n "${ARGS[0]}" ]] && ! [[ $(type -t "${ARGS[0]}") == function ]]; then + error "Function with name ${ARGS[0]} does not exist" && return 2 + fi + # Initialize fixtures + [[ $FIXTURE -eq 1 ]] && ECOCODE_DOCKER_ENV="test_docker_env" + # execute function "${ARGS[@]}" return $? } @@ -311,25 +342,24 @@ function execute_tasks() { if [[ $DISPLAY_LOGS -gt 0 ]]; then ! display_logs && return 11 fi - return 0 } # Main function. function main() { ARGS=() - HELP=0 VERBOSE=0 FORCE=0 + HELP=0 VERBOSE=0 FORCE=0 TEST=0 FIXTURE=0 INIT=0 START=0 STOP=0 CLEAN=0 RELEASE=0 BUILD=0 COMPILE=0 BUILD_DOCKER=0 DISPLAY_LOGS=0 # Check options passed as script parameters and execute tasks ! check_opts "$@" && return 1 # Used by unit tests to execute a function - if [[ -n "${ARGS[0]}" ]]; then - execute_function + if [[ $TEST -gt 0 ]]; then + execute_unit_test return $? fi # Execute one or more tasks according to script parameters - ! execute_tasks && return 2 + ! execute_tasks && return $? return 0 } diff --git a/utils_bash.sh b/utils_bash.sh index c60c8e5..ab9dc15 100755 --- a/utils_bash.sh +++ b/utils_bash.sh @@ -64,14 +64,6 @@ function generate_doc() { return 0 } -# @description Start the mkdocs server to browse the API documentation in a browser. -# @exitcode 0 If successful. -function mkdocs_server_start() { - info "Start the mkdocs server" - mkdocs serve -a 0.0.0.0:8000 - return 0 -} - # @description Display help. # @exitcode 0 If successful. function display_help() { @@ -82,7 +74,6 @@ ${COLORS[YELLOW]}Commands:${COLORS[NOCOLOR]} ${COLORS[GREEN]}test${COLORS[WHITE]} Run unit tests ${COLORS[GREEN]}lint${COLORS[WHITE]} Linter the application's bash code ${COLORS[GREEN]}doc${COLORS[WHITE]} Generate API documentation -${COLORS[GREEN]}mkdocs${COLORS[WHITE]} Start the mkdocs server ${COLORS[YELLOW]}Options:${COLORS[NOCOLOR]} ${COLORS[GREEN]}-h, --help${COLORS[WHITE]} Display help ${COLORS[GREEN]}-v, --verbose${COLORS[WHITE]} Make the command more talkative @@ -99,14 +90,13 @@ function check_opts() { test) UNIT_TEST=1 ;; lint) LINT=1 ;; doc) GENERATE_DOC=1 ;; - mkdocs) MKDOCS=1 ;; --verbose) VERBOSE=1 ;; --help) HELP=1 ;; *) ARGS+=("$opt") ;; esac done # Help is displayed if no option is passed as script parameter - if [[ $((HELP+UNIT_TEST+LINT+GENERATE_DOC+MKDOCS)) -eq 0 ]]; then + if [[ $((HELP+UNIT_TEST+LINT+GENERATE_DOC)) -eq 0 ]]; then HELP=1 fi return 0 @@ -131,10 +121,6 @@ function execute_tasks() { if [[ $GENERATE_DOC -gt 0 ]]; then ! generate_doc && return 4 fi - # Start the mkdocs server to browse the API documentation in a browser - if [[ $MKDOCS -gt 0 ]]; then - ! mkdocs_server_start && return 5 - fi return 0 } @@ -142,7 +128,7 @@ function execute_tasks() { function main() { ARGS=() HELP=0 VERBOSE=0 - UNIT_TEST=0 LINT=0 GENERATE_DOC=0 MKDOCS=0 + UNIT_TEST=0 LINT=0 GENERATE_DOC=0 # Check options passed as script parameters and execute tasks ! check_opts "$@" && return 1 # Execute one or more tasks according to script parameters From 2cb42db31bab5dd1af133b4e6b10426cdc6875c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20Lou=C3=ABt?= Date: Wed, 24 Jul 2024 10:05:39 +0200 Subject: [PATCH 11/15] =?UTF-8?q?=F0=9F=94=A8=20Add=20a=20github=20action?= =?UTF-8?q?=20for=20Bash=20Tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/bash_tests.yml | 49 ++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/bash_tests.yml diff --git a/.github/workflows/bash_tests.yml b/.github/workflows/bash_tests.yml new file mode 100644 index 0000000..9610e11 --- /dev/null +++ b/.github/workflows/bash_tests.yml @@ -0,0 +1,49 @@ +name: Bash Tests + +on: + pull_request: + push: + branches: + - main + tags: + - '*' + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + # Setup Python + - uses: actions/setup-python@v2 + with: + python-version: '3.12' + + # Cache the installation of Poetry itself + - name: cache poetry install + uses: actions/cache@v2 + with: + path: ~/.local + key: poetry-1.7.1-0 + + # Install Poetry + - uses: snok/install-poetry@v1 + with: + version: 1.8.3 + virtualenvs-create: true + virtualenvs-in-project: true + + # Cache dependencies + - name: cache deps + id: cache-deps + uses: actions/cache@v2 + with: + path: .venv + key: pydeps-${{ hashFiles('**/poetry.lock') }} + + # Install dependencies + - run: poetry install --no-interaction --no-root + if: steps.cache-deps.outputs.cache-hit != 'true' + + # Run tests + - run: poetry run pytest tests/test_*.py From 6769ec07706fe3b909441b3d79590436504e5326 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20Lou=C3=ABt?= Date: Wed, 24 Jul 2024 10:15:06 +0200 Subject: [PATCH 12/15] =?UTF-8?q?=F0=9F=94=A8=20Add=20condition=20for=20pu?= =?UTF-8?q?blishing=20image=20in=20github=20action?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build_container.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_container.yml b/.github/workflows/build_container.yml index eda94a3..235ffa4 100644 --- a/.github/workflows/build_container.yml +++ b/.github/workflows/build_container.yml @@ -71,6 +71,7 @@ jobs: - name: Publish image id: push uses: docker/build-push-action@v4 + if: github.event_name == 'pull_request' && github.event.action == 'closed' with: push: true tags: ${{ steps.meta.outputs.tags }} From 02f6f5b902a9261c9304fcec2e5aaa373619b9e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20Lou=C3=ABt?= Date: Wed, 24 Jul 2024 10:29:02 +0200 Subject: [PATCH 13/15] =?UTF-8?q?=F0=9F=94=A8=20Added=20a=20patch=20to=20c?= =?UTF-8?q?opy=20the=20jar=20file=20and=20updated=20toolbox.sh=20script=20?= =?UTF-8?q?parameters?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 8 ++++++-- tests/test_toolbox.py | 2 +- toolbox.sh | 11 +++++------ 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index f907cf2..579dcf7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,16 +2,20 @@ ARG MAVEN_BUILDER_VERSION ARG SONARQUBE_VERSION -ARG ECOCODE_SRC_PATH=/usr/src/ecocode -ARG SONARQUBE_PLUGINS_PATH=/opt/sonarqube/extensions/plugins/ FROM maven:${MAVEN_BUILDER_VERSION} AS builder +ARG ECOCODE_SRC_PATH=/usr/src/ecocode + COPY . ${ECOCODE_SRC_PATH} WORKDIR ${ECOCODE_SRC_PATH} RUN ${ECOCODE_SRC_PATH}/toolbox.sh build FROM sonarqube:${SONARQUBE_VERSION} + +ARG ECOCODE_SRC_PATH=/usr/src/ecocode +ARG SONARQUBE_PLUGINS_PATH=/opt/sonarqube/extensions/plugins/ + COPY --from=builder ${ECOCODE_SRC_PATH}/target/ecocode-*.jar ${SONARQUBE_PLUGINS_PATH} USER sonarqube diff --git a/tests/test_toolbox.py b/tests/test_toolbox.py index ec0ee94..ca16183 100644 --- a/tests/test_toolbox.py +++ b/tests/test_toolbox.py @@ -211,5 +211,5 @@ def test_release_push(shell): def test_display_help(shell): ret = shell.run(script, "display_help", "--test") - assert len(ret.stdout.splitlines()) == 19 + assert len(ret.stdout.splitlines()) == 18 assert ret.returncode == 0 diff --git a/toolbox.sh b/toolbox.sh index 5e5f458..6ba1e9f 100755 --- a/toolbox.sh +++ b/toolbox.sh @@ -237,12 +237,11 @@ $(colors 'G')build-docker$(colors 'W') Build Docker services $(colors 'G')release$(colors 'W') Create a new release $(colors 'G')release-push$(colors 'W') Push the new release $(colors 'Y')Options:$(colors 'N') +$(colors 'G')--token=$(colors 'W') Creating containers with previously created token +$(colors 'G')-v, --verbose$(colors 'W') Make the command more talkative $(colors 'G')-l, --logs$(colors 'W') Display Docker container logs -$(colors 'G')-p, --push$(colors 'W') Push the new release $(colors 'G')-f, --force$(colors 'W') To delete the target folder or recompile the source code -$(colors 'G')--token=$(colors 'W') Creating containers with previously created token $(colors 'G')-h, --help$(colors 'W') Display help -$(colors 'G')-v, --verbose$(colors 'W') Make the command more talkative " echo -e "$output\n"|sed '1d; $d' return 0 @@ -263,9 +262,9 @@ function check_opts() { compile) COMPILE=1 ; ARGS+=("$opt") ;; build-docker) BUILD_DOCKER=1 ; ARGS+=("$opt") ;; --token=*) ECOCODE_TOKEN=$(echo "$opt"|awk -F= '{print $2}') ;; - --logs) DISPLAY_LOGS=1 ;; - --verbose) VERBOSE=1 ;; - --force) FORCE=1 ;; + --verbose|-v) VERBOSE=1 ;; + --logs|-l) DISPLAY_LOGS=1 ;; + --force|-f) FORCE=1 ;; --test) TEST=1 ;; --fixture=*) FIXTURE=$(echo "$opt"|awk -F= '{print $2}') ;; --help) HELP=1 ;; From c8cba334f27d4ca36ada659bdb2c21916d505fff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20Lou=C3=ABt?= Date: Wed, 24 Jul 2024 10:34:43 +0200 Subject: [PATCH 14/15] =?UTF-8?q?=F0=9F=94=A8=20Add=20SONAR=5FLOG=5FLEVEL?= =?UTF-8?q?=5FWEB=20environment=20variable?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .default.docker.env | 1 + toolbox.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.default.docker.env b/.default.docker.env index aed2dd9..8f5d0ac 100644 --- a/.default.docker.env +++ b/.default.docker.env @@ -1,5 +1,6 @@ MAVEN_BUILDER_VERSION=3-openjdk-17-slim SONARQUBE_VERSION=10.6.0-community POSTGRES_VERSION=12 +SONAR_LOG_LEVEL_WEB=INFO DOCKER_BUILDKIT=1 COMPOSE_DOCKER_CLI_BUILD=1 diff --git a/toolbox.sh b/toolbox.sh index 6ba1e9f..855f58e 100755 --- a/toolbox.sh +++ b/toolbox.sh @@ -284,7 +284,7 @@ function execute_unit_test() { error "No function to execute" && return 1 fi # If a function is passed as the first argument, we check that it exists - if [[ -n "${ARGS[0]}" ]] && ! [[ $(type -t "${ARGS[0]}") == function ]]; then + if ! [[ $(type -t "${ARGS[0]}") == function ]]; then error "Function with name ${ARGS[0]} does not exist" && return 2 fi # Initialize fixtures From b7fec573d767d6e94bcade7baae2e43557aafcc3 Mon Sep 17 00:00:00 2001 From: Chris Date: Wed, 24 Jul 2024 19:12:28 +0200 Subject: [PATCH 15/15] test toolbox --- toolbox.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolbox.Dockerfile b/toolbox.Dockerfile index ebc75a8..ef18a3a 100644 --- a/toolbox.Dockerfile +++ b/toolbox.Dockerfile @@ -13,8 +13,8 @@ ENV POETRY_NO_INTERACTION=1 \ PIP_DEFAULT_TIMEOUT=100 \ POETRY_VERSION=1.8.3 -RUN pip install "poetry==$POETRY_VERSION" RUN apk add --update --no-cache gcc libc-dev musl-dev linux-headers python3-dev +RUN pip install "poetry==$POETRY_VERSION" WORKDIR /app COPY pyproject.toml poetry.lock ./ RUN --mount=type=cache,target=$POETRY_CACHE_DIR poetry install --no-root --no-ansi