From 7ebc31aae9b472aeeea9934f185a957fdebb94cb Mon Sep 17 00:00:00 2001 From: NikitaZotov Date: Fri, 15 Nov 2024 01:53:18 +0300 Subject: [PATCH 01/27] feat: replace deprecated option in config with new ones --- ostis-web-platform.ini | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ostis-web-platform.ini b/ostis-web-platform.ini index f98beca5..3a62afcd 100644 --- a/ostis-web-platform.ini +++ b/ostis-web-platform.ini @@ -9,8 +9,8 @@ dump_memory_period = 3600 dump_memory_statistics = false dump_memory_statistics_period = 1200 -repo_path = kb.bin -extensions_path = sc-machine/bin/extensions +storage = kb.bin +extensions = sc-machine/bin/extensions log_type = Console log_file = sc-machine/sc-memory.log @@ -35,9 +35,8 @@ log_file = sc-machine/sc-server.log log_level = Info [sc-builder] -log_file = sc-machine/scripts/sc_builder.log - -input_path = repo.path +input = repo.path +output = kb.bin [sc-component-manager] knowledge_base_components_path = kb From 9b64871fa430289796d014a253682fbd80aa2863 Mon Sep 17 00:00:00 2001 From: NikitaZotov Date: Fri, 15 Nov 2024 01:53:31 +0300 Subject: [PATCH 02/27] feat: remove run_sc_server.sh --- scripts/run_sc_server.sh | 9 --------- 1 file changed, 9 deletions(-) delete mode 100755 scripts/run_sc_server.sh diff --git a/scripts/run_sc_server.sh b/scripts/run_sc_server.sh deleted file mode 100755 index 41f5185f..00000000 --- a/scripts/run_sc_server.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash -set -eo pipefail - -if [ -z "${SC_MACHINE_PATH}" ]; -then - source "$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)/set_vars.sh" -fi - -"${SC_MACHINE_PATH}/scripts/run_sc_server.sh" "$@" From 892c61409fcd12532137fefdbfce76fbffd40580 Mon Sep 17 00:00:00 2001 From: NikitaZotov Date: Fri, 13 Dec 2024 19:48:34 +0300 Subject: [PATCH 03/27] scripts: remove install deps, build and run scripts --- scripts/build_kb.sh | 9 ----- scripts/build_platform.sh | 14 ------- scripts/build_sc_component_manager.sh | 9 ----- scripts/build_sc_machine.sh | 9 ----- scripts/build_sc_web.sh | 9 ----- scripts/build_scp_machine.sh | 9 ----- scripts/install_dependencies.sh | 45 ---------------------- scripts/install_minimal_platform.sh | 5 --- scripts/install_platform.sh | 6 --- scripts/install_sc_machine_dependencies.sh | 16 -------- scripts/install_sc_web_dependencies.sh | 16 -------- scripts/run_sc_machine.sh | 9 ----- scripts/run_sc_web.sh | 9 ----- scripts/set_vars.sh | 23 ----------- 14 files changed, 188 deletions(-) delete mode 100755 scripts/build_kb.sh delete mode 100755 scripts/build_platform.sh delete mode 100755 scripts/build_sc_component_manager.sh delete mode 100755 scripts/build_sc_machine.sh delete mode 100755 scripts/build_sc_web.sh delete mode 100755 scripts/build_scp_machine.sh delete mode 100755 scripts/install_dependencies.sh delete mode 100755 scripts/install_sc_machine_dependencies.sh delete mode 100755 scripts/install_sc_web_dependencies.sh delete mode 100755 scripts/run_sc_machine.sh delete mode 100755 scripts/run_sc_web.sh diff --git a/scripts/build_kb.sh b/scripts/build_kb.sh deleted file mode 100755 index e97e3b1a..00000000 --- a/scripts/build_kb.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash -set -eo pipefail - -if [ -z "${SC_MACHINE_PATH}" ]; -then - source "$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)/set_vars.sh" -fi - -"${SC_MACHINE_PATH}/scripts/build_kb.sh" "$@" diff --git a/scripts/build_platform.sh b/scripts/build_platform.sh deleted file mode 100755 index 102ed78b..00000000 --- a/scripts/build_platform.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash -set -eo pipefail - -CURRENT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd) -source "${CURRENT_DIR}/formats.sh" - -stage "Build ostis-web-platform" - -"${CURRENT_DIR}/build_sc_machine.sh" "$@" -"${CURRENT_DIR}/build_scp_machine.sh" "$@" -"${CURRENT_DIR}/build_sc_component_manager.sh" "$@" -"${CURRENT_DIR}/build_sc_web.sh" "$@" - -stage "ostis-web-platform is built successfully" diff --git a/scripts/build_sc_component_manager.sh b/scripts/build_sc_component_manager.sh deleted file mode 100755 index a9718404..00000000 --- a/scripts/build_sc_component_manager.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash -set -eo pipefail - -if [ -z "${SC_COMPONENT_MANAGER_PATH}" ]; -then - source "$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)/set_vars.sh" -fi - -"${SC_COMPONENT_MANAGER_PATH}/scripts/build_sc_component_manager.sh" "$@" diff --git a/scripts/build_sc_machine.sh b/scripts/build_sc_machine.sh deleted file mode 100755 index 9fdbabcd..00000000 --- a/scripts/build_sc_machine.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash -set -eo pipefail - -if [ -z "${SC_MACHINE_PATH}" ]; -then - source "$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)/set_vars.sh" -fi - -"${SC_MACHINE_PATH}/scripts/build_sc_machine.sh" "$@" diff --git a/scripts/build_sc_web.sh b/scripts/build_sc_web.sh deleted file mode 100755 index 8d7ecae8..00000000 --- a/scripts/build_sc_web.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash -set -eo pipefail - -if [ -z "${SC_WEB_PATH}" ]; -then - source "$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)/set_vars.sh" -fi - -"${SC_WEB_PATH}/scripts/build_sc_web.sh" "$@" diff --git a/scripts/build_scp_machine.sh b/scripts/build_scp_machine.sh deleted file mode 100755 index c8f966c7..00000000 --- a/scripts/build_scp_machine.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash -set -eo pipefail - -if [ -z "${SCP_MACHINE_PATH}" ]; -then - source "$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)/set_vars.sh" -fi - -"${SCP_MACHINE_PATH}/scripts/build_scp_machine.sh" "$@" diff --git a/scripts/install_dependencies.sh b/scripts/install_dependencies.sh deleted file mode 100755 index 922f0252..00000000 --- a/scripts/install_dependencies.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env bash -set -eo pipefail - -SCRIPTS_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd) -source "${SCRIPTS_DIR}/formats.sh" - -if [[ -z "${SC_MACHINE_PATH}" || -z "${SC_WEB_PATH}" ]]; -then - source "${SCRIPTS_DIR}/set_vars.sh" -fi - -function usage() { - cat </dev/null 2>&1 && pwd) -source "${SCRIPTS_DIR}/formats.sh" - -if [ -z "${SC_MACHINE_PATH}" ]; -then - source "${SCRIPTS_DIR}/set_vars.sh" -fi - -stage "Install sc-machine dependencies" - -"${SC_MACHINE_PATH}/scripts/install_dependencies.sh" "$@" - -stage "Dependencies of sc-machine installed successfully" diff --git a/scripts/install_sc_web_dependencies.sh b/scripts/install_sc_web_dependencies.sh deleted file mode 100755 index 86abd080..00000000 --- a/scripts/install_sc_web_dependencies.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash -set -eo pipefail - -SCRIPTS_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd) -source "${SCRIPTS_DIR}/formats.sh" - -if [ -z "${SC_WEB_PATH}" ]; -then - source "${SCRIPTS_DIR}/set_vars.sh" -fi - -stage "Install sc-web dependencies" - -"${SC_WEB_PATH}/scripts/install_dependencies.sh" "$@" - -stage "Dependencies of sc-web installed successfully" diff --git a/scripts/run_sc_machine.sh b/scripts/run_sc_machine.sh deleted file mode 100755 index 94f54e91..00000000 --- a/scripts/run_sc_machine.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash -set -eo pipefail - -if [ -z "${SC_MACHINE_PATH}" ]; -then - source "$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)/set_vars.sh" -fi - -"${SC_MACHINE_PATH}/scripts/run_sc_machine.sh" "$@" diff --git a/scripts/run_sc_web.sh b/scripts/run_sc_web.sh deleted file mode 100755 index fadc1f59..00000000 --- a/scripts/run_sc_web.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash -set -eo pipefail - -if [ -z "${SC_WEB_PATH}" ]; -then - source "$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)/set_vars.sh" -fi - -"${SC_WEB_PATH}/scripts/run_sc_web.sh" "$@" diff --git a/scripts/set_vars.sh b/scripts/set_vars.sh index 0fcd6b76..f66d0d2d 100755 --- a/scripts/set_vars.sh +++ b/scripts/set_vars.sh @@ -5,9 +5,6 @@ ROOT_PATH=$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && cd .. && pw export PLATFORM_PATH="${PLATFORM_PATH:-${ROOT_PATH}}" -export CONFIG_PATH="${CONFIG_PATH:-${PLATFORM_PATH}/ostis-web-platform.ini}" -export REPO_PATH="${REPO_PATH:-${PLATFORM_PATH}/repo.path}" - export SC_MACHINE_REPO="${SC_MACHINE_REPO:-https://github.com/ostis-ai/sc-machine.git}" export SC_MACHINE_BRANCH="${SC_MACHINE_BRANCH:-main}" export SC_MACHINE_COMMIT="${SC_MACHINE_COMMIT:-""}" @@ -32,23 +29,3 @@ export IMS_KB_REPO="${IMS_KB_REPO:-https://github.com/ostis-ai/ims.ostis.kb.git} export IMS_KB_BRANCH="${IMS_KB_BRANCH:-main}" export IMS_KB_COMMIT="${IMS_KB_COMMIT:-""}" export IMS_KB_PATH="${IMS_KB_PATH:-${PLATFORM_PATH}/kb/ims.ostis.kb}" - -if [ -d "${SC_MACHINE_PATH}" ]; -then - source "${SC_MACHINE_PATH}/scripts/set_vars.sh" -fi - -if [ -d "${SCP_MACHINE_PATH}" ]; -then - source "${SCP_MACHINE_PATH}/scripts/set_vars.sh" -fi - -if [ -d "${SC_COMPONENT_MANAGER_PATH}" ]; -then - source "${SC_COMPONENT_MANAGER_PATH}/scripts/set_vars.sh" -fi - -if [ -d "${SC_WEB_PATH}" ]; -then - source "${SC_WEB_PATH}/scripts/set_vars.sh" -fi From 04086087d9aee5198466aa1a101a399cda37c8a2 Mon Sep 17 00:00:00 2001 From: NikitaZotov Date: Fri, 13 Dec 2024 19:51:28 +0300 Subject: [PATCH 04/27] docs: apply changes --- docs/changelog.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/changelog.md b/docs/changelog.md index c065ab0a..975f40cb 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -8,13 +8,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added -- Script `run_sc_machine.sh` -- Script `build_scp_machine.sh` - Install scp-machine - Script `install_minimal_platform.sh` -- Script `build_platform.sh` - Script `update_submodules.sh` -- Script `build_sc_component_manager.sh` - Install sc-component-manager ### Changed @@ -26,6 +22,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Option `--update` in `install_submodules.sh` +### Removed + +- Script `run_sc_server.sh` +- Script `run_sc_web.sh` +- Script `build_kb.sh` +- Script `build_sc_machine.sh` +- Script `install_dependencies.sh` + ## [0.9.0-Unlock] - 22.01.2024 ### Changes From 167ce2381c129795516c9cb23ff041826cd143db Mon Sep 17 00:00:00 2001 From: NikitaZotov Date: Fri, 13 Dec 2024 19:55:39 +0300 Subject: [PATCH 05/27] ci: remove running sc-machine --- .github/workflows/minimal_install.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/minimal_install.yml b/.github/workflows/minimal_install.yml index dea5d6c0..c70f8b08 100644 --- a/.github/workflows/minimal_install.yml +++ b/.github/workflows/minimal_install.yml @@ -38,4 +38,3 @@ jobs: cd scripts ./set_vars.sh ./install_minimal_platform.sh - ./run_sc_machine.sh -t From e80c9b7bce2b40b105e8762efbab7625a6bfa6bf Mon Sep 17 00:00:00 2001 From: NikitaZotov Date: Sun, 22 Dec 2024 15:01:45 +0300 Subject: [PATCH 06/27] docs: update readme --- README.md | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 3c564207..1d88ea8e 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![license](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE) -It is the repository of the Platform of the [OSTIS Technology](https://github.com/ostis-ai). Platform OSTIS is intended to be a solid framework to help you deploy existing and create new ostis-systems. +It is the repository of the Platform of the [OSTIS Technology](https://github.com/ostis-ai). OSTIS Platform is intended to be a solid framework to help you deploy existing and create new ostis-systems. OSTIS Platform contains: @@ -59,28 +59,15 @@ To learn more about the platform, check out our [documentation](https://github.c ```sh git clone https://github.com/ostis-ai/ostis-web-platform --recursive cd ostis-web-platform - ./scripts/install_submodules.sh # download all submodules without compilation. + ./scripts/install_submodules.sh # download all submodules docker compose build ``` -- Natively (using sc-component-manager) - - ```sh - git clone https://github.com/ostis-ai/ostis-web-platform - cd ostis-web-platform - ./scripts/install_minimal_platform.sh - ./scripts/run_sc_machine.sh - # and write write the following commands in the terminal: - # components init - # components install sc_web - # components install knowledge_base_ims - ``` - - Natively - Note: Currently, only Linux (Ubuntu-20.04, Ubuntu-22.04) and macOS are supported by this installation method. If you're going to use it, it might take a while to download dependencies and compile the components. Use it only if you know what you're doing! + Note: Currently, only Linux (Ubuntu-22.04, Ubuntu-24.04) and macOS are supported by this installation method. ```sh git clone https://github.com/ostis-ai/ostis-web-platform --recursive @@ -117,8 +104,7 @@ to provide opportunity to use it in information processing and knowledge generat You can access the current version of the documentation in [docs/main.pdf](docs/main.pdf) file of this project. -Documentation is written with -the help of LaTeX tools in SCn-code representation. To build documentation manually, you'll need a LaTeX distribution installed on your computer. Alternatively, we provide a Docker image to build the documentation in case you can't / don't want to install LaTeX on your PC. +Documentation is written with the help of LaTeX tools in SCn-code representation. To build documentation manually, you'll need a LaTeX distribution installed on your computer. Alternatively, we provide a Docker image to build the documentation in case you can't / don't want to install LaTeX on your PC. ### Download scn-tex-plugin and documentation for subprojects From 9af2b321843489a95292d49cd3e9c706479b490d Mon Sep 17 00:00:00 2001 From: NikitaZotov Date: Sun, 22 Dec 2024 15:01:58 +0300 Subject: [PATCH 07/27] git: ignore .DS_store --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index f1e59279..6dde61d9 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ build .idea __pycache__ .vscode +.DS_Store # texstudio *.aux From 07af5eb7854c5168c1d73fcad03e14777356973d Mon Sep 17 00:00:00 2001 From: NikitaZotov Date: Mon, 23 Dec 2024 15:06:16 +0300 Subject: [PATCH 08/27] docs: apply changes --- docs/changelog.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/changelog.md b/docs/changelog.md index 975f40cb..8dac53bf 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Breaking changes + +- All build and run scripts have been removed. This was done due to changes in the build system of the machine. So now this repository is most suitable for developers, not for consumers. + ### Added - Install scp-machine From a308b464a04592c966883d2fc9e67343bc30d727 Mon Sep 17 00:00:00 2001 From: NikitaZotov Date: Mon, 23 Dec 2024 15:40:24 +0300 Subject: [PATCH 09/27] docs: describe build and run submodules --- README.md | 48 ++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 40 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 1d88ea8e..022f2a27 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,9 @@ To learn more about the platform, check out our [documentation](https://github.c ```sh git clone https://github.com/ostis-ai/ostis-web-platform --recursive cd ostis-web-platform - ./scripts/install_submodules.sh # download all submodules + # download all submodules + ./scripts/install_submodules.sh + # build sc-machine, scp-machine and sc-component-manager docker compose build ``` @@ -72,7 +74,37 @@ To learn more about the platform, check out our [documentation](https://github.c ```sh git clone https://github.com/ostis-ai/ostis-web-platform --recursive cd ostis-web-platform - ./scripts/install_platform.sh + ./scripts/install_submodules.sh + + # to build sc-machine, see https://ostis-ai.github.io/sc-machine/build/quick_start/#start-develop-sc-machine-with-conan + cd sc-machine + # make sure, that you have `conan`, updated `cmake` and `ninja` + cmake --preset debug-conan + cmake --build --preset debug + conan export-pkg . + cd .. + + # to build scp-machine, see https://ostis-ai.github.io/scp-machine/build/quick_start/#start-develop-sc-machine-with-conan + cd scp-machine + conan install . -s build_type=Debug + cmake --preset debug-conan + cmake --build --preset debug + cd .. + + # to build sc-component-manager, see https://ostis-ai.github.io/sc-component-manager/build/quick_start/#start-develop-sc-machine-with-conan + cd sc-component-manager + conan install . -s build_type=Debug + cmake --preset debug-conan + cmake --build --preset debug + cd .. + + # to build sc-web, see https://github.com/ostis-ai/sc-web/blob/main/README.md + cd sc-web + ./scripts/install_dependencies.sh + npm run build + python3 server/app.py + + # after building projects there should be three folders `build/Debug` in sc-machine, scp-machine and sc-component-manager ``` ## Usage @@ -81,7 +113,8 @@ To learn more about the platform, check out our [documentation](https://github.c ```sh # build the knowledge base - # required before the first startup (or if you've made updates to KB sources) + # required before the first startup + # (or if you've made updates to knowledge base sources) docker compose run machine build # start platform services and run web interface at localhost:8000 docker compose up @@ -90,11 +123,10 @@ To learn more about the platform, check out our [documentation](https://github.c - Native installation ```sh - # launch semantic network processing machine - ./scripts/run_sc_machine.sh - # *in another terminal* - # launch semantic interfaces interpreter at localhost:8000 - ./scripts/run_sc_web.sh + # to run sc-machine, see https://ostis-ai.github.io/sc-machine/build/quick_start/#run-sc-machine-in-debug + ./sc-machine/build/Debug/bin/sc-builder -i repo.path -o kb.bin --clear + ./sc-machine/build/Debug/bin/sc-machine -s kb.bin \ + -e "sc-machine/build/Debug/lib/extensions;scp-machine/build/Debug/lib/extensions;sc-component-manager/build/Debug/lib/extensions" ``` ## Documentation From 262882ade8e002fdf906f3089bc1ad0f9ebc93b5 Mon Sep 17 00:00:00 2001 From: NikitaZotov Date: Mon, 23 Dec 2024 15:40:56 +0300 Subject: [PATCH 10/27] scripts: remove install platform scripts --- scripts/formats.sh | 5 ----- ...imal_platform.sh => install_minimal_submodules.sh} | 4 ++-- scripts/install_platform.sh | 11 ----------- 3 files changed, 2 insertions(+), 18 deletions(-) rename scripts/{install_minimal_platform.sh => install_minimal_submodules.sh} (80%) delete mode 100755 scripts/install_platform.sh diff --git a/scripts/formats.sh b/scripts/formats.sh index 85f0f1e0..3d232880 100644 --- a/scripts/formats.sh +++ b/scripts/formats.sh @@ -1,8 +1,3 @@ -stage() -{ - ([ -n "$(tput setaf 1 2<&-)" ] && { tput setaf 4 && tput bold && echo "$1" && tput sgr0; }) || echo "$@" -} - warning() { ([ -n "$(tput setaf 1 2<&-)" ] && { tput setaf 3 && tput bold && echo "$1" && tput sgr0; }) || echo "$@" diff --git a/scripts/install_minimal_platform.sh b/scripts/install_minimal_submodules.sh similarity index 80% rename from scripts/install_minimal_platform.sh rename to scripts/install_minimal_submodules.sh index 8ef518f8..6362e6fc 100755 --- a/scripts/install_minimal_platform.sh +++ b/scripts/install_minimal_submodules.sh @@ -5,10 +5,10 @@ SCRIPTS_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd) SUBMODULE_SCRIPTS_DIR="${SCRIPTS_DIR}/submodule-scripts" source "${SCRIPTS_DIR}/formats.sh" -stage "Install ostis-web-platform" +stage "Clone submodules" "${SUBMODULE_SCRIPTS_DIR}/install_sc_machine.sh" "${SUBMODULE_SCRIPTS_DIR}/install_scp_machine.sh" "${SUBMODULE_SCRIPTS_DIR}/install_sc_component_manager.sh" -stage "ostis-web-platform is installed successfully" +stage "Submodules cloned successfully" diff --git a/scripts/install_platform.sh b/scripts/install_platform.sh deleted file mode 100755 index 5106a2da..00000000 --- a/scripts/install_platform.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash -set -eo pipefail - -SCRIPTS_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd) -source "${SCRIPTS_DIR}/formats.sh" - -stage "Install ostis-web-platform" - -"${SCRIPTS_DIR}/install_submodules.sh" - -stage "ostis-web-platform is installed successfully" From 6aa890ecd0fe1ad0655e9950678a605f6fbbf6aa Mon Sep 17 00:00:00 2001 From: NikitaZotov Date: Mon, 23 Dec 2024 15:42:06 +0300 Subject: [PATCH 11/27] docs: apply changes --- docs/changelog.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/changelog.md b/docs/changelog.md index 8dac53bf..e370e959 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -13,7 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Install scp-machine -- Script `install_minimal_platform.sh` +- Script `install_minimal_submodules.sh` - Script `update_submodules.sh` - Install sc-component-manager @@ -33,6 +33,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Script `build_kb.sh` - Script `build_sc_machine.sh` - Script `install_dependencies.sh` +- Script `install_platform.sh` ## [0.9.0-Unlock] - 22.01.2024 From 63d1894caeaaaa64801f647f6ec2d13e7cae216f Mon Sep 17 00:00:00 2001 From: NikitaZotov Date: Wed, 25 Dec 2024 20:28:07 +0300 Subject: [PATCH 12/27] ci: install submobules --- .github/workflows/install.yml | 2 +- .github/workflows/minimal_install.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml index 03ad6c69..2ce4dd08 100644 --- a/.github/workflows/install.yml +++ b/.github/workflows/install.yml @@ -37,4 +37,4 @@ jobs: run: | cd scripts ./set_vars.sh - ./install_platform.sh + ./install_submodules.sh diff --git a/.github/workflows/minimal_install.yml b/.github/workflows/minimal_install.yml index c70f8b08..802b878e 100644 --- a/.github/workflows/minimal_install.yml +++ b/.github/workflows/minimal_install.yml @@ -37,4 +37,4 @@ jobs: run: | cd scripts ./set_vars.sh - ./install_minimal_platform.sh + ./install_minimal_submodules.sh From e8114f43da3f5cb224100452f7bd66128f91b79b Mon Sep 17 00:00:00 2001 From: NikitaZotov Date: Wed, 25 Dec 2024 20:30:01 +0300 Subject: [PATCH 13/27] scripts: revert stage --- scripts/formats.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/formats.sh b/scripts/formats.sh index 3d232880..85f0f1e0 100644 --- a/scripts/formats.sh +++ b/scripts/formats.sh @@ -1,3 +1,8 @@ +stage() +{ + ([ -n "$(tput setaf 1 2<&-)" ] && { tput setaf 4 && tput bold && echo "$1" && tput sgr0; }) || echo "$@" +} + warning() { ([ -n "$(tput setaf 1 2<&-)" ] && { tput setaf 3 && tput bold && echo "$1" && tput sgr0; }) || echo "$@" From a3614d86aa7c99ccde80232358b8146121da4c06 Mon Sep 17 00:00:00 2001 From: NikitaZotov Date: Mon, 13 Jan 2025 13:35:15 +0300 Subject: [PATCH 14/27] docker: update path to sc-machine binaries --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 966d136e..3c9980be 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -36,7 +36,7 @@ services: # Use the commented env variable if you need to rebuild KB every startup. #- "REBUILD_KB=1" - "KB_PATH=/kb/repo.path" - - "BINARY_PATH=/sc-machine/bin" + - "BINARY_PATH=/sc-machine/build/Release/bin" - "CONFIG_PATH=/kb/ostis-web-platform.ini" command: - "run" From 082d945ff10d982236da49c9201a9d6cd88d1306 Mon Sep 17 00:00:00 2001 From: NikitaZotov Date: Mon, 13 Jan 2025 13:35:29 +0300 Subject: [PATCH 15/27] docker: add path to sc-machine extensions --- docker-compose.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.yml b/docker-compose.yml index 3c9980be..e09dbdb1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -37,6 +37,7 @@ services: #- "REBUILD_KB=1" - "KB_PATH=/kb/repo.path" - "BINARY_PATH=/sc-machine/build/Release/bin" + - "EXTENSIONS_PATH=/sc-machine/build/Release/lib/extensions" - "CONFIG_PATH=/kb/ostis-web-platform.ini" command: - "run" From 1266b70052f7dd03e61220c719ca12294cd58596 Mon Sep 17 00:00:00 2001 From: NikitaZotov Date: Mon, 13 Jan 2025 17:23:20 +0300 Subject: [PATCH 16/27] feat(docker): set sc-server host to 0.0.0.0 by default --- docker-compose.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.yml b/docker-compose.yml index e09dbdb1..f7329a37 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -39,6 +39,7 @@ services: - "BINARY_PATH=/sc-machine/build/Release/bin" - "EXTENSIONS_PATH=/sc-machine/build/Release/lib/extensions" - "CONFIG_PATH=/kb/ostis-web-platform.ini" + - "SC_SERVER_HOST=0.0.0.0" command: - "run" From 020504bc5929255a92702b4490190cc58493a9c9 Mon Sep 17 00:00:00 2001 From: NikitaZotov Date: Fri, 31 Jan 2025 14:54:11 +0300 Subject: [PATCH 17/27] docs: fix links in readme --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 022f2a27..81a74de5 100644 --- a/README.md +++ b/README.md @@ -84,14 +84,14 @@ To learn more about the platform, check out our [documentation](https://github.c conan export-pkg . cd .. - # to build scp-machine, see https://ostis-ai.github.io/scp-machine/build/quick_start/#start-develop-sc-machine-with-conan + # to build scp-machine, see https://ostis-ai.github.io/scp-machine/build/quick_start/#start-develop-scp-machine-with-conan cd scp-machine conan install . -s build_type=Debug cmake --preset debug-conan cmake --build --preset debug cd .. - # to build sc-component-manager, see https://ostis-ai.github.io/sc-component-manager/build/quick_start/#start-develop-sc-machine-with-conan + # to build sc-component-manager, see https://ostis-ai.github.io/sc-component-manager/build/quick_start/#start-develop-sc-component-manager-with-conan cd sc-component-manager conan install . -s build_type=Debug cmake --preset debug-conan @@ -102,6 +102,7 @@ To learn more about the platform, check out our [documentation](https://github.c cd sc-web ./scripts/install_dependencies.sh npm run build + source .venv/bin/activate python3 server/app.py # after building projects there should be three folders `build/Debug` in sc-machine, scp-machine and sc-component-manager From 5f7c4a26c6b5d5601ae479e21f3bd0608c6985c6 Mon Sep 17 00:00:00 2001 From: NikitaZotov Date: Fri, 31 Jan 2025 14:54:40 +0300 Subject: [PATCH 18/27] docs: rename machine to sc-machine in changelog --- docs/changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/changelog.md b/docs/changelog.md index e370e959..ecf1dcfe 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -8,7 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Breaking changes -- All build and run scripts have been removed. This was done due to changes in the build system of the machine. So now this repository is most suitable for developers, not for consumers. +- All build and run scripts have been removed. This was done due to changes in the build system of the sc-machine. So now this repository is most suitable for developers, not for consumers. ### Added From 826589565624df37ba379f39d6a2c42fc8499897 Mon Sep 17 00:00:00 2001 From: NikitaZotov Date: Fri, 31 Jan 2025 14:55:25 +0300 Subject: [PATCH 19/27] docker: update names in docker-compose --- docker-compose.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index f7329a37..a72acdb7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,6 @@ services: web: - image: ostis/sc-web:0.8.1-Unlock + image: ostis/sc-web:0.9.0 build: context: ./interface/sc-web restart: unless-stopped @@ -15,12 +15,13 @@ services: condition: service_healthy machine: - image: ostis/sc-machine:0.9.0-Unlock + image: ostis/sc-machine:0.10.0 build: context: ./sc-machine restart: unless-stopped volumes: - - ./:/kb + # TODO(NikitaZotov): Don't load all project sources to volume to build knowledge-base. + - ./:/knowledge-base - kb-binary:/kb.bin networks: - sc-machine @@ -31,14 +32,14 @@ services: interval: 5s timeout: 10s retries: 3 - start_period: 120s + # start_period: 120s environment: - # Use the commented env variable if you need to rebuild KB every startup. + # Use the commented env variable if you need to rebuild KB every startup. Also, use commented start period. #- "REBUILD_KB=1" - - "KB_PATH=/kb/repo.path" + - "KB_PATH=/knowledge-base/repo.path" - "BINARY_PATH=/sc-machine/build/Release/bin" - "EXTENSIONS_PATH=/sc-machine/build/Release/lib/extensions" - - "CONFIG_PATH=/kb/ostis-web-platform.ini" + - "CONFIG_PATH=/knowledge-base/ostis-web-platform.ini" - "SC_SERVER_HOST=0.0.0.0" command: - "run" From c5f432fdfccd9d6a1f668ab967a47bbb37bc0efc Mon Sep 17 00:00:00 2001 From: NikitaZotov Date: Fri, 31 Jan 2025 14:55:42 +0300 Subject: [PATCH 20/27] docs: bump license --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 59875b9c..11d7dd17 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ Unless otherwise indicated, the Source Code is licensed under the MIT license. -Copyright (c) 2010-2024 OSTIS +Copyright (c) 2010-2025 OSTIS Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From 6485302e4aec469c12a873f07107bc483ec603b7 Mon Sep 17 00:00:00 2001 From: NikitaZotov Date: Fri, 31 Jan 2025 15:01:52 +0300 Subject: [PATCH 21/27] refactor: rename kb to knowledge-base --- .../ostis-web-platform-components-specification.scs | 0 ostis-web-platform.ini | 2 +- repo.path | 4 ++-- scripts/set_vars.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename {kb => knowledge-base}/ostis-web-platform-components-specification.scs (100%) diff --git a/kb/ostis-web-platform-components-specification.scs b/knowledge-base/ostis-web-platform-components-specification.scs similarity index 100% rename from kb/ostis-web-platform-components-specification.scs rename to knowledge-base/ostis-web-platform-components-specification.scs diff --git a/ostis-web-platform.ini b/ostis-web-platform.ini index 3a62afcd..c880110a 100644 --- a/ostis-web-platform.ini +++ b/ostis-web-platform.ini @@ -39,6 +39,6 @@ input = repo.path output = kb.bin [sc-component-manager] -knowledge_base_components_path = kb +knowledge_base_components_path = knowledge-base problem_solver_components_path = problem-solver interface_components_path = interface diff --git a/repo.path b/repo.path index 15e3deef..69d8219a 100644 --- a/repo.path +++ b/repo.path @@ -1,5 +1,5 @@ # ostis-web-platform -kb +knowledge-base # component manager -sc-component-manager/kb +sc-component-manager/knowledge-base diff --git a/scripts/set_vars.sh b/scripts/set_vars.sh index f66d0d2d..9477af4c 100755 --- a/scripts/set_vars.sh +++ b/scripts/set_vars.sh @@ -28,4 +28,4 @@ export SC_WEB_PATH="${SC_WEB_PATH:-${PLATFORM_PATH}/interface/sc-web}" export IMS_KB_REPO="${IMS_KB_REPO:-https://github.com/ostis-ai/ims.ostis.kb.git}" export IMS_KB_BRANCH="${IMS_KB_BRANCH:-main}" export IMS_KB_COMMIT="${IMS_KB_COMMIT:-""}" -export IMS_KB_PATH="${IMS_KB_PATH:-${PLATFORM_PATH}/kb/ims.ostis.kb}" +export IMS_KB_PATH="${IMS_KB_PATH:-${PLATFORM_PATH}/knowledge-base/ims.ostis.kb}" From 0855b602abff153380bfd830867e617cac140d6a Mon Sep 17 00:00:00 2001 From: NikitaZotov Date: Fri, 31 Jan 2025 15:04:48 +0300 Subject: [PATCH 22/27] docs: fix sc-machine export --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 81a74de5..4b241c93 100644 --- a/README.md +++ b/README.md @@ -79,8 +79,8 @@ To learn more about the platform, check out our [documentation](https://github.c # to build sc-machine, see https://ostis-ai.github.io/sc-machine/build/quick_start/#start-develop-sc-machine-with-conan cd sc-machine # make sure, that you have `conan`, updated `cmake` and `ninja` - cmake --preset debug-conan - cmake --build --preset debug + cmake --preset release-conan + cmake --build --preset release conan export-pkg . cd .. From 33c6470dcfebcc7766301764e97271b2ed0847f0 Mon Sep 17 00:00:00 2001 From: NikitaZotov Date: Fri, 31 Jan 2025 15:05:40 +0300 Subject: [PATCH 23/27] docs: add build missing --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4b241c93..4777a919 100644 --- a/README.md +++ b/README.md @@ -81,19 +81,20 @@ To learn more about the platform, check out our [documentation](https://github.c # make sure, that you have `conan`, updated `cmake` and `ninja` cmake --preset release-conan cmake --build --preset release + conan install . --build=missing conan export-pkg . cd .. # to build scp-machine, see https://ostis-ai.github.io/scp-machine/build/quick_start/#start-develop-scp-machine-with-conan cd scp-machine - conan install . -s build_type=Debug + conan install . -s build_type=Debug --build=missing cmake --preset debug-conan cmake --build --preset debug cd .. # to build sc-component-manager, see https://ostis-ai.github.io/sc-component-manager/build/quick_start/#start-develop-sc-component-manager-with-conan cd sc-component-manager - conan install . -s build_type=Debug + conan install . -s build_type=Debug --build=missing cmake --preset debug-conan cmake --build --preset debug cd .. From 9f51a9f11c51afe4c257933861eb6912aaa27679 Mon Sep 17 00:00:00 2001 From: NikitaZotov Date: Mon, 3 Feb 2025 11:44:10 +0300 Subject: [PATCH 24/27] docs: fix paths to sc-machine binaries and paths to sc-web --- README.md | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 4777a919..df6b57ba 100644 --- a/README.md +++ b/README.md @@ -100,11 +100,10 @@ To learn more about the platform, check out our [documentation](https://github.c cd .. # to build sc-web, see https://github.com/ostis-ai/sc-web/blob/main/README.md - cd sc-web + cd interface/sc-web ./scripts/install_dependencies.sh npm run build - source .venv/bin/activate - python3 server/app.py + cd ../.. # after building projects there should be three folders `build/Debug` in sc-machine, scp-machine and sc-component-manager ``` @@ -117,20 +116,29 @@ To learn more about the platform, check out our [documentation](https://github.c # build the knowledge base # required before the first startup # (or if you've made updates to knowledge base sources) - docker compose run machine build + docker compose run --rm machine build # start platform services and run web interface at localhost:8000 docker compose up ``` -- Native installation +- Native + + Run in the first terminal: ```sh - # to run sc-machine, see https://ostis-ai.github.io/sc-machine/build/quick_start/#run-sc-machine-in-debug - ./sc-machine/build/Debug/bin/sc-builder -i repo.path -o kb.bin --clear - ./sc-machine/build/Debug/bin/sc-machine -s kb.bin \ + # to run sc-machine, see https://ostis-ai.github.io/sc-machine/build/quick_start/#run-sc-machine-in-release + ./sc-machine/build/Release/bin/sc-builder -i repo.path -o kb.bin --clear + ./sc-machine/build/Release/bin/sc-machine -s kb.bin -c ostis-web-platform.ini \ -e "sc-machine/build/Debug/lib/extensions;scp-machine/build/Debug/lib/extensions;sc-component-manager/build/Debug/lib/extensions" ``` + Run in the second terminal: + + ```sh + cd interface/sc-web + source .venv/bin/activate && python3 server/app.py + ``` + ## Documentation We document all information about the project development and its components' implementation in sources of its knowledge base From c9d9b3f710134bf9cd9945f67b7049e8ce7d1b88 Mon Sep 17 00:00:00 2001 From: NikitaZotov Date: Mon, 3 Feb 2025 11:44:45 +0300 Subject: [PATCH 25/27] feat(config): remove default extensions path --- ostis-web-platform.ini | 1 - 1 file changed, 1 deletion(-) diff --git a/ostis-web-platform.ini b/ostis-web-platform.ini index c880110a..ae9cb90a 100644 --- a/ostis-web-platform.ini +++ b/ostis-web-platform.ini @@ -10,7 +10,6 @@ dump_memory_statistics = false dump_memory_statistics_period = 1200 storage = kb.bin -extensions = sc-machine/bin/extensions log_type = Console log_file = sc-machine/sc-memory.log From e2132d8137239ded6a248207f870757105554a16 Mon Sep 17 00:00:00 2001 From: NikitaZotov Date: Mon, 3 Feb 2025 16:23:32 +0300 Subject: [PATCH 26/27] docs: fix paths to sc-machine binaries --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index df6b57ba..40c18cab 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ To learn more about the platform, check out our [documentation](https://github.c # download images from Docker Hub docker compose pull # build knowledge base - docker compose run machine build + docker compose run --rm machine build # launch web platform stack docker compose up ``` @@ -105,7 +105,7 @@ To learn more about the platform, check out our [documentation](https://github.c npm run build cd ../.. - # after building projects there should be three folders `build/Debug` in sc-machine, scp-machine and sc-component-manager + # after building projects there should be `build/Release` folder in sc-machine and `build/Debug` folders in scp-machine and sc-component-manager ``` ## Usage @@ -129,7 +129,7 @@ To learn more about the platform, check out our [documentation](https://github.c # to run sc-machine, see https://ostis-ai.github.io/sc-machine/build/quick_start/#run-sc-machine-in-release ./sc-machine/build/Release/bin/sc-builder -i repo.path -o kb.bin --clear ./sc-machine/build/Release/bin/sc-machine -s kb.bin -c ostis-web-platform.ini \ - -e "sc-machine/build/Debug/lib/extensions;scp-machine/build/Debug/lib/extensions;sc-component-manager/build/Debug/lib/extensions" + -e "sc-machine/build/Release/lib/extensions;scp-machine/build/Debug/lib/extensions;sc-component-manager/build/Debug/lib/extensions" ``` Run in the second terminal: From ec0bb6ac3ec9652cc256a2cdc3f841dde3ad17b8 Mon Sep 17 00:00:00 2001 From: NikitaZotov Date: Mon, 3 Feb 2025 16:40:39 +0300 Subject: [PATCH 27/27] feat(config): add ellipsis config --- README.md | 2 +- ellipsis.yaml | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 ellipsis.yaml diff --git a/README.md b/README.md index 40c18cab..8bca09b1 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![license](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE) -It is the repository of the Platform of the [OSTIS Technology](https://github.com/ostis-ai). OSTIS Platform is intended to be a solid framework to help you deploy existing and create new ostis-systems. +It is the repository of the Platform of the [OSTIS Technology](https://github.com/ostis-ai). The OSTIS Platform is intended to be a solid framework to help you deploy existing and create new ostis-systems. OSTIS Platform contains: diff --git a/ellipsis.yaml b/ellipsis.yaml new file mode 100644 index 00000000..648b8b2f --- /dev/null +++ b/ellipsis.yaml @@ -0,0 +1,22 @@ +version: 1.3 +about: + - "The OSTIS Platform is a solid framework to deploy existing and create new ostis-systems" + - "The OSTIS Platform is a robust framework that emphasizes semantic compatibility and modularity for intelligent computer systems" + +pr_review: + rules: + - "Code should be DRY (Don't Repeat Yourself)" + - "There should be no secrets or credentials in the code" + - "Extremely Complicated Code Needs Comments" + - "Use Descriptive Variable and Constant Names" + - "Don't log sensitive data" + - "Follow the Single Responsibility Principle" + - "Function and Method Naming Should Follow Consistent Patterns" + summary_rules: + - "Don't mention changes if the change is only whitespace" + - "When a rename occurs, mention the old and new file names, but don't mention every single spot where the file renamed occurred" + auto_review_enabled: true + enable_approve_prs: true + +pr_address_comments: + delivery: "new_commit"