### Install the Project Source: https://github.com/epam/indigo/blob/master/third_party/freetype/CMakeLists.txt Use this command to install the FreeType library after building. 'sudo' may be required depending on the installation path. ```bash (sudo) cmake --build build --target install ``` -------------------------------- ### Load, Convert, and Render a Glyph to Bitmap Source: https://github.com/epam/indigo/blob/master/third_party/freetype/docs/reference/ft2-glyph_management.html This example demonstrates loading a character, getting its glyph, converting it to a bitmap if necessary, and then accessing the bitmap data. Ensure to handle errors and call `FT_Done_Glyph` to free resources. ```c FT_Glyph glyph; FT_BitmapGlyph glyph_bitmap; // load glyph error = FT_Load_Char( face, glyph_index, FT_LOAD_DEFAULT ); // extract glyph image error = FT_Get_Glyph( face->glyph, &glyph ); // convert to a bitmap (default render mode + destroying old) if ( glyph->format != FT_GLYPH_FORMAT_BITMAP ) { error = FT_Glyph_To_Bitmap( &glyph, FT_RENDER_MODE_NORMAL, 0, 1 ); if ( error ) // `glyph' unchanged ... } // access bitmap content by typecasting glyph_bitmap = (FT_BitmapGlyph)glyph; // do funny stuff with it, like blitting/drawing ... // discard glyph image (bitmap or not) FT_Done_Glyph( glyph ); ``` -------------------------------- ### Install docker-compose Source: https://github.com/epam/indigo/blob/master/utils/indigo-service/README.md Instructions for installing docker-compose, either as a Python module or using a provided script. ```bash docker-compose $(CMD) ``` ```bash ./run_dc.sh $(CMD) ``` -------------------------------- ### Initialize and Start PostgreSQL DB Instance Source: https://github.com/epam/indigo/blob/master/bingo/postgres/tests/local/README.md Initializes the PostgreSQL data directory and starts the database server. Logs are written to 'logfile'. ```bash /usr/local/pgsql/bin/initdb -D data/ /usr/local/pgsql/bin/pg_ctl -D data/ -l logfile start ``` -------------------------------- ### Build and Install GoogleTest (Unix) Source: https://github.com/epam/indigo/blob/master/third_party/googletest/README.md After generating build scripts with CMake, use 'make' to build GoogleTest and 'sudo make install' to install it system-wide. This is for Unix-like systems. ```bash make sudo make install # Install in /usr/local/ by default ``` -------------------------------- ### Compile and Install PostgreSQL Source: https://github.com/epam/indigo/blob/master/bingo/postgres/tests/local/README.md Installs PostgreSQL from source. Ensure you have the 'gettext' package installed and download the PostgreSQL source archive. ```bash sudo apt-get install gettext wget -P pg https://ftp.postgresql.org/pub/source/v12.6/postgresql-12.6.tar.gz tar -xzvf postgresql-12.6.tar.gz cd postgresql-12.6 ./configure --without-readline --enable-nls make -j $(nproc) make install ``` -------------------------------- ### Install Bingo and Load SQL Script Source: https://github.com/epam/indigo/blob/master/bingo/postgres/tests/local/README.md Installs the bingo package and then executes the 'bingo_install.sql' script against the 'test' database. ```bash cd bingo sh bingo-pg-install.sh /usr/local/pgsql/bin/psql -f bingo_install.sql test ``` -------------------------------- ### Install Development Requirements Source: https://github.com/epam/indigo/blob/master/api/http/README.md Install development dependencies for the Indigo service by first installing from `requirement_dev.txt` and then installing the service in editable mode. ```bash pip3 install -e . ``` -------------------------------- ### Bingo PostgreSQL Installation Script Help Source: https://github.com/epam/indigo/blob/master/bingo/postgres/README.md Displays the help message for the bingo-pg-install.sh script, detailing available parameters for installation customization. ```bash Usage: bingo-pg-install.sh [parameters] Parameters: -?, -help Print this help message -libdir path Target directory with the installed bingo_postgres.dylib (defaut {CURRENT_DIR}/bin/). -schema name Postgres schema name (default "bingo"). -pglibdir Use postgreSQL $libdir option (default "false") Notice: bingo_postgres.dylib must be placed in the package library directory -y Process default options (default "false") ``` -------------------------------- ### Install Emscripten SDK Source: https://github.com/epam/indigo/blob/master/README.md Installs the latest version of the Emscripten SDK. ```bash ./emsdk install latest ``` -------------------------------- ### Simple Bingo PostgreSQL Installation Source: https://github.com/epam/indigo/blob/master/bingo/postgres/README.md Installs Bingo PostgreSQL using default settings and executes the installation SQL script. ```bash bingo-pg-install.sh ``` ```sql psql -U postgres -d test -f bingo_install.sql ``` -------------------------------- ### Project Setup and Source Discovery Source: https://github.com/epam/indigo/blob/master/api/cpp/CMakeLists.txt Initializes the CMake project and discovers source files using file globbing. This is a standard setup for C++ projects using CMake. ```cmake cmake_minimum_required(VERSION 3.6) project(indigo-cpp LANGUAGES CXX) file(GLOB ${PROJECT_NAME}_SOURCES CONFIUGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/*.h ) ``` -------------------------------- ### Start Development Server and Run Tests Source: https://github.com/epam/indigo/blob/master/api/http/README.md Start the development uvicorn server for the Indigo service and run tests using pytest. ```bash pytest ``` -------------------------------- ### CMake Minimum Version and Project Setup Source: https://github.com/epam/indigo/blob/master/utils/cdx-dump/CMakeLists.txt Specifies the minimum required CMake version and sets the project name and language. Ensure your CMake installation meets the specified version. ```cmake cmake_minimum_required(VERSION 3.4...3.31) project(cdx-dump LANGUAGES CXX) ``` -------------------------------- ### Example Usage of FT_New_Face_From_FOND Source: https://github.com/epam/indigo/blob/master/third_party/freetype/docs/reference/ft2-mac_specific.html This example demonstrates how to create an FT_Face object from a FOND resource using FT_New_Face_From_FOND. It assumes the FOND resource has already been obtained. ```c fond = GetResource( 'FOND', fontName ); error = FT_New_Face_From_FOND( library, fond, 0, &face ); ``` -------------------------------- ### Bingo PostgreSQL Installation with Custom Library Directory Source: https://github.com/epam/indigo/blob/master/bingo/postgres/README.md Installs Bingo PostgreSQL, specifying a custom directory for the library file, and then executes the installation SQL script. ```bash bingo-pg-install.sh -libdir /home/myself ``` ```sql psql -U postgres -d test -f bingo_install.sql ``` -------------------------------- ### Download and Compile PostgreSQL Source: https://github.com/epam/indigo/blob/master/bingo/postgres/README-BUILD.md Download the PostgreSQL source code, extract it, configure the build, compile, and install. Ensure PostgreSQL is installed before proceeding with the Bingo build. ```bash wget -P pg https://ftp.postgresql.org/pub/source/v12.6/postgresql-12.6.tar.gz tar -xzvf postgresql-12.6.tar.gz cd postgresql-12.6 ./configure --without-readline --enable-nls make make install ``` -------------------------------- ### Set Compiler Flags and Include Setup Module Source: https://github.com/epam/indigo/blob/master/CMakeLists.txt Configures the module path for CMake and includes the setup module. This is typically done at the beginning of the CMakeLists.txt file. ```cmake set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) include(setup) ``` -------------------------------- ### SQLPlus Connection Examples Source: https://github.com/epam/indigo/blob/master/bingo/oracle/tests/docker/README.md Examples of connecting to the Oracle database using SQLPlus from within the test container. One connection is to the system user, the other to the test schema. ```sql sqlplus system/password@oracle:1521/XEPDB1 ``` ```sql sqlplus test/test@oracle:1521/XEPDB1 ``` -------------------------------- ### Configure docker-compose.yml Source: https://github.com/epam/indigo/blob/master/utils/indigo-service/README.md Examples of configuring docker-compose.yml for different environments, specifying ports and Python paths. ```bash # ketcher-dev (no db) INDIGO_SERVICE_PORT=8084 INDIGO_SERVICE_PYTHONPATH="/var/src/Indigo/build/indigo-python" docker-compose -p ketcher_dev up -d indigo_service indigo_service_front indigo_builder # stable INDIGO_SERVICE_PORT=8085 docker-compose -p stable up -d indigo_db indigo_service indigo_service_front ``` -------------------------------- ### Install Python Package with Pip Source: https://github.com/epam/indigo/blob/master/README.md Installs the Indigo Python package using pip. Ensure you replace '' with the actual path to the wheel file. ```bash python -m pip install ``` -------------------------------- ### Execute Bingo Installation Script (Windows) Source: https://github.com/epam/indigo/blob/master/bingo/postgres/README.md Run the 'bingo-pg-install.bat' batch file on Windows to install the Bingo cartridge. This script manages the library placement and SQL script generation. ```batch Usage: bingo-pg-install.bat [parameters] Parameters: -?, -help Print this help message -libdir path Target directory with the installed bingo_postgres.dll (defaut {CURRENT_DIR}/bin/). -schema name Postgres schema name (default "bingo"). -pglibdir Use postgreSQL $libdir option (default "false") Notice: bingo_postgres.dll must be placed in the package library directory -y Process default options (default "false") ``` -------------------------------- ### Install Test Requirements Source: https://github.com/epam/indigo/blob/master/bingo/tests/README.md Installs all necessary Python packages for running the tests using pip. ```shell pip install -r bingo/tests/requirements.txt ``` -------------------------------- ### Install Google Test Project Source: https://github.com/epam/indigo/blob/master/third_party/googletest/CMakeLists.txt Installs the gtest and gtest_main targets for the project. This rule is typically defined in a separate CMake module or function. ```cmake install_project(gtest gtest_main) ``` -------------------------------- ### Check Git Version Source: https://github.com/epam/indigo/blob/master/README.md Verifies that Git is installed and accessible from the system's PATH. ```bash >git --version git version 2.26.2.windows.1 ``` -------------------------------- ### Run Waitress Server Source: https://github.com/epam/indigo/blob/master/README.md Starts the Waitress WSGI server to run the Indigo backend service. You can specify a different port if needed. ```bash waitress-serve --listen="127.0.0.1:5000 [::1]:5000" app:app ``` -------------------------------- ### Start Oracle and Bake Cartridge Source: https://github.com/epam/indigo/blob/master/bingo/oracle/tests/docker/README.md Build the bingo tarball and then bring up the Oracle container with the cartridge baked in. This is the first step for iterative development. ```bash docker compose -f bingo/oracle/tests/docker/docker-compose.yml run --rm builder ``` ```bash docker compose -f bingo/oracle/tests/docker/docker-compose.yml up -d --build oracle ``` -------------------------------- ### Build and Run Docker Compose Source: https://github.com/epam/indigo/blob/master/utils/indigo-service/MANUALY_DEPLOY_LOCAL.md Build the Docker images without cache and then start the services in detached mode using docker-compose. ```shell docker-compose build --no-cache ``` ```shell docker-compose up -d ``` -------------------------------- ### Run Elasticsearch via Docker Source: https://github.com/epam/indigo/blob/master/bingo/bingo-elastic/python/README.md Start a single-node Elasticsearch instance with the required configuration for indexing. ```bash docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" -e "indices.query.bool.max_clause_count=4096" docker.elastic.co/elasticsearch/elasticsearch:7.17.28 ``` -------------------------------- ### Check Ninja Version Source: https://github.com/epam/indigo/blob/master/README.md Verifies that Ninja build tool is installed and accessible from the system's PATH. ```bash >ninja --version 1.10.2 ``` -------------------------------- ### Pytest Test Function Example Source: https://github.com/epam/indigo/blob/master/bingo/tests/README.md Example of a parameterized pytest test function that runs against multiple databases and test cases. It utilizes pytest fixtures for setup and data retrieval. ```python # test_function.py import pytest from ..constants import DB_POSTGRES, DB_BINGO, DB_BINGO_ELASTIC from ..helpers import assert_calculate_query, query_cases # query_cases - return list of tuples: test cases with expected test result. # [(query_id, expected), ] # assert_calculate_query - Assertion function db_list = [DB_POSTGRES, DB_BINGO, DB_BINGO_ELASTIC] # List of Databases we run tests in @pytest.mark.usefixtures('init_db') # pytest fixture (setup/teardown) defined in coftest.py (near test_function.py) class TestFunction: # Parametrize parameter 'db' in function test_foo with arguments from 'db_list', so the function will run with different 'db' values # 'db' is pytest fixture provided in root conftest.py file # Parametrize parameters 'query_id' and 'expected' in function test_foo with query_cases, so the function will run with different 'query_id' and 'expected' values @pytest.mark.parametrize('db', db_list, indirect=True) @pytest.mark.parametrize('query_id, expected', query_cases('function')) def test_foo(self, db, entities, query_id, expected): # entities - pytest fixture defined in conftest.py (near test_function.py) molecule = entities.get(query_id) result = db.function(molecule, 'bar-option') assert_calculate_query(result, expected) # Double parametrization does let us run test_foo with different test cases # for every database provided in 'db_list' ``` -------------------------------- ### Upload Conda Package Source: https://github.com/epam/indigo/blob/master/README.md Install anaconda-client, log in to your anaconda account, and upload the built package using the path provided by conda-build. ```bash >conda install anaconda-client >anaconda login Enter username: Enter password: >anaconda upload /conda-build-dir/packet-name ``` -------------------------------- ### Get FSSpec from Mac Font Name Source: https://github.com/epam/indigo/blob/master/third_party/freetype/docs/reference/ft2-mac_specific.html This deprecated function retrieves an FSSpec for a font file given its Mac OS name. The FSSpec can then be used with functions like FT_New_Face_From_FSSpec to load the font. It is intended for use with fonts installed on the system. ```c FT_EXPORT( FT_Error ) FT_GetFile_From_Mac_Name( const char* fontName, FSSpec* pathSpec, FT_Long* face_index ) FT_DEPRECATED_ATTRIBUTE; ``` -------------------------------- ### Get FSSpec from Mac ATS Font Name Source: https://github.com/epam/indigo/blob/master/third_party/freetype/docs/reference/ft2-mac_specific.html This deprecated function retrieves an FSSpec for a font file given its Mac OS name, specifically for fonts managed by the ATS framework. The FSSpec can be used with FT_New_Face_From_FSSpec. It is intended for use with fonts installed on the system. ```c FT_EXPORT( FT_Error ) FT_GetFile_From_Mac_ATS_Name( const char* fontName, FSSpec* pathSpec, FT_Long* face_index ) FT_DEPRECATED_ATTRIBUTE; ``` -------------------------------- ### Build React App Source: https://github.com/epam/indigo/blob/master/utils/indigo-service/frontend/ui/README.md Use this command to build the React application. ```bash yarn run build ``` -------------------------------- ### Initialize ElasticRepository Source: https://github.com/epam/indigo/blob/master/bingo/bingo-elastic/python/README.md Instantiate sync or async repositories to connect to the Elasticsearch cluster. ```python repository = ElasticRepository(IndexName.BINGO_MOLECULE, host="127.0.0.1", port=9200) ``` ```python repository = AsyncElasticRepository(IndexName.BINGO_MOLECULE, host="127.0.0.1", port=9200) ... repository.close() ``` ```python async with AsyncElasticRepository(IndexName.BINGO_MOLECULE, host="127.0.0.1", port=9200) as rep: ... ``` -------------------------------- ### Setting up FT_Incremental_InterfaceRec for FT_Open_Face Source: https://github.com/epam/indigo/blob/master/third_party/freetype/docs/reference/ft2-incremental.html Demonstrates how to initialize an FT_Incremental_InterfaceRec structure and use it with FT_Open_Face to enable incremental glyph loading. Ensure the funcs and object members are correctly set before passing it as a parameter. ```c FT_Incremental_InterfaceRec inc_int; FT_Parameter parameter; FT_Open_Args open_args; // set up incremental descriptor inc_int.funcs = my_funcs; inc_int.object = my_object; // set up optional parameter parameter.tag = FT_PARAM_TAG_INCREMENTAL; parameter.data = &inc_int; // set up FT_Open_Args structure open_args.flags = FT_OPEN_PATHNAME | FT_OPEN_PARAMS; open_args.pathname = my_font_pathname; open_args.num_params = 1; open_args.params = ¶meter; // we use one optional argument // open the font error = FT_Open_Face( library, &open_args, index, &face ); ``` -------------------------------- ### Basic InChI Library Setup Source: https://github.com/epam/indigo/blob/master/third_party/inchi/CMakeLists.txt Configures the minimum CMake version, project name, and language. It then uses file globbing to find all C source files in specified directories and adds them to a static library target. ```cmake cmake_minimum_required(VERSION 3.6) project(inchi LANGUAGES C) file (GLOB ${PROJECT_NAME}_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/INCHI_BASE/src/*.c ${CMAKE_CURRENT_SOURCE_DIR}/INCHI_API/libinchi/src/*.c) add_library(${PROJECT_NAME} STATIC ${${PROJECT_NAME}_SOURCES}) ``` -------------------------------- ### Bingo PostgreSQL Installation with PostgreSQL Library Directory and Custom Schema Source: https://github.com/epam/indigo/blob/master/bingo/postgres/README.md Installs Bingo PostgreSQL using the PostgreSQL library directory and a custom schema name, then executes the installation SQL script. ```bash bingo-pg-install.sh -pglibdir -schema bingo2 ``` ```sql psql -U postgres -d test -f bingo_install.sql ``` -------------------------------- ### Install Bingo Elastic dependencies Source: https://github.com/epam/indigo/blob/master/bingo/bingo-elastic/python/README.md Use pip to install the standard or async-enabled version of the library. ```bash pip install bingo-elastic ``` ```bash pip install bingo-elastic[async] ``` -------------------------------- ### Force Multiple Dependencies Source: https://github.com/epam/indigo/blob/master/third_party/freetype/CMakeLists.txt This example demonstrates forcing multiple dependencies (zlib, bzip2, png, harfbuzz, brotli) by setting their respective FT_REQUIRE_ variables to TRUE. ```bash cmake -B build -D FT_REQUIRE_ZLIB=TRUE \ -D FT_REQUIRE_BZIP2=TRUE \ -D FT_REQUIRE_PNG=TRUE \ -D FT_REQUIRE_HARFBUZZ=TRUE \ -D FT_REQUIRE_BROTLI=TRUE [...] ``` -------------------------------- ### Fetch Indigo Jars using Maven Source: https://github.com/epam/indigo/blob/master/utils/indigo-knime/com.epam.indigo.knime.plugin/lib/WHERE_ARE_THE_JARS.txt Execute these commands in the terminal to clean, package, and obtain the required JARs. Ensure you are in the 'fetch_jars' directory. ```bash cd fetch_jars mvn clean package ``` -------------------------------- ### Set Up Emscripten Environment for New Session Source: https://github.com/epam/indigo/blob/master/README.md Re-activates the Emscripten SDK environment for a new build session. ```bash >cd emsdk >./emsdk activate latest ``` -------------------------------- ### Initialize Indigo Renderer and set options Source: https://github.com/epam/indigo/blob/master/utils/indigo-ml/notebooks/clustering_and_manifold.ipynb Sets up the Indigo renderer for molecule visualization. Configures the output format to SVG and specifies the image size for rendering. ```python renderer = IndigoRenderer(indigo) indigo.setOption("render-output-format", "svg") indigo.setOption("render-image-size", 350, 170) ``` -------------------------------- ### Load Multiple Glyphs and Convert to Bitmap Source: https://github.com/epam/indigo/blob/master/third_party/freetype/docs/reference/ft2-glyph_management.html This example shows loading multiple glyphs into an array, converting each to a bitmap, and then freeing them. Note that `FT_Glyph_To_Bitmap` can modify the pointer, so it's important to manage the `bitmap` variable correctly. ```c FT_Glyph glyphs[MAX_GLYPHS] ... for ( idx = 0; i < MAX_GLYPHS; i++ ) error = FT_Load_Glyph( face, idx, FT_LOAD_DEFAULT ) || FT_Get_Glyph ( face->glyph, &glyphs[idx] ); ... for ( idx = 0; idx < MAX_GLYPHS; idx++ ) { FT_Glyph bitmap = glyphs[idx]; ... // after this call, `bitmap' no longer points into // the `glyphs' array (and the old value isn't destroyed) FT_Glyph_To_Bitmap( &bitmap, FT_RENDER_MODE_MONO, 0, 0 ); ... FT_Done_Glyph( bitmap ); } ... for ( idx = 0; idx < MAX_GLYPHS; idx++ ) FT_Done_Glyph( glyphs[idx] ); ``` -------------------------------- ### Include Order and Style Source: https://github.com/epam/indigo/wiki/Indigo-Cpp-Style-guide Demonstrates the recommended order and style for including headers in C++ files. Use double quotes for project-internal headers and angle brackets for third-party or standard library headers. ```cpp #include "indigo_internal.h" #include "base_cpp/output.h" #include "base_cpp/profiling.h" #include "base_cpp/temporary_thread_obj.h" #include "molecule/molecule_fingerprint.h" ``` ```cpp #include #include #include "molecule/molecule_3d_constraints.h" #include "molecule/molecule_arom_match.h" ``` -------------------------------- ### Enable and Compile FreeType Tests with Meson Source: https://github.com/epam/indigo/blob/master/third_party/freetype/tests/README.md Enable the 'tests' option during Meson setup to compile the test programs. Then, compile the project using Meson. ```bash meson setup out -Dtests=enabled meson compile -C out ``` -------------------------------- ### Execute Bingo Installation Script (Linux) Source: https://github.com/epam/indigo/blob/master/bingo/postgres/README.md Run the 'bingo-pg-install.sh' script on Linux to install the Bingo cartridge. This script handles the placement of the library and generation of SQL scripts. ```bash Usage: bingo-pg-install.sh [parameters] Parameters: -?, -help Print this help message -libdir path Target directory with the installed bingo_postgres.so (defaut {CURRENT_DIR}/bin/). -schema name Postgres schema name (default "bingo"). -pglibdir Use postgreSQL $libdir option (default "false") Notice: bingo_postgres.so must be placed in the package library directory -y Process default options (default "false") ``` -------------------------------- ### Lookup XML Information with TinyXML-2 Source: https://github.com/epam/indigo/blob/master/third_party/tinyxml2/readme.md Demonstrates how to load an XML file and retrieve text content from elements using different methods. Includes basic error checking. ```cpp { XMLDocument doc; doc.LoadFile( "dream.xml" ); // Structure of the XML file: // - Element "PLAY" the root Element, which is the // FirstChildElement of the Document // - - Element "TITLE" child of the root PLAY Element // - - - Text child of the TITLE Element // Navigate to the title, using the convenience function, // with a dangerous lack of error checking. const char* title = doc.FirstChildElement( "PLAY" )->FirstChildElement( "TITLE" )->GetText(); printf( "Name of play (1): %s\n", title ); // Text is just another Node to TinyXML-2. The more // general way to get to the XMLText: XMLText* textNode = doc.FirstChildElement( "PLAY" )->FirstChildElement( "TITLE" )->FirstChild()->ToText(); title = textNode->Value(); printf( "Name of play (2): %s\n", title ); } ``` -------------------------------- ### Navigate to Build Folder Source: https://github.com/epam/indigo/blob/master/README.md Changes the current directory to the 'build' folder. ```bash cd build ``` -------------------------------- ### Get FreeType Library Version Source: https://github.com/epam/indigo/blob/master/third_party/freetype/docs/reference/ft2-version.html Use FT_Library_Version to get the major, minor, and patch version numbers of the FreeType library at runtime. This function requires a library handle. ```c FT_EXPORT( void ) FT_Library_Version( FT_Library library, FT_Int* amajor, FT_Int* aminor, FT_Int* apatch ); ``` -------------------------------- ### Install Bingo Cartridge using SQL Script Source: https://github.com/epam/indigo/blob/master/bingo/postgres/README.md Execute the generated 'bingo_install.sql' script against your PostgreSQL database to install the Bingo cartridge functions and procedures. Ensure you have admin privileges and the database already exists. ```sql psql -U $admin -d $database -f bingo_install.sql ``` -------------------------------- ### Initialize PKGCONFIG Variables Source: https://github.com/epam/indigo/blob/master/third_party/freetype/CMakeLists.txt Initializes variables used for generating pkg-config files, setting up library paths and names for dependencies. ```cmake set(PKGCONFIG_REQUIRES "") set(PKGCONFIG_REQUIRES_PRIVATE "") set(PKGCONFIG_LIBS "-L\${libdir} -lfreetype") set(PKGCONFIG_LIBS_PRIVATE "") ``` -------------------------------- ### Get FreeType Error String Source: https://github.com/epam/indigo/blob/master/third_party/freetype/docs/reference/ft2-error_enumerations.html Use `FT_Error_String` to get a human-readable description of a FreeType error code. This function requires FreeType to be compiled with `FT_CONFIG_OPTION_ERROR_STRINGS` or `FT_DEBUG_LEVEL_ERROR` for meaningful output; otherwise, it returns `NULL`. ```c strcmp( FT_Error_String( FT_Err_Unknown_File_Format ), FT_Error_String( BDF_Err_Unknown_File_Format ) ) == 0; ``` -------------------------------- ### FT_Stroker_BeginSubPath Source: https://github.com/epam/indigo/blob/master/third_party/freetype/docs/reference/ft2-index.html Starts a new sub-path for the stroker. ```APIDOC ## FT_Stroker_BeginSubPath ### Description Starts a new sub-path for the stroker. ### Function Signature `void FT_Stroker_BeginSubPath( FT_Stroker stroker, FT_Vector* to );` ``` -------------------------------- ### C++ Forward Declarations Example Source: https://github.com/epam/indigo/wiki/Indigo-Cpp-Style-guide Demonstrates the use of forward declarations in a header file to reduce dependencies and improve compile times. The implementation file includes the necessary headers. ```cpp #include "base_cpp/array.h" #include "molecule/molecule_stereocenter_options.h" namespace indigo { class Scanner; class BaseReaction; class Reaction; class QueryReaction; class DLLEXPORT ReactionAutoLoader { public: ReactionAutoLoader (Scanner &scanner); ReactionAutoLoader (const Array &arr); ReactionAutoLoader (const char *); ``` ```cpp #include "reaction/reaction_auto_loader.h" ... #include "gzip/gzip_scanner.h" #include "reaction/reaction.h" #include "reaction/query_reaction.h" ... // use Scanner, Reaction, QueryReaction... ``` -------------------------------- ### FT_Stroker_GetCounts Source: https://github.com/epam/indigo/blob/master/third_party/freetype/docs/reference/ft2-index.html Gets the number of spans in the stroked outline. ```APIDOC ## FT_Stroker_GetCounts ### Description Gets the number of spans in the stroked outline. ### Function Signature `void FT_Stroker_GetCounts( FT_Stroker stroker, FT_UInt* Anum_spans, FT_UInt* Bnum_spans );` ``` -------------------------------- ### FT_Stroker_GetBorderCounts Source: https://github.com/epam/indigo/blob/master/third_party/freetype/docs/reference/ft2-index.html Gets the number of spans for each border of the stroked outline. ```APIDOC ## FT_Stroker_GetBorderCounts ### Description Gets the number of spans for each border of the stroked outline. ### Function Signature `void FT_Stroker_GetBorderCounts( FT_Stroker stroker, FT_UInt* Anum_spans, FT_UInt* Bnum_spans );` ``` -------------------------------- ### FT_Stroker_BeginSubPath Source: https://github.com/epam/indigo/blob/master/third_party/freetype/docs/reference/ft2-glyph_stroker.html Starts a new sub-path within the stroker's current outline. ```APIDOC ## FT_Stroker_BeginSubPath ### Description Starts a new sub-path within the stroker's current outline. ### Function Signature ```c void FT_Stroker_BeginSubPath( FT_Stroker astroker ); ``` ### Parameters - **astroker** (FT_Stroker): Handle to the stroker object. ``` -------------------------------- ### Load and Parse XML File Source: https://github.com/epam/indigo/blob/master/third_party/tinyxml2/readme.md Demonstrates the basic usage of loading and parsing an XML file using XMLDocument. ```cpp /* ------ Example 1: Load and parse an XML file. ---- */ { XMLDocument doc; doc.LoadFile( "dream.xml" ); } ``` -------------------------------- ### FT_Property_Get Source: https://github.com/epam/indigo/blob/master/third_party/freetype/docs/reference/ft2-index.html Gets a property from a module. This function is part of the module management API. ```APIDOC ## FT_Property_Get ### Description Gets a property from a module. This function is part of the module management API. ### Method Not applicable (C function) ### Endpoint Not applicable (C function) ### Parameters (Details not provided in the index, refer to ft2-module_management.html) ### Request Example (Not applicable) ### Response (Details not provided in the index, refer to ft2-module_management.html) ``` -------------------------------- ### FT_Palette_Data_Get Source: https://github.com/epam/indigo/blob/master/third_party/freetype/docs/reference/ft2-index.html Gets palette data. This function is part of the color management API. ```APIDOC ## FT_Palette_Data_Get ### Description Gets palette data. This function is part of the color management API. ### Method Not applicable (C function) ### Endpoint Not applicable (C function) ### Parameters (Details not provided in the index, refer to ft2-color_management.html) ### Request Example (Not applicable) ### Response (Details not provided in the index, refer to ft2-color_management.html) ``` -------------------------------- ### Build Frontend UI Source: https://github.com/epam/indigo/blob/master/utils/indigo-service/MANUALY_DEPLOY_LOCAL.md Build the frontend UI using npm. Ensure any old build folders are removed before building. ```shell npm build ``` -------------------------------- ### One-shot Docker Compose Run Source: https://github.com/epam/indigo/blob/master/bingo/oracle/tests/docker/README.md Build the self-contained Oracle + bingo image, start it, and run the test suite. This command ensures all dependencies are built and the test environment is set up. ```bash docker compose -f bingo/oracle/tests/docker/docker-compose.yml up --build \ --abort-on-container-exit --exit-code-from tests oracle tests ``` -------------------------------- ### Check CMake Version Source: https://github.com/epam/indigo/blob/master/README.md Verifies that CMake is installed and accessible from the system's PATH. ```bash >cmake --version cmake version 3.18.4 ``` -------------------------------- ### Check Python Version Source: https://github.com/epam/indigo/blob/master/README.md Verifies that Python is installed and accessible from the system's PATH. ```bash >python --version Python 3.9.0 ``` -------------------------------- ### Build Conda Package (Linux/Mac) Source: https://github.com/epam/indigo/blob/master/README.md Navigate to the conda recipe directory and build the package. Ensure INDIGO_VERSION is set to a valid existing version. ```bash >cd conda-recipe >INDIGO_VERSION=1.29.0 conda build . ``` -------------------------------- ### Check Service Info Source: https://github.com/epam/indigo/blob/master/utils/indigo-service/README.md Example of using curl to check the service information endpoint. ```bash curl http://localhost:80/api/v2/info ``` -------------------------------- ### Activate Emscripten SDK Source: https://github.com/epam/indigo/blob/master/README.md Activates the latest installed version of the Emscripten SDK for the current session. ```bash ./emsdk activate latest ``` -------------------------------- ### Configure Project with CMake Source: https://github.com/epam/indigo/blob/master/README.md Configures the project using CMake, enabling specific build options for Indigo, its wrappers, and utilities. ```bash cmake .. -DBUILD_INDIGO=ON -DBUILD_INDIGO_WRAPPERS=ON -DBUILD_INDIGO_UTILS=ON ```